I. Hardware Detection
1. Memory detection Oracle11g requires a minimum of 1 GB memory
Command: grep MemTotal/proc/meninfo
2. swap space detection usually has 1.5 times of swap space
Command: grep SwapTotal/proc/meninfo
3. temporary directory/temp check
Command: df-k/temp
Ii. configuration process
1. Create users and user groups
[Root @ www.bkjia.com] #/usr/sbin/groupadd oinstall
[Root @ www.bkjia.com] #/usr/sbin/groupadd dba
Create an Oracle user and password, and enter the following command:
[Root @ www.bkjia.com] #/usr/sbin/useradd-g oinstall-g dba-m oracle
[Root @ www.bkjia.com] # passwd oracle
2. Create a database software directory and a data file storage directory
Mkdir/home/oracle/app
Mkdir/home/oracle/app/oracle
Mkdir/home/oracle/app/oradata
Mkdir/home/oracle/app/oracle/product
Change the directory owner to an Oracle user
Chown-R oracle: oinstall/home/oracle/app
3. Modify the user's SHELL restrictions
Modify the/etc/security/limits. conf file
Enter the command vi/etc/security/limits. conf, press the I key to enter the editing mode, and add the following content to the file.
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
After editing, Press Esc and enter ": wq" to save the disk and exit.
Modify the/etc/pam. d/login file, enter the command: vi/etc/pam. d/login, press the I key to enter the edit mode, and add the following content to the file.
Session required/lib/security/pam_limits.so
Session required pam_limits.so
Edit/etc/profile, enter the command vi/etc/profile, press the I key to enter the editing mode, and add the following content to 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
4. Modify the Linux kernel and the/etc/sysctl. conf file.
Enter the command vi/etc/sysctl. conf, press the I key to enter the editing mode, and add the following content to the file
Parts
Fs. file-max = 6815744
Fs. aio-max-nr = 1048576
Kernel. shmall = 2097152
Kernel. shmmax = 2147483648
Kernel. shmmni = 4096
Kernel. sem = 250 32000 100 128
Net. ipv4.ip _ local_port_range = 9000 65500
Net. core. rmem_default = 4194304
Net. core. rmem_max = 4194304
Net. core. wmem_default = 262144
Net. core. wmem_max = 1048576
To make the/etc/sysctl. conf change take effect immediately, run the following command:
[Root @ www.bkjia.com] #/sbin/sysctl-p
5. Configure oracle user environment variables
First, switch to the newly created oracle user,
Input: su-oracle, and then directly enter: vi. bash_profile
Press I to edit. bash_profile, enter the editing mode, and add the following content:
Umask 022
Export ORACLE_BASE =/home/oracle/app
Export ORACLE_HOME = $ ORACLE_BASE/oracle/product/11.2.0/dbhome_1
Export ORACLE_SID = orcl
Export PATH = $ PATH: $ HOME/bin: $ ORACLE_HOME/bin
Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib
After editing, Press Esc and enter ": wq" to save the disk and exit.