oracle installation and visit [3] to install oracle 11g in CentOS7

Keywords: Oracle Database glibc SELinux

After understanding the installation of Oracle 10g and 11g in win10, this article will cover the installation of Oracle 11g in CentOS 7.

1. Preconditions

  • CentOS7 workstation installed
  • jdk8 has been installed

2. Software download

Baidu SkyDrive
Links: https://pan.baidu.com/s/1u3Qjguim-7Z-4GoHDF8Pxg
Extraction code: gwig

3. Command line operation

  • Log in to the server as root and open the terminal
  • Create group, user, set password
groupadd oinstall             #Create user group oinstall
groupadd dba                   #Create user group dba
useradd -g oinstall -g dba -m oracle  #Create oracle users and join oinstall and dba user groups
groups oracle                #Query whether the user group is authorized successfully
passwd oracle                  #Set the login password of user oracle
id oracle                          #View new oracle users
  • 3.2 create oracle installation directory, etc
mkdir -p /data/oracle  #oracle database installation directory
mkdir -p /data/oraInventory  #oracle database profile directory
mkdir -p /data/database  #oracle database software package decompression directory
cd /data
chown -R oracle:oinstall /data/oracle  #Set oracle users whose directory owner is the oinstall user group
chown -R oracle:oinstall /data/oraInventory
chown -R oracle:oinstall /data/database
  • 3.3 modify OS system ID
    Modify the content in / etc / RedHat release to:
redhat-7 
  • 3.4 installation dependency package
yum install binutils-2.* compat-libstdc++-33* elfutils-libelf-0.* elfutils-libelf-devel-* gcc-4.* gcc-c++-4.* glibc-2.* glibc-common-2.* glibc-devel-2.* glibc-headers-2.* ksh-2* libaio-0.* libaio-devel-0.* libgcc-4.* libstdc++-4.* libstdc++-devel-4.* make-3.* sysstat-7.* unixODBC-2.* unixODBC-devel-2.* pdksh*
  • 3.5 turn off the firewall
systemctl stop firewalled service
systemctl disable firewalled service
  • 3.6 turn off selinux
    Modify selinux in / etc/selinux/config to disabled
selinux=disabled
  • 3.7 modifying kernel parameters
    Add the following to / etc/sysctl.conf:
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.conf.all.rp_filter = 1
fs.file-max = 6815744 #Set the maximum number of open files
fs.aio-max-nr = 1048576
kernel.shmall = 2097152 #Total amount of shared memory, 8G memory setting: 2097152*4k/1024/1024
kernel.shmmax = 2147483648 #Segment size of maximum shared memory
kernel.shmmni = 4096 #Maximum number of shared memory terminals in the whole system
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500 #Available IPv4 port ranges
net.core.rmem_default = 262144
net.core.rmem_max= 4194304
net.core.wmem_default= 262144
net.core.wmem_max= 1048576
  • 3.8 setting restrictions on oracle users
    Add the following to / etc/security/limits.conf:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
  • 3.9 switch to oracle user, configure the user's environment variable, and add the following content in / home / oracle /. Bash \
export ORACLE_BASE=/data/oracle #oracle database installation directory
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1 #oracle database path
export ORACLE_SID=orcl #oracle startup database instance name
export ORACLE_TERM=xterm #xterm window mode installation
export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH #Add system environment variable
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib #Add system environment variable
export LANG=C #Prevent random code during installation
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK  #Set the Oracle client character set, which must be consistent with the character set set set during Oracle installation
  • 3.10 before uploading, Download 7 compressed files of p13390677-112040-linux-x86-64-1 ~ 7of7.zip to the / data/database folder
  • 3.11 decompress, grant permissions and execute installation commands
#Switch to root
su root
#Enter / data/database
cd /data/database
#decompression
unzip \*.zip
#Modify the users and groups of the installation directory
chown -R oracle:oinstall /data/database/database/
# Install 32-bit libXext
yum install libXext.i686
# Set DISPLAY
export DISPLAY=:0.0
xhost +
# Install ld-linux.so.2 
yum install -y ld-linux.so.2 
#Switch to oracle user and enter / data/database/database/
cd /data/database/database/
# Execute installation command
./runInstaller

4. Graphic interface operation

After the installation command is executed, wait a moment, and the installation GUI will appear.

Graphic interface is the same as win10


The following operation is the same as the installation of Oracle 11g in win10. Readers can refer to the previous article.
The solutions to the problems that may be encountered during the installation are as follows:
Expand the root directory: https://www.jianshu.com/p/3c386f6184a0
Expand swap space: https://www.jianshu.com/p/04f1e770fde5
To install pdksh: https://www.jianshu.com/p/354c48a34920
 

Posted by limey on Wed, 06 Nov 2019 13:01:31 -0800