Install Oracle 11G Release 2 (11.2) on Centos Linux 7
This article presents what to install the Oracle 11G on Centos Linux 7.
read following article How to install CentOS Linux 7: install CentOS Linux 7 (for comfort set 2G memory for your vsan before proceeding with Oracle s Oftware installation).
installation software is available on OTN, edelivery version 11.2.0.1 or Oracle support (old Metalink) 11.2.0.4. In this installation I ' m presenting installation for 11.2.0.4 and for previous version 11.2.0.X it shouldn ' t is different.
- Oracle support
- otn:oracle Database 11G Release 2 software (64-bit).
- edelivery:oracle Database 11G Release 2 software (64-bit)
Database software–11.2.0.4
P13390677_112040_linux-x86-64_1of7.zip P13390677_112040_linux-x86-64_2of7.zip
OS Configuration and preparation
OS configuration is executed as root. To login as root just execute following command in terminal.
Su-root
ADD groups
--required groups/usr/sbin/groupadd-g 501 oinstall/usr/sbin/groupadd-g 502 DBA/USR/SBIN/GROUPADD-G 503 oper
ADD User Oracle
/usr/sbin/useradd-u 502-g oinstall-g Dba,oper Oracle
Change Password for user
passwd Oracle
ADD Kernel Parameters to/etc/sysctl.conf
Kernel.shmmni = 4096 Kernel.shmmax = 4398046511104kernel.shmall = 1073741824kernel.sem = + 32000 128fs.aio-max-nr = 1048576fs.file-max = 6815744net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048586
Apply Kernel Parameters
/sbin/sysctl-p
Add following lines to set shell limits for user Oracle in file/etc/security/limits.conf
Oracle Soft nproc 131072oracle hard nproc 131072oracle soft nofile 131072oracle hard nofile 131072oracle soft core unlimitedoracle Hard Core unlimitedoracle soft memlock 50000000oracle hard memlock 50000000
The "/etc/hosts" file must contain a fully qualified name for the server.
<IP-address> <fully-qualified-machine-name> <machine-name>
For example.
127.0.0.1 centos7 centos7.dbaora.com localhost localhost.localdomain
Verify Your network settings
[Email protected] ~]# ping-c 1 centos7ping centos7 (127.0.0.1) (+) bytes of data.64 bytes from Centos7 (127.0.0.1): I Cmp_seq=1 ttl=64 time=0.040 ms---CENTOS7 ping statistics---1 packets transmitted, 1 received, 0% packet loss, time 0MSRT T Min/avg/max/mdev = 0.040/0.040/0.040/0.000 ms
Modify. Bash_profile for user Oracle in his home directory
# Oracle Settingsexport tmp=/tmpexport oracle_hostname=centos7.dbaora.comexport oracle_unqname=ora11gexport ORACLE_ Base=/ora01/app/oracleexport oracle_home= $ORACLE _base/product/11.2.0/db_1export oracle_sid=ora11gpath=/usr/sbin: $PATH: $ORACLE _home/binexport ld_library_path= $ORACLE _home/lib:/lib:/usr/lib;export classpath= $ORACLE _home/jlib:$ Oracle_home/rdbms/jlib;alias cdob= ' cd $ORACLE _base ' Alias cdoh= ' CD $ORACLE _home ' Alias tns= ' CD $ORACLE _home/network/ Admin ' Alias envo= ' env | grep ORACLE ' umask 022
Check which packages is installed and which are missing
Rpm-q--qf '%{name}-%{version}-%{release} (%{arch}) \ n ' binutils elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc Glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make Sysstat UnixODBC Unix Odbc-devel
In my case it returns following
Binutils-2.23.52.0.1-16.el7 (x86_64) ELFUTILS-LIBELF-0.158-3.EL7 (x86_64) package elfutils-libelf-devel are not Installedgcc-4.8.2-16.el7 (x86_64) gcc-c++-4.8.2-16.el7 (x86_64) glibc-2.17-55.el7 (x86_64) glibc-common-2.17-55.el7 (x86_64) Glibc-devel-2.17-55.el7 (x86_64) GLIBC-HEADERS-2.17-55.EL7 (x86_64) package ksh are not INSTALLEDLIBAIO-0.3.109-12.EL7 (x86_64) package Libaio-devel was not INSTALLEDLIBGCC-4.8.2-16.EL7 (x86_64) libstdc++- 4.8.2-16.el7 (x86_64) libstdc++-devel-4.8.2-16.el7 (x86_64) make-3.82-21.el7 (x86_64) sysstat-10.1.5-4.el7 (x86_64) Package UnixODBC are not installedpackage Unixodbc-devel are not installed
missing packages is on Centos 7 installation DVD. The other option if you have connected to the Internet is just use yum install command.
- first Option–just mount DVD and install missing packages using RPM-UVH command from directory <mount dvd>/ Packages.
In my case, the directory is
/run/media/tomasz/centos 7 X86_64/packages
Note–i ' m using x86_64 version of packages
RPM-UVH ELFUTILS-LIBELF-DEVEL*.X86_64.RPMRPM-UVH LIBAIO-DEVEL*.X86_64.RPMRPM-UVH UNIXODBC*.X86_64.RPMRPM-UVH ksh*. x86_64.rpm
- Second option–use Yum Install command
Yum-y Install elfutils-libelf-develyum-y Install libaio-develyum-y install unixodbcyum-y install unixodbc-develyum-y Install Ksh
Create directory Structure
Mkdir-p/ora01/appchown Oracle:oinstall/ora01/appchmod 775/ora01/app
Create oracle_base directory for ORACLE
Mkdir-p/ora01/app/oraclechown Oracle:oinstall/ora01/app/oraclechmod 775/ora01/app/oracle
Create Oracle_home directory for ORACLE
Mkdir-p/ora01/app/oracle/product/11.2.0/db_1chown Oracle:oinstall-r/ora01/app/oracle
Disable secure Linux by editing the '/etc/selinux/config ' file, making sure the SELinux flag is set as follows. It requires REBOOT to be effective!!!
Selinux=permissive
In Centos Linux 7/tmp data are stored on TMPFS which consumes memory and is too small. To revert it back to storage just run following command and REBOOT machine to be effective.
Systemctl Mask Tmp.mount
Install database Software
Let's start with database software installation as Oracle user.
Su-oracle--unzip Software 11.2.0.4unzip p13390677_112040_linux-x86-64_1of7.zipunzip p13390677_112040_linux-x86-64_ 2of7.zip--i defined 4 aliases in. Bash_profile of the user Oracle to make--administration heaven:) [[email protected] ~]$ Ali As Envo cdob Cdoh tnsalias envo= ' env | grep ORACLE ' Alias cdob= ' CD $ORACLE _base ' Alias cdoh= ' CD $ORACLE _home ' Alias tns= ' CD $ORACLE _home/network/admin '--run Alias command Envo to display environment settingsenvooracle_unqname=ora11goracle_sid=ora11goracle_base=/ora01/app/ Oracleoracle_hostname=centos7.dbaora.comoracle_home=/ora01/app/oracle/product/11.2.0/db_1--run alias Command Cdob and Cdoh to check oracle_base, oracle_home [[email protected] ~]$ cdob[[email protected] oracle]$ Pwd/ora01/app/oracle[[em AIL protected] db_1]$ cdoh[[email protected] db_1]$ Pwd/ora01/app/oracle/product/11.2.0/db_1--run installation from Install Directory./runinstall
Install Oracle 11G Release 2 (11.2) on Centos Linux 7