Install Oracle 11g in CentOS Linux 7
It’s pretty easy to install any application or software in the Windows operating system but what about Unix/Linux-based systems? Mostly Unix/Linux-based operating systems are built to serve Enterprise or Production applications not intended to serve day-to-day End User tasks. As a result, there is more coding/scripting stuff than automation in the case of installations. Likewise installing Oracle releases in Linux/Unix environment is not straightforward like Windows.
Steps involved:
- First, you should have CentOS Linux 7 installed and have the authentication of user root; this installation is performed in an x86-64-based system.
- Connect to the CentOS Linux 7 by SSH as user root.
- Create a user named Oracle under which the Oracle Software will be installed.
- Open a shell prompt or Terminal if you are not already logged into one.
- Supply the below command to create the Oracle user:
useradd oracle
- Set the password for the oracle user:
passwd oracle
- Create required user groups .
groupadd -g 1011 oinstall groupadd -g 1012 dba groupadd -g 1013 oper
- Add user Oracle to the above-created groups.
usermod -a -G oinstall,dba,oper oracle
- Download the required version, edition, CPU architecture-specific installation files from the Oracle website.
- If you downloaded it to your desktop then transfer the file/s to the installation server by SSH SFTP.
- Login to the oracle user. Move the installation files to the oracle user’s home directory, generally /home/oracle.
- Unzip the content of the downloaded files, below command will extract the files to a directory named database.
unzip linux.x64_11gR2_database_1of2.zip unzip linux.x64_11gR2_database_2of2.zip
- login to the root user.
su - root
- Create the directories for the Oracle software to be installed.
mkdir -p /u01/app/oracle/product/11.2/db_1 chown -R oracle:oinstall /u01 chmod -R 775 /u01
- Set secure Linux to permissive by editing the “/etc/selinux/config” file via Vi editor.
SELINUX=permissive
- Run the following command to take effect.
setenforce Permissive
- Disable the Linux firewall by following the commands.
systemctl stop firewalld systemctl disable firewalld
- Edit the “/etc/hosts” file to contain a fully qualified name for the server.
vi /etc/hosts Example: 192.168.0.147 testbed.localdomain testbed
- Update the Yum repository(optional).
yum update
- Add the following lines in the “/etc/sysctl.conf” file.
fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 536870912 kernel.shmmni = 4096 # semaphores: semmsl, semmns, semopm, semmni kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default=262144 net.core.rmem_max=4194304 net.core.wmem_default=262144 net.core.wmem_max=1048586
- Run the following command to update the kernel.
/sbin/sysctl -p
- Add the following lines to the “/etc/security/limits.conf” file editing via Vi.
oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 4096 oracle hard nofile 65536 oracle soft stack 10240
- Add the following line to the “/etc/pam.d/login” file
session required pam_limits.so
- Install the required packages. See the cpu architecture-based package requirements here.
yum install binutils -y yum install compat-libstdc++-33 -y yum install compat-libstdc++-33.i686 -y yum install gcc -y yum install gcc-c++ -y yum install glibc -y yum install glibc.i686 -y yum install glibc-devel -y yum install glibc-devel.i686 -y yum install ksh -y yum install libgcc -y yum install libgcc.i686 -y yum install libstdc++ -y yum install libstdc++.i686 -y yum install libstdc++-devel -y yum install libstdc++-devel.i686 -y yum install libaio -y yum install libaio.i686 -y yum install libaio-devel -y yum install libaio-devel.i686 -y yum install libXext -y yum install libXext.i686 -y yum install libXtst -y yum install libXtst.i686 -y yum install libX11 -y yum install libX11.i686 -y yum install libXau -y yum install libXau.i686 -y yum install libxcb -y yum install libxcb.i686 -y yum install libXi -y yum install libXi.i686 -y yum install make -y yum install sysstat -y yum install unixODBC -y yum install unixODBC-devel -y yum install zlib-devel -y yum install elfutils-libelf-devel -y
- Set the Oracle environment variable into the oracle user’s .bash_profile file. Let’s say the database we are going to install is named TEST.
# Oracle installation TMP=/tmp; export TMP TMPDIR=$TMP; export TMPDIR ORACLE_HOSTNAME=testbed.localdomain; export ORACLE_HOSTNAME ORACLE_UNQNAME=TEST; export ORACLE_UNQNAME ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/11.2/db_1; export ORACLE_HOME ORACLE_SID=TEST; export ORACLE_SID ORACLE_TERM=xterm; export ORACLE_TERM PATH=/usr/sbin:$PATH; export PATH PATH=$ORACLE_HOME/bin:$PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
- If you are connecting from any SSH client like puTTy then download the Xming server(from here) to facilitate the x11 forwarding work perfectly.
- Start the Xming server on your Windows machine.
- Enable x11 forwarding in SSH clients like puTTy. In some SSH client, you might also need to select the display protocol as xterm-256color. Preferably use puTTY.
- Login to the oracle user.
su - oracle
- set the DISPLAY environmental variable.
DISPLAY=<machine-name>:0.0; export DISPLAY
- Run the Oracle Universal Installer (OUI) by changing the directory in which the files were unzipped.
cd /home/oracle/database ./runInstaller
- Proceed with the installation: During my installation at the Prerequisite Checks phase shown some packages(libaio-0.3.105 (i386), compat-libstdc++-33-3.2.3 (i386), libaio-devel-0.3.105 (i386), libgcc-3.4.6 (i386), libstdc++-3.4.6 (i386), unixODBC-2.2.11 (i386), unixODBC-devel-2.2.11 (i386), pdksh-5.2.14 ) were missing as we installed the updated packages for those. If you encounter such a package missing then check those missing actually or if you have installed the updated one; if you installed the updated one then ignore this. In the case of ‘pdksh’ package, we installed the alternative of it the ‘ksh’ package.
- Note: Click the pictures below to show them in large.
- Configure Security Updates: Don’t select anything. Click ‘Yes’ when shows a warning.

- Installation Option: Select Create and configure a database.

- System Class: Select the Server Class.

- Grid Options: Select single instance database installation.

- Install Type: Select Advance install.

- Select Language: Leave the default as English or select as you required.

- Database Edition: Select the Enterprise Edition or as you required.

- Install Location: Provide the Oracle Base and the Install location as you created earlier.

- Create Inventory: Leave it default.
- Configuration Type: Select General Purpose/Transaction Processing.

- Database Identifiers: Provide the name as TEST.

- Configuration Options: Select the Automatic Memory Management and the Memory you required.

- Management Options: Leave it default.

- Database Storage: Select the File System and specify the database file location where the database files will be stored.

- Backup and Recovery: Leave it default.

- Schema Passwords: Select use the same password, you could change later.

- Operating system Groups: Leave it default.

- Prerequisite checks: See for any package missing if it is not installed at all then install the package and try again; if the updated version of the same package is installed then you can ignore it.

- Summary: Have a look at the summary, if need to change anything go back and edit as required.
- Finish the installation and try to connect to the instance through SQLPlus*.


Comments
Post a Comment