手抄报 安全手抄报 手抄报内容 手抄报图片 英语手抄报 清明节手抄报 节约用水手抄报

Oracle 11g 静默安装过程(centos7)

时间:2024-10-13 09:47:22

1、开启机器,本次实例分配的ip是:192.168.3.197(Xshell ssh连接)

Oracle 11g 静默安装过程(centos7)

2、安装unzip 工具、vim编辑器(个人习惯,vi也可以)

Oracle 11g 静默安装过程(centos7)

3、在/etc/hosts文件中添加本机IP跟主机名

Oracle 11g 静默安装过程(centos7)

4、关闭selinux ,编辑 /etc/selinux/config文件,设置SELINUX= enforcing 为SELINUX=disabled

Oracle 11g 静默安装过程(centos7)

5、关闭防火墙(1)查看防火墙状态:systemctl status firewalld(2)停止防火墙:systemctl stop firewalld(3)关闭自启动防火墙服务:systemctl disable firewalld

Oracle 11g 静默安装过程(centos7)

6、安装Oracle 11g依赖包[root@woitumi-197 ~]# yum -y instal造婷用痃l gcc make binutils gcc-c++ compat-libstdc++-33 elfutils-libelf-devel elfutils-libelf-devel-static elfutils-libelf-devel ksh libaio libaio-devel numactl-devel sysstat unixODBC unixODBC-devel pcre-devel

Oracle 11g 静默安装过程(centos7)

7、添加oinstall 、dba 组,新建oracle用户并加入oinstall、dba组中;设置oracle用户登录密码;查看Oracle用户信息

Oracle 11g 静默安装过程(centos7)
Oracle 11g 静默安装过程(centos7)
Oracle 11g 静默安装过程(centos7)

8、修改内核参数:编辑 /etc/衡痕贤伎sysctl.conf添加以下设置:io-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 2097152kernel.shmmax = 1073741824kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576让参数生效:sysctl –p

Oracle 11g 静默安装过程(centos7)
Oracle 11g 静默安装过程(centos7)

9、修改用户的限制文件,编辑 /etc/security/limits.conf添加以下配置:oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536oracle soft stack 10240

Oracle 11g 静默安装过程(centos7)

10、修改/etc/pam.d/login文件,添加:session required /lib64/security/pam_limits.sosession required pam_limits.so

Oracle 11g 静默安装过程(centos7)

11、修改/etc/profile文件:[root@woitumi-197 ~]# vim /etc/profile添加:if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fifi

Oracle 11g 静默安装过程(centos7)

12、创建安装目录、修改文件权限[root@woitumi-197 ~]# mkdir -p /u01/app/oracle/product/11.2.0[root@woitumi-197 ~]# 罪焐芡拂mkdir /u01/app/oracle/oradata[root@woitumi-197 ~]# mkdir /u01/app/oracle/inventory[root@woitumi-197 ~]# mkdir /u01/app/oracle/fast_recovery_area[root@woitumi-197 ~]# chown -R oracle:oinstall /u01/app/oracle[root@woitumi-197 ~]# chmod -R 775 /u01/app/oracle

Oracle 11g 静默安装过程(centos7)

13、上传oracle软件包到 /tmp目录下(xftp上传)

Oracle 11g 静默安装过程(centos7)

14、解压oracle软件包:[root@woitumi-197 tmp]# unzip linux.x64_11gR2_database_1of2.zip && unzip linux.x64_11gR2_database_2of2.zip

Oracle 11g 静默安装过程(centos7)

15、切换到oracle用户,设置oracle用户环境筐毙险裆变量[root@woitumi-197 database]# su - oracle[oracle@woitumi-197 ~]$ vim .bash_profile添加:ORACLE_BASE=/u01/app/oracleORACLE_HOME=$ORACLE_BASE/product/11.2.0ORACLE_SID=orclPATH=$PATH:$ORACLE_HOME/binexport ORACLE_BASE ORACLE_HOME ORACLE_SID PATH

Oracle 11g 静默安装过程(centos7)

16、编辑静默安装响应文件(1)切换到root 用户进入oracle安装包解压后的目袄嬖艽蛞录 /tmp/database/response/下备份db_足毂忍珩install.rsp文件。(2)编辑 /tmp/database/response/db_install.rsp文件[root@woitumi-197 response]# vim db_install.rsp修改以下参数:oracle.install.option=INSTALL_DB_SWONLYORACLE_HOSTNAME=woitumi-197UNIX_GROUP_NAME=oinstallINVENTORY_LOCATION=/u01/app/oracle/inventorySELECTED_LANGUAGES=en,zh_CNORACLE_HOME=/u01/app/oracle/product/11.2.0ORACLE_BASE=/u01/app/oracleoracle.install.db.InstallEdition=EEoracle.install.db.DBA_GROUP=dbaoracle.install.db.OPER_GROUP=dbaDECLINE_SECURITY_UPDATES=true

Oracle 11g 静默安装过程(centos7)

17、根据响应文件安装oracle 11g[oracle@woitumi-197 database]$ ./runInstaller -silent -ignorePrereq -ignoreSysPrereqs -responseFile /tmp/database/response/db_install.rsp

Oracle 11g 静默安装过程(centos7)

18、开始Oracle在后台静默安装。安装过程中,如果提示[WARNIN蘅荫酸圉G]不必理会,此时安装程序仍在后台进行,如果出现[FATAL],则安装程序已经滢陈錾饶停止了。出现以上界面,说明安装程序已在后台运行,此时再打开另外一个终端选项卡,输入提示的会话日志目录:[root@woitumi-197 ~]# tail –f /u01/app/oracle/inventory/logs/installActions2017-06-09_03-00-09PM.log看到日志文件会持续输出安装信息没有输入异常信息,则表明安装过程正常。

Oracle 11g 静默安装过程(centos7)

19、待看到下图红色框部分,则表明安装已经完成

Oracle 11g 静默安装过程(centos7)

20、按照提示切换root用户运行脚本[oracle@woitumi-197 database]$ su[root@woitumi-197 database]# sh /u01/app/oracle/inventory/orainstRoot.sh[root@woitumi-197 database]# sh /u01/app/oracle/product/11.2.0/root.sh

Oracle 11g 静默安装过程(centos7)

21、用oracle用户登录配置监听[oracle@woitumi-197 ~]$ netca -silent -responseFile /tmp/database/response/netca.rsp

Oracle 11g 静默安装过程(centos7)

22、出现下图情况时,则需要配置DISPLAY变量,配完之后重新netca:[oracle@woitumi-197 ~]$ export DISPLAY=localhost:0.0

Oracle 11g 静默安装过程(centos7)
Oracle 11g 静默安装过程(centos7)

23、成功运行后,会在/u01/app/oracle/product/11.2.0/network/admin/ 中生成listener.ora和sqlnet.ora两个文件。查看监听端口:[root@woitumi-197 admin]# netstat -tnulp | grep 1521

Oracle 11g 静默安装过程(centos7)
Oracle 11g 静默安装过程(centos7)

24、建立新库,同时建立对应的实例切换到root用户,编辑 /tmp/database/response/dbca.rsp修改以下参数:GDBNAME = "orcl"SID = "orcl"SYSPASSWORD = "oracle"SYSTEMPASSWORD = "oracle"SYSMANPASSWORD = "oracle"DBSNMPPASSWORD = "oracle"DATAFILEDESTINATION =/u01/app/oracle/oradataRECOVERYAREADESTINATION=/u01/app/oracle/fast_recovery_areaCHARACTERSET = "ZHS16GBK"TOTALMEMORY = "1638"

25、进行静默配置root@woitumi-197 oracle]# su - oracle[oracle@woitumi-197 ~]$ dbca -silent -responseFile /tmp/database/response/dbca.rsp

Oracle 11g 静默安装过程(centos7)

26、完成建库后进行实例检查[oracle@woitumi-197 ~]$ ps -ef | grep ora_ | grep -v grep

Oracle 11g 静默安装过程(centos7)

27、查看监听状态[oracle@woitumi-197 ~]$ lsnrctl status

Oracle 11g 静默安装过程(centos7)

28、登录查看实例状态[oracle@woitumi-197 dbs]$ sqlplus / as sysdba启动数据库:SQL> startup看到以下信息,,表明数据库实例已经启动成功,至此,oracle 11g静默安装完成结束。

Oracle 11g 静默安装过程(centos7)

29、如果SQL> startup之后报LRM-00109错则需要cd /u01/app/oracle/admin/orcl/pfile到目录下,把init.ora.59201719540文件cp到/u01/app/oracle/product/11.2.0/dbs/initorcl.ora解决方法参考:http://yesican.blog.51cto.com/700694/471052

Oracle 11g 静默安装过程(centos7)

30、若遇到SQL> startup之后报LRM-01102错可以尝试重启机器得到解决,重启后还是一样则可以参考:http://blog.csdn.net/lzwgood/article/details/26368323或者借助搜索引擎搜索。

© 手抄报圈