Installing Oracle 11g R2 in Linux
I. installation environment
Linux Server: CentOS 6.4 64-bit
Oracle Server: Oracle 11gR2 64-bit
Ii. 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
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.
1234 |
oracle soft nproc 2047 oracle 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 command: vi/etc/pam. d/login,
Press the I key to enter the editing mode and add the following content to the file.
12 |
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 command vi/etc/sysctl. conf,
Press the I key to enter the editing mode and add the following content to the file.
1234567891011 |
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-p:
1234567891011121314 |
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 command: vi/etc/profile,
Press the I key to enter the editing mode and add the following content to the file.
12345678 |
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.
1234567891011 |
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 Then you will be asked to enter the password and the password will be input at will. 2 Times, but 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 put it under the oracle user, for example:
123456 |
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:
1 |
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-oracle, and then directly enter: vi. bash_profile
Press I to edit. bash_profile, enter the editing mode, and add the following content:
1234567 |
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 ( 32 Bit System) export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib64 ( 64 Bit System) 2 Select 1 Yo |
After editing, Press Esc and enter ": wq" to save the disk and exit. source. bash_profile will take effect immediately!
3. Install and install the software on which Oracle depends
1. Install YUM
1 |
yum -y install binutils compat-libstdc++- 33 elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc gcc-c++ libaio-devel libaio libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel pdksh numactl-devel glibc-headers |
2. pdksh-5.2.14
Download pdksh-5.2.14
Download from the help house resource station:
------------------------------------------ Split line ------------------------------------------
Free in http://linux.bkjia.com/
The username and password are both www.bkjia.com
The specific download directory is in/July 6, 2016,/July 6, June,/Linux installation of Oracle 11g R2/
For the download method, see
------------------------------------------ Split line ------------------------------------------
Unzip: unzip pdksh-5.2.14.zip
32-bit or 64-bit installation depends on the system.
1 |
rmp –ivh pdksh- 5.2 . 14 - 30 .x86_64.rpm |
Iv. Installation Process
1) After all the required operations are completed, log out of the system and log in as an Oracle user on the graphic interface. First, copy the downloaded Oracle Installation Package to linux,
We recommend that you use Xmanager or other ftp tools to copy the created/home/oracle/directory.
Open a terminal and run the unzip command to decompress the oracle Installation File, for example:
123 |
Enter the following command: unzip linux.x64_11gR2_database_1of2.zip unzip linux.x64_11gR2_database_2of2.zip |
After decompression, cd enters the decompressed directory/home/oracle/database. The files are extracted and merged.
12 |
Enter the following command: cd database |
Run the ls command to view the files contained in the decompressed database, for example:
2) execute the installation and execute the following statements to bring up the interface.
1234 |
su - root xhost + su - oracle ./runInstaller |
Select install database soft only
Select single instance database installation
Select language
Select Enterprise edition
If you do not install the software that Oracle depends on and install it, it will appear. If it does not appear after installation.
Next finish
After the installation is complete, the system prompts you to use the root permission to execute two shell scripts. (Do not close the pop-up window) follow the prompt path to find its location,
For example, in/home/oracle/app/oracle/product/11.2.0/dbhome_1/root. sh
And/home/oracle/app/oraInventory/orainstRoot. sh to open a new terminal, enter the command:
123 |
su – root cd /home/oracle/app/oracle/product/ 11.2 . 0 /dbhome_1 sh root.sh |
12 |
cd /home/oracle/app/oraInventory sh orainstRoot.sh |
For more details, please continue to read the highlights on the next page: