1. Suggest users and groups
su root #Switch to root groupadd oinstall #Create user group oinstall groupadd dba #Create user group dba useradd -g oinstall -g dba -m oracle #Create oracle users and join oinstall and dba user groups passwd oracle #Set the login password of the user oracle, do not set the password, unable to login in the graphic login interface of CentOS //Note: Password: Sjtsoft123 id oracle # View new oracle users
2. Create oracle installation directory
[root@Node1 ~]# su - oracle //Last login: may / December 29 08:50:41 CST 2017pts/0 upper [oracle@Node1 ~]$ mkdir app #oracle database installation directory [oracle@Node1 ~]$ mkdir database #oracle database software package decompression directory [oracle@Node1 ~]$ mkdir -p app/oradata [oracle@Node1 ~]$ mkdir -p app/fast_recovery_area
ls ා check after creation
3. Unzip the installation package
[oracle@Node1 softwares]$ unzip linuxx64_12201_database.zip -d /home/oracle/database/
[oracle@Node1 softwares]$ unzip oracle11grpmlinux.zip -d .
4. Folder authorization
[root@Node1 app]# chown -R oracle:oinstall /home/oracle/database/database/ [root@Node1 app]# chown -R oracle:oinstall /home/oracle/app/oradata/ [root@Node1 app]# chown -R oracle:oinstall /home/oracle/app/fast_recovery_area/
5. Install dependency package
yum is the most convenient to install:
[root@Node1 app]# yum install gcc* gcc-* gcc-c++-* glibc-devel-* glibc-headers-* compat-libstdc* libstdc* elfutils-libelf-devel* libaio-devel* sysstat* unixODBC-* pdksh-*
Or rpm installation (rpm - uvh. / *. rpm -- nodes -- force installation, excluding dependency).
6. Turn off the firewall
service iptables stop
(Note: Centos7:
Turn off the firewall: systemctl stop firewalld.service
Disable firewall: systemctl disable firewalld.service)
[root@Node1 app]# systemctl stop firewalld.service
[root@Node1 app]# systemctl disable firewalld.service
7. Close selinux
[root@Node1 app]# sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config [root@Node1 app]# setenforce 0
8. Modify kernel parameters
Enter editing status: vi /etc/sysctl.conf
Add the following code at the end:
net.ipv4.icmp_echo_ignore_broadcasts = 1 net.ipv4.conf.all.rp_filter = 1 fs.file-max = 6815744 #Set the maximum number of open files fs.aio-max-nr = 1048576 kernel.shmall = 1887436 #Total shared memory, 8 G Memory settings:2097152*4k/1024/1024 Memory*90%*1024*1024*1024÷4096 kernel.shmmax = 7730941132#Segment size of maximum shared memory (maximum shared memory 2 GB ) Memory*90%*1024*1024*1024 kernel.shmmni = 4096 #Maximum number of shared memory terminals in the whole system kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 #Available IPv4 port ranges net.core.rmem_default = 262144 net.core.rmem_max= 4194304 net.core.wmem_default= 262144 net.core.wmem_max= 1048576
Save and exit.
Make configuration parameters effective immediately: sysctl -p
7. Set restrictions on oracle users to improve software performance
Enter editing status: vim /etc/security/limits.conf
Find the last line ා End of file, and add the following code in the blank line above it:
oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536
# vi /etc/pam.d/login (add or modify the following parameters at the end of the file) session required pam_limits.so
#vi /etc/profile (add or modify the following script at the end of the file)
if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi
8. Configure environment variables for users
Enter editing status: vim /home/oracle/.bash_profile (vim ~/.bash_profile)
Simplicity:
export PATH export ORACLE_SID=gnss export ORACLE_BASE=/home/oracle/app #oracle database installation directory export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1 export PATH=$ORACLE_HOME/bin:$PATH
Save and exit.
Make the above configuration take effect immediately: source / home / Oracle /. Bash_
This is all the preparation work. Next, prepare to install.