当前位置:数据库 > Oracle >>

redhat6.2静默安装oracle11gr2

redhat6.2静默安装oracle11gr2
 
1.创建用户组和用户
#groupadd oinstall
 
#groupadd dba
 
#useradd -g oinstall -G dba -d/oracle oracle ---------------创建oracle用户,默认家目录为oracle
 
#passwd oracle
 
2.配置环境变量
#su - oracle
 
$vi .bash_profile
 
添加如下变量:
 
ORACLE_SID=orcl
 
ORACLE_BASE=/oracle/app/oracle
 
ORACLE_HOME=/oracle/app/oracle/product/11.2.0/dbhome_1
 
PATH=$ORACLE_HOME/bin:$PATH
 
export ORACLE_SID ORACLE_BASEORACLE_HOME PATH ----------------使这些变量成为环境变量
 
stth erase ^h ----------------这个是使回头进入到sqlplus后可以使用返回键
 
保存后执行下面命令使其生效
 
$source .bash_profile
 
$env | grep ORA-------------查看是否生效
 
3.修改内核参数sysctl.conf文件
# vi /etc/sysctl.conf
 
添加如下参数:
 
fs.aio-max-nr = 1048576
 
fs.file-max = 6815744
 
kernel.shmall = 2097152
 
kernel.shmmax = 536870912
 
kernel.shmmni = 4096
 
kernel.sem = 250 32000 100 128
 
net.ipv4.ip_local_port_range = 9000 65500
 
net.core.rmem_default = 262144
 
net.core.rmem_max = 4194304
 
net.core.wmem_default = 262144
 
net.core.wmem_max = 1048576
 
使生效
 
#sysctl -t
 
4.修改文件/etc/security/limits.conf
添加如下参数:
 
oracle             soft    nproc   2047
 
oracle             hard    nproc   16384
 
oracle             soft    nofile  1024
 
oracle             hard    nofile  65536
 
oracle             soft    stack   10240
 
5.安装oracle所需安装包
 
The following or later version of packages for Oracle Linux 6, and Red Hat Enterprise Linux 6must be installed:
 
binutils-2.20.51.0.2-5.11.el6(x86_64)
compat-libcap1-1.10-1 (x86_64)
compat-libstdc++-33-3.2.3-69.el6(x86_64)
compat-libstdc++-33-3.2.3-69.el6.i686
gcc-4.4.4-13.el6 (x86_64)
gcc-c++-4.4.4-13.el6 (x86_64)
glibc-2.12-1.7.el6 (i686)
glibc-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6(x86_64)
glibc-devel-2.12-1.7.el6.i686
ksh
libgcc-4.4.4-13.el6 (i686)
libgcc-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6.i686
libstdc++-devel-4.4.4-13.el6(x86_64)
libstdc++-devel-4.4.4-13.el6.i686
libaio-0.3.107-10.el6(x86_64)
libaio-0.3.107-10.el6.i686
libaio-devel-0.3.107-10.el6(x86_64)
libaio-devel-0.3.107-10.el6.i686
make-3.81-19.el6
sysstat-9.0.4-11.el6 (x86_64)
 
其他软件所需包,不是必须的但建议一块安装
 
Oracle ODBC Drivers包:
 
 
 
On OracleLinux 6 and Red Hat Enterprise Linux 6:
 
unixODBC-2.2.14-11.el6     (x86_64)or later
unixODBC-2.2.14-11.el6.i686or later
unixODBC-devel-2.2.14-11.el6     (x86_64)or later
unixODBC-devel-2.2.14-11.el6.i686or later
安装命令:
 
#rpm -ivf *.rpm --force --nodeps ----------如果有些包安装不上就加上后边的两个参数进行强制安装
 
#rpm -evf *.rpm --nodeps -----------强制卸载rpm
 
 
 
6.创建安装目录
#mkdir -p /u01/app/oracle
 
#chown -R oracle.oinstall /u01    ----修改文件的用户和属组
 
 
 
7.开始静默安装oracle11gr2
说明:
 
db_install.rsp文件在oracle安装文件中是自带的:/database/response下边有三个文件分别是
 
:db_install---数据库软件安装配置文件,如果使用这个需要手动配置,但是也可以使用图形界面安装一遍后保   存一个这样的配置文件共以后使用
 
:netca.rsp ---这个是配置监听的,可以直接使用
 
:dbca.rsp ---这个是创建database的,必须手动配置
 
 
 
(1)oracle软件静默安装
db_install.rsp配置
 
执行命令:
 
命令:$./runInstaller-silent -noconfig -force -responseFile /oracle/install/db_install.rsp
 
参数:-silent---指oracle采用静默安装
 
-noconfig---指oracle安装过程中不创建database
 
-force---遇到非空目录也强制安装
 
-responseFile---指定应答文件路径(注意后边路径一定是绝对路径)
 
安装启动:
 
[oracle@oracle11database]$ ./runInstaller -silent -noconfig -force -responseFile/media/database/response/db_install.rsp
 
Starting OracleUniversal Installer...
 
 
 
Checking Temp space:must be greater than 120 MB.   Actual15657 MB    Passed
 
Checking swap space:must be greater than 150 MB.   Actual4031 MB    Passed
 
Preparing to launchOracle Universal Installer from /tmp/OraInstall2013-10-22_12-04-07PM. Pleasewait ...[oracle@oracle11 database]$ [WARNING] [INS-13014] Target environment donot meet some optional requirements.
 
   CAUSE: Some of the optional prerequisitesare not met. See logs for details./tmp/OraInstall2013-10-22_12-04-07PM/installActions2013-10-22_12-04-07PM.log
 
   ACTION: Identify the list of failedprerequisite checks from the log:/tmp/OraInstall2013-10-22_12-04-07PM/installActions2013-10-22_12-04-07PM.log.Then either from the log file or from installation manual find the appropriateconfiguration to meet the prerequisites and fix it manually.
 
[WARNING][INS-13014] Target environment do not meet some optional requirements.
 
   CAUSE: Some of the optional prerequisitesare not met. See logs for details./tmp/OraInstall2013-10-22_12-04-07PM/installActions2013-10-22_12-04-07PM.log
 
   ACTION: Identify the list of failedprerequisite checks from the log:/tmp/OraInstall2013-10-22_12-04-07PM/installActions2013-10-22_12-04-07PM.log.Then either from the log file or from installation manual find the appropriateconfiguration to meet the prerequisites and fix it manually.
 
You can find the logof this install session at:
 
 /u01/app/oraInventory/logs/installActions2013-10-22_12-04-07PM.log
 
-----------------------------------------------------------
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,