oracle_linux_6_64(bit)上安装oracle11gR2数据库环境快速准备神器oracle-rdbms-server-11gR2-preinstall

异步赠书:10月Python畅销书升级 【重磅】Python工程师养成记! 程序员9月书讯 节后荐书:Python、PyQt5、Kotlin(评论送书)

oracle_linux_6_64(bit)上安装oracle11gR2数据库环境快速准备神器oracle-rdbms-server-11gR2-preinstall

标签oracle_linux_6_64bit

2014-07-06 21:13 3486人阅读 评论(0) 收藏 举报

分类

ORACLE维护管理(36)

版权声明:本文为博主原创文章,未经博主允许不得转载。

目录(?)[+]

1、oraclelinux上安装oracle数据库环境快速准备介绍

在Linux上安装oracle数据库,在环境准备方面,例如该安装的RPM包,该调整的内核参数等,不仅较为复杂,有些参数值还会因为人工设置的不合理而对日后的运行带来一定的影响,也是整个安装过程中最耗时的部分。

在oraclelinux6_64bit上,提供了oracle-rdbms-server-11gR2-preinstall包,可以自动化的将需要安装的rpm包,需要调整的内核参数自动化的处理,对DBA安装数据库确实节省了不少的时间。

在oraclelinux5和oraclelinux4上有一个相似功能的包叫oracle-validated

2、oracle-rdbms-server-11gR2-preinstall包所干的事情

(1)自动安装oracle所需的RPM包

(2)自动创建oracle用户和dba、oinstall组

(3)自动配置/etc/sysctl.conf内核参数

(4)自动配置/etc/security/limits.conf参数

(5)关闭NUMA=OFF(关闭非一致内存访问)

3、为使用oracle-rdbms-server-11gR2-preinstall而搭建一个本地yum服务器

(如果环境中有yum服务器,此部可以跳过)

3.1挂载OracleLinux6光盘(以root用户执行)

#mkdir-p/mnt/cdrom

#mount/dev/cdrom/mnt/cdrom

3.2创建local.repo文件(以root用户执行)

#vi/etc/yum.repos.d/local.repo

[HighAvailability]

name=HighAvailability

baseurl=file:///mnt/cdrom/HighAvailability

enabled=1

gpgcheck=0

[LoadBalancer]

name=LoadBalancer

baseurl=file:///mnt/cdrom/LoadBalancer

enabled=1

gpgcheck=0

[Server]

name=Server

baseurl=file:///mnt/cdrom/Server

enabled=1

gpgcheck=0

3.3修改public-yum-ol6.repo文件配置(以root用户执行)

#mv/etc/yum.repos.d/public-yum-ol6.repo/etc/yum.repos.d/public-yum-ol6.repo_bak

#vi/etc/yum.repos.d/public-yum-ol6.repo

[oel6_local]

name=oracleEnterpriseLinux6

baseurl=file:///mnt/cdrom/Server/

gpgcheck=0

enabled=1

4、正式使用oracle-rdbms-server-11gR2-preinstall部署环境

#yuminstalloracle-rdbms-server-11gR2-preinstall

运行输出内容如下:

Loadedplugins:refresh-packagekit,security

SettingupInstallProcess

ResolvingDependencies

-->Runningtransactioncheck

--->Packageoracle-rdbms-server-11gR2-preinstall.x86_640:1.0-6.el6willbeinstalled

-->ProcessingDependency:glibc-develforpackage:oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64

-->ProcessingDependency:compat-libstdc++-33forpackage:oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64

-->ProcessingDependency:libstdc++-develforpackage:oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64

-->ProcessingDependency:libaio-develforpackage:oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64

-->ProcessingDependency:gccforpackage:oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64

-->ProcessingDependency:gcc-c++forpackage:oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64

-->ProcessingDependency:compat-libcap1forpackage:oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64

-->ProcessingDependency:kshforpackage:oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64

-->Runningtransactioncheck

--->Packagecompat-libcap1.x86_640:1.10-1willbeinstalled

--->Packagecompat-libstdc++-33.x86_640:3.2.3-69.el6willbeinstalled

--->Packagegcc.x86_640:4.4.6-4.el6willbeinstalled

-->ProcessingDependency:cpp=4.4.6-4.el6forpackage:gcc-4.4.6-4.el6.x86_64

-->ProcessingDependency:cloog-ppl>=0.15forpackage:gcc-4.4.6-4.el6.x86_64

--->Packagegcc-c++.x86_640:4.4.6-4.el6willbeinstalled

-->ProcessingDependency:libmpfr.so.1()(64bit)forpackage:gcc-c++-4.4.6-4.el6.x86_64

--->Packageglibc-devel.x86_640:2.12-1.80.el6willbeinstalled

-->ProcessingDependency:glibc-headers=2.12-1.80.el6forpackage:glibc-devel-2.12-1.80.el6.x86_64

-->ProcessingDependency:glibc-headersforpackage:glibc-devel-2.12-1.80.el6.x86_64

--->Packageksh.x86_640:20100621-16.el6willbeinstalled

--->Packagelibaio-devel.x86_640:0.3.107-10.el6willbeinstalled

--->Packagelibstdc++-devel.x86_640:4.4.6-4.el6willbeinstalled

-->Runningtransactioncheck

--->Packagecloog-ppl.x86_640:0.15.7-1.2.el6willbeinstalled

-->ProcessingDependency:libppl.so.7()(64bit)forpackage:cloog-ppl-0.15.7-1.2.el6.x86_64

-->ProcessingDependency:libppl_c.so.2()(64bit)forpackage:cloog-ppl-0.15.7-1.2.el6.x86_64

--->Packagecpp.x86_640:4.4.6-4.el6willbeinstalled

--->Packageglibc-headers.x86_640:2.12-1.80.el6willbeinstalled

-->ProcessingDependency:kernel-headers>=2.2.1forpackage:glibc-headers-2.12-1.80.el6.x86_64

-->ProcessingDependency:kernel-headersforpackage:glibc-headers-2.12-1.80.el6.x86_64

--->Packagempfr.x86_640:2.4.1-6.el6willbeinstalled

-->Runningtransactioncheck

--->Packagekernel-headers.x86_640:2.6.32-279.el6willbeinstalled

--->Packageppl.x86_640:0.10.2-11.el6willbeinstalled

-->FinishedDependencyResolution

DependenciesResolved

===================================================================================

PackageArchVersionRepository

Size

===================================================================================

Installing:

oracle-rdbms-server-11gR2-preinstallx86_641.0-6.el6Server15k

Installingfordependencies:

cloog-pplx86_640.15.7-1.2.el6Server93k

compat-libcap1x86_641.10-1Server17k

compat-libstdc++-33x86_643.2.3-69.el6Server183k

cppx86_644.4.6-4.el6Server3.7M

gccx86_644.4.6-4.el6Server10M

gcc-c++x86_644.4.6-4.el6Server4.7M

glibc-develx86_642.12-1.80.el6Server969k

glibc-headersx86_642.12-1.80.el6Server600k

kernel-headersx86_642.6.32-279.el6Server1.9M

kshx86_6420100621-16.el6Server684k

libaio-develx86_640.3.107-10.el6Server13k

libstdc++-develx86_644.4.6-4.el6Server1.5M

mpfrx86_642.4.1-6.el6Server156k

pplx86_640.10.2-11.el6Server1.3M

TransactionSummary

===================================================================================

Install15Package(s)

Totaldownloadsize:26M

Installedsize:61M

Isthisok[y/N]:y

DownloadingPackages:

-----------------------------------------------------------------------------------

Total46MB/s|26MB00:00

Runningrpm_check_debug

RunningTransactionTest

TransactionTestSucceeded

RunningTransaction

Installing:mpfr-2.4.1-6.el6.x86_641/15

Installing:libstdc++-devel-4.4.6-4.el6.x86_642/15

Installing:cpp-4.4.6-4.el6.x86_643/15

Installing:ppl-0.10.2-11.el6.x86_644/15

Installing:cloog-ppl-0.15.7-1.2.el6.x86_645/15

Installing:compat-libstdc++-33-3.2.3-69.el6.x86_646/15

Installing:libaio-devel-0.3.107-10.el6.x86_647/15

Installing:kernel-headers-2.6.32-279.el6.x86_648/15

Installing:glibc-headers-2.12-1.80.el6.x86_649/15

Installing:glibc-devel-2.12-1.80.el6.x86_6410/15

Installing:gcc-4.4.6-4.el6.x86_6411/15

Installing:gcc-c++-4.4.6-4.el6.x86_6412/15

Installing:ksh-20100621-16.el6.x86_6413/15

Installing:compat-libcap1-1.10-1.x86_6414/15

Installing:oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_6415/15

Verifying:compat-libcap1-1.10-1.x86_641/15

Verifying:ksh-20100621-16.el6.x86_642/15

Verifying:kernel-headers-2.6.32-279.el6.x86_643/15

Verifying:glibc-devel-2.12-1.80.el6.x86_644/15

Verifying:libaio-devel-0.3.107-10.el6.x86_645/15

Verifying:gcc-4.4.6-4.el6.x86_646/15

Verifying:oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_647/15

Verifying:gcc-c++-4.4.6-4.el6.x86_648/15

Verifying:libstdc++-devel-4.4.6-4.el6.x86_649/15

Verifying:compat-libstdc++-33-3.2.3-69.el6.x86_6410/15

Verifying:glibc-headers-2.12-1.80.el6.x86_6411/15

Verifying:mpfr-2.4.1-6.el6.x86_6412/15

Verifying:cpp-4.4.6-4.el6.x86_6413/15

Verifying:ppl-0.10.2-11.el6.x86_6414/15

Verifying:cloog-ppl-0.15.7-1.2.el6.x86_6415/15

Installed:

oracle-rdbms-server-11gR2-preinstall.x86_640:1.0-6.el6

DependencyInstalled:

cloog-ppl.x86_640:0.15.7-1.2.el6compat-libcap1.x86_640:1.10-1

compat-libstdc++-33.x86_640:3.2.3-69.el6cpp.x86_640:4.4.6-4.el6

gcc.x86_640:4.4.6-4.el6gcc-c++.x86_640:4.4.6-4.el6

glibc-devel.x86_640:2.12-1.80.el6glibc-headers.x86_640:2.12-1.80.el6

kernel-headers.x86_640:2.6.32-279.el6ksh.x86_640:20100621-16.el6

libaio-devel.x86_640:0.3.107-10.el6libstdc++-devel.x86_640:4.4.6-4.el6

mpfr.x86_640:2.4.1-6.el6ppl.x86_640:0.10.2-11.el6

Complete!

5、查看后台日志中记录的操作内容

#more/var/log/oracle-rdbms-server-11gR2-preinstall/results/orakernel.log

Addinggroupoinstallwithgid54321

Addinggroupdba

Addinguseroraclewithuserid54321,initiallogingroupoinstall,supplementarygroupdbaandhomedirectory/home/oracle

Changingownershipof/home/oracletooracle:oinstall

Pleasesetpasswordfororacleuser

uid=54321(oracle)gid=54321(oinstall)groups=54321(oinstall),54322(dba)

Creatingoracleuserpassed

VerifyingkernelparametersasperOraclerecommendations...

fs.file-max6815744

kernel.sem25032000100128

kernel.shmmni4096

kernel.shmall1073741824

kernel.shmmax4398046511104

net.core.rmem_default262144

net.core.rmem_max4194304

net.core.wmem_default262144

net.core.wmem_max1048576

fs.aio-max-nr1048576

net.ipv4.ip_local_port_range900065500

Settingkernelparametersasperoraclerecommendations...

Alteredfile/etc/sysctl.conf

Originalfilebackedupat/etc/sysctl.conf.orabackup

Verifying&settingofkernelparameterspassed

VerifyingoracleuserOSlimitsasperOraclerecommendations...

oraclesoftnofile1024

oraclehardnofile65536

oraclesoftnproc2047

oraclehardnproc16384

oraclesoftstack10240

oraclehardstack32768

SettingoracleuserOSlimitsasperOraclerecommendations...

Alteredfile/etc/security/limits.conf

Originalfilebackedupat/etc/security/limits.conf.orabackup

Verifying&settingofuserlimitspassed

VerifyingkernelbootparametersasperOraclerecommendations...

oldbootparams:kernel/vmlinuz-2.6.39-200.24.1.el6uek.x86_64roroot=UUID=6d525a20-64f5-48a3-8482-bb7a0ae4f665rd_NO_LUKSrd_NO_LVMLANG=en_US.UTF-8rd_NO_MDSYSFONT=latarcyrheb-sun16KEYBOARDTYPE=pcKEYTABLE=usrd_NO_DMrhgbquiet,newbootparams:kernel/vmlinuz-2.6.39-200.24.1.el6uek.x86_64roroot=UUID=6d525a20-64f5-48a3-8482-bb7a0ae4f665rd_NO_LUKSrd_NO_LVMLANG=en_US.UTF-8rd_NO_MDSYSFONT=latarcyrheb-sun16KEYBOARDTYPE=pcKEYTABLE=usrd_NO_DMrhgbquietnuma=off

@

"/var/log/oracle-rdbms-server-11gR2-preinstall/results/orakernel.log"49L,2772C

Addinggroupoinstallwithgid54321

Addinggroupdba

Addinguseroraclewithuserid54321,54322(dba)

Creatingoracleuserpassed

Addinggroupoinstallwithgid54321

Addinggroupdba

Addinguseroraclewithuserid54321,newbootparams:kernel/vmlinuz-2.6.39-200.24.1.el6uek.x86_64roroot=UUID=6d525a20-64f5-48a3-8482-bb7a0ae4f665rd_NO_LUKSrd_NO_LVMLANG=en_US.UTF-8rd_NO_MDSYSFONT=latarcyrheb-sun16KEYBOARDTYPE=pcKEYTABLE=usrd_NO_DMrhgbquietnuma=off

oldbootparams:kernel/vmlinuz-2.6.32-279.el6.x86_64roroot=UUID=6d525a20-64f5-48a3-8482-bb7a0ae4f665rd_NO_LUKSrd_NO_LVMLANG=en_US.UTF-8rd_NO_MDSYSFONT=latarcyrheb-sun16crashkernel=autoKEYBOARDTYPE=pcKEYTABLE=usrd_NO_DMrhgbquiet,newbootparams:kernel/vmlinuz-2.6.32-279.el6.x86_64roroot=UUID=6d525a20-64f5-48a3-8482-bb7a0ae4f665rd_NO_LUKSrd_NO_LVMLANG=en_US.UTF-8rd_NO_MDSYSFONT=latarcyrheb-sun16crashkernel=autoKEYBOARDTYPE=pcKEYTABLE=usrd_NO_DMrhgbquietnuma=off

Addinggroupdba

Addinguseroraclewithuserid54321,newbootparams:kernel/vmlinuz-2.6.39-200.24.1.el6uek.x86_64roroot=UUID=6d525a20-64f5-48a3-8482-bb7a0ae4f665rd_NO_LUKSrd_NO_LVMLANG=en_US.UTF-8rd_NO_MDSYSFONT=latarcyrheb-sun16KEYBOARDTYPE=pcKEYTABLE=usrd_NO_DMrhgbquietnuma=off

@

@

Addinggroupoinstallwithgid54321

Addinggroupdba

Addinguseroraclewithuserid54321,newbootparams:kernel/vmlinuz-2.6.32-279.el6.x86_64roroot=UUID=6d525a20-64f5-48a3-8482-bb7a0ae4f665rd_NO_LUKSrd_NO_LVMLANG=en_US.UTF-8rd_NO_MDSYSFONT=latarcyrheb-sun16crashkernel=autoKEYBOARDTYPE=pcKEYTABLE=usrd_NO_DMrhgbquietnuma=off

SettingkernelbootparametersasperOraclerecommendations...

Bootparameterswillbeeffectedonnextreboot

Alteredfile/boot/grub/grub.conf

Originalfilebackedupat/boot/grub/grub.conf.orabackup

Verifying&settingofbootparameterspassed

Takingabackupofoldconfigfilesunder/var/log/oracle-rdbms-server-11gR2-preinstall/backup/Jul-07-2014-02-15-51

kernel.shmmax4398046511104

net.core.rmem_default262144

net.core.rmem_max4194304

net.core.wmem_default262144

net.core.wmem_max1048576

fs.aio-max-nr1048576

net.ipv4.ip_local_port_range900065500

Settingkernelparametersasperoraclerecommendations...

Alteredfile/etc/sysctl.conf

Originalfilebackedupat/etc/sysctl.conf.orabackup

Verifying&settingofkernelparameterspassed

VerifyingoracleuserOSlimitsasperOraclerecommendations...

oraclesoftnofile1024

oraclehardnofile65536

oraclesoftnproc2047

oraclehardnproc16384

oraclesoftstack10240

oraclehardstack32768

SettingoracleuserOSlimitsasperOraclerecommendations...

Alteredfile/etc/security/limits.conf

Originalfilebackedupat/etc/security/limits.conf.orabackup

Verifying&settingofuserlimitspassed

VerifyingkernelbootparametersasperOraclerecommendations...

oldbootparams:kernel/vmlinuz-2.6.39-200.24.1.el6uek.x86_64roroot=UUID=6d525a20-64f5-48a3-8482-bb7a0ae4f665rd_NO_LUKSrd_NO_LVMLANG=en_US.UTF-8rd_NO_MDSYSFONT=latarcyrheb-sun16KEYBOARDTYPE=pcKEYTABLE=usrd_NO_DMrhgbquiet,newbootparams:kernel/vmlinuz-2.6.32-279.el6.x86_64roroot=UUID=6d525a20-64f5-48a3-8482-bb7a0ae4f665rd_NO_LUKSrd_NO_LVMLANG=en_US.UTF-8rd_NO_MDSYSFONT=latarcyrheb-sun16crashkernel=autoKEYBOARDTYPE=pcKEYTABLE=usrd_NO_DMrhgbquietnuma=off

SettingkernelbootparametersasperOraclerecommendations...

Bootparameterswillbeeffectedonnextreboot

Alteredfile/boot/grub/grub.conf

Originalfilebackedupat/boot/grub/grub.conf.orabackup

Verifying&settingofbootparameterspassed

Takingabackupofoldconfigfilesunder/var/log/oracle-rdbms-server-11gR2-preinstall/backup/Jul-07-2014-02-15-51

VerifyingkernelparametersasperOraclerecommendations...

fs.file-max6815744

kernel.sem25032000100128

kernel.shmmni4096

kernel.shmall1073741824

kernel.shmmax4398046511104

net.core.rmem_default262144

net.core.rmem_max4194304

net.core.wmem_default262144

net.core.wmem_max1048576

fs.aio-max-nr1048576

net.ipv4.ip_local_port_range900065500

Settingkernelparametersasperoraclerecommendations...

Alteredfile/etc/sysctl.conf

Originalfilebackedupat/etc/sysctl.conf.orabackup

Verifying&settingofkernelparameterspassed

VerifyingoracleuserOSlimitsasperOraclerecommendations...

oraclesoftnofile1024

oraclehardnofile65536

oraclesoftnproc2047

oraclehardnproc16384

oraclesoftstack10240

oraclehardstack32768

SettingoracleuserOSlimitsasperOraclerecommendations...

Alteredfile/etc/security/limits.conf

Originalfilebackedupat/etc/security/limits.conf.orabackup

Verifying&settingofuserlimitspassed

VerifyingkernelbootparametersasperOraclerecommendations...

oldbootparams:kernel/vmlinuz-2.6.39-200.24.1.el6uek.x86_64roroot=UUID=6d525a20-64f5-48a3-8482-bb7a0ae4f665rd_NO_LUKSrd_NO_LVMLANG=en_US.UTF-8rd_NO_MDSYSFONT=latarcyrheb-sun16KEYBOARDTYPE=pcKEYTABLE=usrd_NO_DMrhgbquiet,newbootparams:kernel/vmlinuz-2.6.32-279.el6.x86_64roroot=UUID=6d525a20-64f5-48a3-8482-bb7a0ae4f665rd_NO_LUKSrd_NO_LVMLANG=en_US.UTF-8rd_NO_MDSYSFONT=latarcyrheb-sun16crashkernel=autoKEYBOARDTYPE=pcKEYTABLE=usrd_NO_DMrhgbquietnuma=off

SettingkernelbootparametersasperOraclerecommendations...

Bootparameterswillbeeffectedonnextreboot

Alteredfile/boot/grub/grub.conf

Originalfilebackedupat/boot/grub/grub.conf.orabackup

Verifying&settingofbootparameterspassed

Takingabackupofoldconfigfilesunder/var/log/oracle-rdbms-server-11gR2-preinstall/backup/Jul-07-2014-02-15-51

现在要安装ORACLE11gR2数据库,已是“万事具备,只欠东风”!

本文作者:黎俊杰(网名:踩点),从事”系统架构、操作系统、存储设备、数据库、中间件、应用程序“六个层面系统性的性能优化工作

欢迎加入 系统性能优化专业群,共同探讨性能优化技术。群号:258187244

相关文章

数据库版本:11.2.0.4 RAC(1)问题现象从EM里面可以看到,在23号早上8:45~8:55时,数据库等待会话暴增...
(一)问题背景最近在对一个大约200万行数据的表查看执行计划时,发现存在异常,理论上应该返回100多万...
(一)删除备份--DELETE命令用于删除RMAN备份记录及相应的物理文件。当使用RMAN执行备份操作时,会在RM...
(1)DRA介绍 数据恢复顾问(Data Recovery Advise)是一个诊断和修复数据库的工具,DRA能够修复数据文...
RMAN(Recovery Manager)是Oracle恢复管理器的简称,是集数据库备份(backup)、修复(restore)和恢复...
(1)备份对象 可以使用RMAN进行的备份对象如下: --整个数据库:备份所有的数据文件和控制文件; --数...