Detailed steps for installing oracle11gR2 under centos7

  • 2020-05-17 07:30:52
  • OfStack

Environment to prepare

The installation package:

CentOS-7-x86_64-DVD linux.x64_11gR2_database_1of2.zip linux.x64_11gR2_database_2of2.zip

This tutorial was installed under VMware. Be careful not to set up dynamic memory when setting up memory.

Prepare before installing Oracle

Create system users and user groups that run the oracle database


[jonathan@localhost ~]$ su root  # Switch to the root
Password:
[root@localhost]# groupadd oinstall  # Create a user group oinstall
[root@localhost]# groupadd dba  # Create a user group dba
[root@localhost]# useradd -g oinstall -g dba -m oracle  # create oracle User and join oinstall and dba User groups 
[root@localhost]# passwd oracle  # Set user oracle Login password, do not set password in CentOS Unable to log in the graphical login interface 
Changing password for user oracle.
New password:   #  password 
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:   #  Confirm password 
passwd: all authentication tokens updated successfully.
[root@localhost]# id oracle #  View the newly created oracle The user 
uid=1001(oracle) gid=1002(dba) groups=1002(dba)

Create the oracle database installation directory


[jonathan@localhost ~]$ su root
Password:
[root@localhost]# mkdir -p /data/oracle  #oracle Database installation directory 
[root@localhost]# mkdir -p /data/oraInventory  #oracle Database configuration file directory 
[root@localhost]# mkdir -p /data/database  #oracle Database package unzip directory 
[root@localhost]# cd /data
[root@localhost data]# ls  # Check after creation 1 Lower (ocd) 
database oracle oraInventory
[root@localhost data]# chown -R oracle:oinstall /data/oracle  # Set the directory owner as oinstall User groups oracle The user 
[root@localhost data]# chown -R oracle:oinstall /data/oraInventory
[root@localhost data]# chown -R oracle:oinstall /data/database
[root@localhost data]#

Modify the OS system identity

Oracle does not support CentOS system installation by default, Oracle Database 11g Release 2 requires OS reference: link

Modify file /etc/ RedHat-release


[root@localhost data]# cat /proc/version
Linux version 3.10.0-327.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu Nov 19 22:10:57 UTC 2015
[root@localhost data]# cat /etc/redhat-release  
CentOS Linux release 7.1.1503 (Core)
[root@localhost data]# vi /etc/redhat-release
[root@localhost data]# cat /etc/redhat-release
redhat-7
[root@localhost data]#

Install the packages required for the oracle database

Oracle Database Package Requirements for Linux x86-64 as follows: (reference: https: / / docs oracle. com/cd/E11882_01 / install. # 112 / e47689 pre_install. htm BABCFJFG)


yum install gcc* gcc-* gcc-c++-* glibc-devel-* glibc-headers-* compat-libstdc* libstdc* elfutils-libelf-devel* libaio-devel* sysstat* unixODBC-* pdksh-*

According to the specific situation to install, the above only provides a general content, not very full

Close the firewall

CentOS 7.2 USES firewall as a firewall by default


[root@localhost /]# systemctl status firewalld.service  # Check firewall status, running 
 low  firewalld.service - firewalld - dynamic firewall daemon
 Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
 Active: active (running) since Thu 2016-04-07 18:54:29 PDT; 2h 20min ago
 Main PID: 802 (firewalld)
 CGroup: /system.slice/firewalld.service
   └ ─ 802 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

Apr 07 18:54:25 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Apr 07 18:54:29 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
[root@localhost /]# systemctl stop firewalld.service  # Close the firewall 
[root@localhost /]# systemctl status firewalld.service  # Check the firewall status again and see that it is closed 
 low  firewalld.service - firewalld - dynamic firewall daemon
 Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
 Active: inactive (dead) since Thu 2016-04-07 21:15:34 PDT; 9s ago
 Main PID: 802 (code=exited, status=0/SUCCESS)

Apr 07 18:54:25 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Apr 07 18:54:29 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
Apr 07 21:15:33 localhost systemd[1]: Stopping firewalld - dynamic firewall daemon...
Apr 07 21:15:34 localhost systemd[1]: Stopped firewalld - dynamic firewall daemon.
[root@localhost /]# systemctl disable firewalld.service  # Do not use firewalls (restarting is also forbidden) 
Removed symlink /etc/systemd/system/dbus-org.Fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
[root@localhost /]#

Close selinux (restart to take effect)


[root@localhost /]# vi /etc/selinux/config 
[root@localhost /]# cat /etc/selinux/config

Change SELINUX=disabled # to disabled here

Modify kernel parameters


[root@localhost /]# vi /etc/sysctl.conf

Add the following at the bottom:


net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.conf.all.rp_filter = 1
fs.file-max = 6815744 # Sets the maximum number of open files 
fs.aio-max-nr = 1048576
kernel.shmall = 2097152 # The total amount of Shared memory, 8G Memory Settings: 2097152*4k/1024/1024
kernel.shmmax = 2147483648 # The maximum Shared memory segment size 
kernel.shmmni = 4096 # The maximum number of Shared memory ends for the entire system 
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500 # Can use the IPv4 Port range 
net.core.rmem_default = 262144
net.core.rmem_max= 4194304
net.core.wmem_default= 262144
net.core.wmem_max= 1048576

Enable configuration parameters


[root@localhost /]# sysctl -p
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.conf.all.rp_filter = 1
sysctl: setting key "fs.file-max": Invalid argument
fs.file-max = 6815744 # Sets the maximum number of open files 
fs.aio-max-nr = 1048576
sysctl: setting key "kernel.shmall": Invalid argument
kernel.shmall = 2097152 # The total amount of Shared memory, 8G Memory Settings: 2097152*4k/1024/1024
sysctl: setting key "kernel.shmmax": Invalid argument
kernel.shmmax = 2147483648 # The maximum Shared memory segment size 
sysctl: setting key "kernel.shmmni": Invalid argument
kernel.shmmni = 4096 # The maximum number of Shared memory ends for the entire system 
kernel.sem = 250 32000 100 128
sysctl: setting key "net.ipv4.ip_local_port_range": Invalid argument
net.ipv4.ip_local_port_range = 9000 65500 # Can use the IPv4 Port range 
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
[root@localhost /]#

Set limits on oracle users to improve software performance


[root@localhost /]# vi /etc/security/limits.conf

Add content in the bottom section (bold for added content)


@student - maxlogins 4

* oracle soft nproc 2047 *

* oracle hard nproc 16384 *

* oracle soft nofile 1024 *

* oracle hard nofile 65536 *

End of file

Configure the user's environment variables


[jonathan@localhost ~]$ su root
Password:
[root@localhost]# mkdir -p /data/oracle  #oracle Database installation directory 
[root@localhost]# mkdir -p /data/oraInventory  #oracle Database configuration file directory 
[root@localhost]# mkdir -p /data/database  #oracle Database package unzip directory 
[root@localhost]# cd /data
[root@localhost data]# ls  # Check after creation 1 Lower (ocd) 
database oracle oraInventory
[root@localhost data]# chown -R oracle:oinstall /data/oracle  # Set the directory owner as oinstall User groups oracle The user 
[root@localhost data]# chown -R oracle:oinstall /data/oraInventory
[root@localhost data]# chown -R oracle:oinstall /data/database
[root@localhost data]#
0

Add the following:


[jonathan@localhost ~]$ su root
Password:
[root@localhost]# mkdir -p /data/oracle  #oracle Database installation directory 
[root@localhost]# mkdir -p /data/oraInventory  #oracle Database configuration file directory 
[root@localhost]# mkdir -p /data/database  #oracle Database package unzip directory 
[root@localhost]# cd /data
[root@localhost data]# ls  # Check after creation 1 Lower (ocd) 
database oracle oraInventory
[root@localhost data]# chown -R oracle:oinstall /data/oracle  # Set the directory owner as oinstall User groups oracle The user 
[root@localhost data]# chown -R oracle:oinstall /data/oraInventory
[root@localhost data]# chown -R oracle:oinstall /data/database
[root@localhost data]#
1

To take effect


[jonathan@localhost ~]$ su root
Password:
[root@localhost]# mkdir -p /data/oracle  #oracle Database installation directory 
[root@localhost]# mkdir -p /data/oraInventory  #oracle Database configuration file directory 
[root@localhost]# mkdir -p /data/database  #oracle Database package unzip directory 
[root@localhost]# cd /data
[root@localhost data]# ls  # Check after creation 1 Lower (ocd) 
database oracle oraInventory
[root@localhost data]# chown -R oracle:oinstall /data/oracle  # Set the directory owner as oinstall User groups oracle The user 
[root@localhost data]# chown -R oracle:oinstall /data/oraInventory
[root@localhost data]# chown -R oracle:oinstall /data/database
[root@localhost data]#
2

Unzip the installation package


[oracle@localhost /]$ cd /usr/local/src  # Enter the /usr/local/src directory 
[oracle@localhost src]$ ls
linux.x64_11gR2_database_1of2.zip linux.x64_11gR2_database_2of2.zip
[oracle@localhost src]$ unzip linux.x64_11gR2_database_1of2.zip -d /data/database/  # Unpack the 
( omit ...)
[oracle@localhost src]$ unzip linux.x64_11gR2_database_2of2.zip -d /data/database/  # Unpack the 
( omit ...)
[oracle@localhost src]$ su root
Password:
[root@localhost src]# chown -R oracle:oinstall /data/database/database/

oracle installation

Login to oracle user

Login oracle user via graphical interface

Start the oralce installation

To/data/database/database/directory, execute. / runInstaller

Follow these steps to install

A problem with the installation

When connecting to the library during installation, two errors occur at 68% progress:

1 a:

/lib64/libstdc++.so memcpy@GLIBC_2.4 not found.

Problem: glibc is a 2.17 library. The link is looking for a 2.14 library.

Solution: static linking instead.

View/usr/lib64 / libc a exists.

Modify oracle installation directory: ORACLEHOME ctx/lib/insctx mkctxhx: (CTXHXOBJ)
(LINKCTXHX)(CTXHXOBJ) (INSOLINK)
-static (LINKCTXHX)(CTXHXOBJ) $(INSO_LINK) /usr/lib64/libc.a

Then click retry to pass.

The second:

Problem: undefinied reference symbol'B_DestroyKeyObject', check the log, the library nnz11 is not found.

Solutions:

Modify ORACLEHOME/sysman/lib/insemagent (MK_EMAGENT_NMECTL)

Is amended as:

$(MK_EMAGENT_NMECTL) -lnnz11

Then click retry to pass.


Related articles: