Installation environment
Linux Server: SUSE10 sp2 64-bit
Oracle Server: Oracle11gR2 64-bit
System Requirements
- Requirements for installing Oracle in Linux
System Requirements |
Description |
Memory |
Physical memory must be higher than 1 GB |
Swap space |
Generally, it is twice the memory size. For example, you can set the swap partition size to 3 GB for 1 GB memory. |
Hard Disk |
5G or above |
2. Modify core operating system parameters
Perform the following steps under the Root user:
1) modify the user's SHELL restrictions and modify the/etc/security/limits. conf file
Run vi/etc/security/limits. conf and pressIEnter 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.
2) modify the/etc/pam. d/login file and enter the following command:Vi/etc/pam. d/login, PressIEnter the editing mode and add the following content to the file.
Session required/lib/security/pam_limits.so Session required pam_limits.so |
After editing, Press Esc and enter ": wq" to save the disk and exit.
3) modify the Linux kernel, modify the/etc/sysctl. conf file, and enter the following command:Vi/etc/sysctl. conf, PressIKey to enter the editing mode, add the following content to the file
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 |
After editing, Press Esc and enter ": wq" to save the disk and exit.
4) to make the/etc/sysctl. conf change take effect immediately, run the following command. Input:Sysctl-pShown as follows:
Linux :~ # Sysctl-p Net. ipv4.icmp _ echo_ignore_broadcasts = 1 Net. ipv4.conf. all. rp_filter = 1 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 |
5) edit/etc/profile and enter the following command:Vi/etc/profile, PressIEnter 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 |
After editing, Press Esc and enter ": wq" to save the disk and exit.
6) Create related users and groups as owners of software installation and support groups.
Create a user and enter the following command: Groupadd oinstall Groupadd dba Create an Oracle user and password, and enter the following command: Useradd-g oinstall-g dba-m oracle Passwd oracle The password will be entered twice, but the password must be consistent. Press enter to confirm. |
7) Create a database software directory, a data file storage directory, and a directory location based on your needs. Pay attention to the disk space. Here I will put it under the oracle user, for example:
Enter the following command: Mkdir/home/oracle/app Mkdir/home/oracle/app/oracle Mkdir/home/oracle/app/oradata Mkdir/home/oracle/app/oracle/product |
8) change the directory owner to be owned by an Oracle user and enter the following command:
Chown-R oracle: oinstall/home/oracle/app |
9) configure the environment variables of oracle users. First, switch to the newly created oracle user,
Input:Su-oracleAnd then directly enter:Vi. bash_profile
PressIEdit. bash_profile to 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.