Oracle12c _ installation 1 -- Preparation and oracle12c preparation
1. Recommended users and groups
Su root # Switch to rootgroupadd oinstall # create user group oinstallgroupadd dba # create user group dbauseradd-g oinstall-g dba-m oracle # create oracle user, and add it to the oinstall and dba user group passwd oracle # Set the logon password of the user oracle. If no password is set, you cannot log on to the CentOS graphic logon interface. Remarks: password: sjtsoft123id oracle # view the newly created oracle user
2. Create an oracle Installation Directory
[Root @ Node1 ~] # Su-oracle last login: April 8, December 29 08:50:41 CST primary pts/0 [oracle @ Node1 ~] $ Mkdir app # oracle database installation directory [oracle @ Node1 ~] $ Mkdir database # decompress the oracle database package 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 the 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 -- nodeps -- force installation to exclude dependencies ).
6. Disable the Firewall
Service iptables stop
(Note: Centos7:
Disable 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
7Disable selinux
[root@Node1 app]# sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config [root@Node1 app]# setenforce 0
8. Modify Kernel Parameters
Enter the editing status: vi/etc/sysctl. conf
Add the following code at the end:
Net. ipv4.icmp _ echo_ignore_broadcasts = 1net. ipv4.conf. all. rp_filter = 1fs. file-max = 6815744 # set the maximum number of open files fs. aio-max-nr = 1048576 kernel. shmall = 1887436 # Total shared memory, 8 GB memory setting: 2097152*4 k/1024/1024 memory * 90% * 1024*1024*1024 * Memory 4096kernel. shmmax = 7730941132 # maximum shared memory segment size (maximum shared memory 2 GB) memory * 90% * 1024*1024 * 1024kernel. shmmni = 4096 # maximum number of kernel shared memory in the entire system. sem = 250 32000 100. net. ipv4.ip _ local_port_range = 9000 65500 # available IPv4 port range. net. core. rmem_default = 262144net. core. rmem_max = 4192134net. core. wmem_default = 262144net. core. wmem_max= 1048576
Save and exit.
Make the configuration parameters take effect immediately: sysctl-p
7. set restrictions on oracle users to improve software running performance
Enter the 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 2047oracle hard nproc 16384oracle soft nofile 1024oracle 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" ]; thenif [ $SHELL = "/bin/ksh" ]; thenulimit -p 16384ulimit -n 65536elseulimit -u 16384 -n 65536fifi
8. Configure the user's Environment Variables
Enter the editing status: vim/home/oracle/. bash_profile (vim ~ /. Bash_profile)
Concise:
Export PATHexport ORACLE_SID = gnssexport ORACLE_BASE =/home/oracle/app # oracle database installation directory export ORACLE_HOME = $ ORACLE_BASE/product/11.2.0/db_1export PATH = $ ORACLE_HOME/bin: $ PATH
Save and exit.
Make the preceding configuration take effect immediately: source/home/oracle/. bash_profile
This is all you need to prepare for installation.