Oracle12c Linux x86-64 version installation

1. Add a new hard disk and format it

[root@localhost ~]# cd /dev
[root@localhost dev]# ls
[root@localhost dev]# fdisk /dev/sdb
[root@localhost dev]# mkfs -t xfs /dev/sdb1

2. Create orc directory

[root@localhost dev]# mkdir /orc

3. Modify the host name

[root@localhost ~]# vim /etc/hostname
#Add the following to the last line
HOSTNAME=oracle

4. Modify domain name resolution

[root@localhost ~]# vim /etc/hosts
#Add the following to the last line
192.168.142.151 oracle

5. Mount the new hard disk to the orc directory

[root@oracle ~]# mount /dev/sdb1 /orc

6. Download environment package

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

7. Modify sysctl.conf configuration file

[root@oracle ~]# vim /etc/sysctl.conf
#Add the following to the last line
fs.aio-max-nr = 1048576
#The recommended number of asynchronous Io requests is 1048576, which is actually equal to 1024 * 1024, or 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

8. Reload profile

[root@oracle ~]#  sysctl -p

9. Configure user environment

#Add oinstall group
[root@oracle ~]# groupadd oinstall

#Add dba group
[root@oracle ~]# groupadd dba

#Add user oracle to group
[root@oracle ~]# useradd -g oinstall -G dba oracle

#Set the database password to 123123
[root@oracle ~]# passwd oracle
Changing password for user oracle.
New password: 
BAD PASSWORD: The password is shorter than 8 characters
Retype new password: 
passwd: all authentication tokens updated successfully.

#Create database directory
[root@oracle ~]# mkdir -p /orc/app/oracle

#Modify directory owner and group
[root@oracle ~]# chown -R oracle:oinstall /orc/app

#Modify directory permissions
[root@oracle ~]# chmod -R 755 /orc/app/oracle/

#Configure oracle user environment
[root@oracle ~]# vim /home/oracle/.bash_profile
#Add the following to the last line
umask 022
ORACLE_BASE=/orc/app/oracle
ORACLE_HOME=/orc/app/oracle/product/12.2.0/dbhome_1/
ORACLE_SID=orcl
MLS_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

10. Use PAM ﹣ limits authentication module

[root@oracle ~]# vim /etc/pam.d/login
#%PAM-1.0
#Add the following at the end of this paragraph
session    required     /lib/security/pam_lilits.so
session    required     pam_limits.so

11. Modify the limits.conf configuration file

[root@oracle ~]# vim /etc/security/limits.conf
#Set the number of processes available to a single user
oracle           soft   nproc            2047       
#Set the number of files users can open
oracle           hard   nproc            16384  
oracle           soft   nofile           1024       
#Set stack
oracle           hard   nofile           65536  
oracle           soft   stack            10240      

12. Modify system environment variables

[root@oracle ~]# vim /etc/profile

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        #Number of processes and files
    fi
fi

13. Remote source package acquisition

[root@oracle ~]# mount.cifs //192.168.142.1/database /mnt
Password for root@//192.168.142.1/database:  

14. The graphical interface is operated by root user

#Turn off access control and allow any host to access the local X server
[root@oracle ~]# xhost +
access control disabled, clients can connect from any host

#Switch oracle users
[root@oracle ~]# su - oracle

#Set the DISPLAY environment variable to run the graphics program
[oracle@oracle mnt]$ export DISPLAY=:0.0

#Execute installation script
[oracle@oracle mnt]$ ./runInstaller 

15. Start the installation of graphical interface, cancel the "security update" option and go to the next step

16. Select the "create and configure database" option and go to the next step

17. Select the "server class" option and go to the next step

18. Select "but example database installation" and go to the next step

19. Select "typical installation" and proceed to the next step

20. Set database password and go to the next step

21. This step goes directly to the next step

22. Click Install

23. During the installation, pop-up processing, execute the following script in another terminal as root

/orc/app/oraInventory/orainstRoot.sh
/orc/app/oracle/product/12.2.0/dbhome_1/root.sh

24. Installation successful

Keywords: Big Data Oracle vim Database socket

Added by spiritssight on Mon, 23 Dec 2019 16:31:59 +0200