1. 程式人生 > 資料庫 >【Oracle Database】install oracle database 11.2.0.4 on centos 7.5

【Oracle Database】install oracle database 11.2.0.4 on centos 7.5

[root@wallet01 ~]# yum -y install gcc gcc-c++ make sysstat ksh \
binutils elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static \
glibc glibc-common glibc-devel glibc-headers \
libaio libaio-devel libstdc++ libstdc++-devel unixODBC unixODBC-devel compat-libcap1 libXext

[root@wallet01 ~]# yum -y install compat-libstdc++*

[root@wallet01 ~]# groupadd oinstall
[root@wallet01 ~]# groupadd dba
[root@wallet01 ~]# useradd -g oinstall -G dba oracle
[root@wallet01 ~]# echo oracle | passwd --stdin oracle
Changing password for user oracle.
passwd: all authentication tokens updated successfully.

[root@wallet01 ~]# cat >> /etc/sysctl.conf <<EOF
kernel.shmmni = 4096
fs.aio-max-nr = 1048576
fs.file-max = 6815744
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
EOF
[root@wallet01 ~]# sysctl -p

[root@wallet01 ~]# cat >> /etc/security/limits.conf <<EOF
oracle              soft    nproc   16384
oracle              hard    nproc   16384
oracle              soft    nofile  4096
oracle              hard    nofile  65536
oracle              soft    stack   10240
EOF

[root@wallet01 ~]# cat >> /etc/pam.d/login <<EOF
session    required     pam_limits.so
EOF

[root@wallet01 ~]# cat >> /etc/profile <<EOF
if [ $USER = "oracle" ]; then
        if [ $SHELL = "/bin/ksh" ]; then
              ulimit -p 16384
              ulimit -n 65536
        else
              ulimit -u 16384 -n 65536
        fi
fi
EOF

[root@wallet01 ~]# mkdir -p /u01/app/oracle
[root@wallet01 ~]# chown -R oracle:oinstall /u01/app
[root@wallet01 ~]# chmod -R 775 /u01/app

[root@wallet01 ~]# su - oracle
[oracle@wallet01 ~]$ vi .bash_profile 
export ORACLE_SID=wallet
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export DISPLAY=192.168.1.200:0
stty erase ^H

[oracle@wallet01 ~]$ source .bash_profile

[oracle@wallet01 ~]$ unzip p13390677_112040_Linux-x86-64_1of7.zip 
[oracle@wallet01 ~]$ unzip p13390677_112040_Linux-x86-64_2of7.zip

[oracle@wallet01 ~]$ vim database/stage/cvu/cv/admin/cvu_config
change CV_ASSUME_DISTID=OEL4 to CV_ASSUME_DISTID=OEL6

[oracle@wallet01 ~]$ cd database
[oracle@wallet01 database]$ ./runInstaller

[oracle@wallet01 ~]$ vim /u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk
change
$(SYSMANBIN)emdctl:
        $(MK_EMAGENT_NMECTL)
to		
$(SYSMANBIN)emdctl:
        $(MK_EMAGENT_NMECTL) -lnnz11