Oracle 12c version 2 installation steps - pure combat

Oracle 12c version 2 installation steps

Experimental environment: Centos 7

Experiment preparation: one virtual machine, hard disk * 2

I. preliminary preparation

Partition a new hard disk and format it

[root@localhost ~]# fdisk /dev/sdb
##Step ellipsis
. . . . . . 
[root@localhost ~]# mkfs.xfs /dev/sdb1

Auto mount

[root@localhost ~]# mkdir /orc
[root@localhost ~]# vim /etc/fstab
    /dev/sdb1       /orc    xfs     defaults 0 0
[root@localhost ~]# mount -a

2. Start the experiment

Install environment package

[root@oracle ~]# yum -y install binutils \
compat-libcap1 compat-libstdc++-33 \
gcc gcc-c++ \
glibc glibc-devel \
libaio libaio-devel \
libgcc libstdc++ libstdc++-devel \
libXi libXtst \
make ksh sysstat \
unixODBC unixODBC-devel

Modify kernel parameters

[root@ocacle ~]# vim /etc/sysctl.conf
##Last line add
fs.aio-max-nr = 1048576
    ##The recommended number of asynchronous I0 requests is 1048576, which is actually equal to 1024 * 1024. That is 1024K
fs.file-max = 6815744
    ##Maximum number of open file handles to prevent file descriptor exhaustion
kernel.shmall = 2097152
    ##Total shared memory page is the unit, and the memory is divided by 4K
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
    ##SEMMSL: maximum number of signals per semaphore SEMMNS: maximum number of signals used to control the whole Linux system SEMOPM kernel parameter is used to control the number of signal operations that can be performed by each semop system call SEMMNI: kernel parameter is used to control the maximum number of semaphores in the whole Linux system
net.ipv4.ip_local_port_range = 9000 65500
    ##Port range for outbound connections
net.core.rmem_default = 262144
    ##Default socket receive buffer size
net.core.rmem_max = 4194304
    ##Maximum socket receive buffer size
net.core.wmem_default = 262144
    ##Default socket send buffer size
net.core.wmem_max = 1048576
    ##Maximum socket send buffer size

[root@ocacle ~]# sysctl -p           ##Heavy haul operation

Define Group & install path rights

[root@ocacle ~]# groupadd oinstall            #Define installation group (oinstall)
[root@ocacle ~]# groupadd dba              ##Define Administrators group (dba)
[root@ocacle ~]# useradd -g oinstall -G dba oracle     ##Specify basic group oinstall, additional group dba
#Create installation directory
[root@ocacle ~]# mkdir -p /orc/app/oracle
[root@ocacle ~]# chown -R oracle:oinstall /orc/app/
[root@ocacle ~]# chmod -R 755 /orc/app/oracle/

Modifying oracle user environment variables

[root@ocacle ~]# vim /home/oracle/.bash_profile
##Last line add
umask 022          #file right
ORACLE_BASE=/orc/app/oracle                  #Installation path 
ORACLE_HOME=/orc/app/oracle/product/12.2.0/dbhome_1/        #Product definition
ORACLE_SID=orcl              #Example
NLS_LANG="SIMPLIFIED CHINESE_CHINA".UTF8
PATH=$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_HOME/bin
LANG=zh_CN.UTF-8
export PATH LANG NLS_LANG ORACLE_BASE ORACLE_HOME ORACLE_SID

Oracle user resource limit

[root@ocacle ~]# vim /etc/pam.d/login
#Last line add
session required        /lib/security/pam_limits.so
session required        pam_limits.so

Modifying managed profiles

[root@ocacle ~]# vim /etc/security/limits.conf
#Last line add
oracle  soft    nproc   2047
#Number of processes available to a single user
oracle  hard    nproc   16384
oracle  soft    nofile  1024
#Number of files users can open
oracle  hard    nofile  65536
oracle  soft    stack   10240             #Stack settings

Modify global profile

[root@ocacle ~]# vim /etc/profile
#Last line add
if [ $USER = "oracle" ];then
    if [ $SHELL = "/bin/ksh" ];then
        ulimit -p 16384               #Buffer size
        ulimit -n 65536               #Number of files
    else
        ulimit -u 16384 -n 65536            #Processes files
    fi
fi

III. install Oracle

[root@ocacle ~]# xhost +
access control disabled, clients can connect from any host
[root@ocacle ~]# su - oracle   ##Switch to Oracle user
[oracle@ocacle ~]$ export DISPLAY=:0.0

The following steps are basically carried out at the graphical terminal






When the progress bar reaches 79%, a window will pop up

Return to terminal and switch to root user
[root@ocacle ~]# /orc/app/oraInventory/orainstRoot.sh 
[root@ocacle ~]# /orc/app/oracle/product/12.2.0/dbhome_l/root.sh 

After execution, click OK to continue to the next step

Thanks for reading!!

Tags: Big Data Oracle vim socket glibc

Posted on Sat, 14 Dec 2019 11:09:25 -0800 by fiona