Switch root user
1、 Create users
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle
id oracle
2、 Configuration file path
mkdir /u01/oracle/app/oraInventory #oracle database installation directory
mkdir /u01/oracle/app/oracle #oracle database configuration file directory
mkdir /u01/oracle/app/oracle/product #Oracle database software package decompression directory
3、 Configure directory permissions
chown -R oracle:oinstall /u01/oracle
4、 Configuration mirror
mkdir /media/iso
Copy the image source to the specified location, such as /software/CentOS-7-x86_64-DVD-1708.iso
mount -t iso9660 /software/CentOS-7-x86_64-DVD-1708.iso /media/iso/
df -h #View
cd /etc/yum.repos.d/
rm -rf * #Backup before deleting
vi local-centos7-iso.repo #The content is as follows:
##############################################################################
[ Server]
name=Server
baseurl=file:///media/iso
enabled=1
gpgckeck=0
##############################################################################
yum clean all
yum update
5、 Install oracle dependent libraries
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*
6、 System Configuration
Close selinux
vi /etc/selinux/config
Modify SELINUX=disabled
setenforce 0
vi /etc/security/limits.conf
vi /etc/pam.d/login
vi /etc/sysctl.conf
vi /etc/profile
7、 Configure environment variables
cd /home/oracle
vi .bash_profile
export EDITOR=vi
export ORACLE_SID=orcl
export ORACLE_BASE=/u01/oracle/app
export ORACLE_HOME=
export LD_LIBRARY_PATH=
umask 022
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-11.b12.el7.x86_64
export JRE_HOME=
export PATH=
8、 Configure system desktop
Reference https://www.cnblogs.com/anglexxyy/articles/9776604.html
9、 Install oracle
Upload the oracle installation file to /u01/install/oracle and unzip it. The default unzip to the current directory./database
cd /u01/install/oracle/database
. /runInstaller
Note: If there is an error: java.lang.NoClassDefFoundError
Switch to root
export DISPLAY=localhost:1
xhost +
A prompt for access control disabled, clients can connect from any host appears
Open the oracle installation interface, the specific installation process, refer to the document ""
10、 oracle settings
The password expiration time is 180 days by default, set to permanent
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
11、 Boot settings
Modify $ORACLE_HOME/bin/dbstart (80)
Modify ORACLE_HOME_LISTNER=
Modify $ORACLE_HOME/bin/dbshut (45)
Modify ORACLE_HOME_LISTNER=
Modify the /etc/oratab file
orcl:/u01/oracle/app/oracle/product/11.2.0/dbhome_1: the last N in N is changed to Y
/etc/rc.d/rc.local add
su oracle -lc "/u01/oracle/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start"
su oracle -lc "/u01/oracle/app/oracle/product/11.2.0/dbhome_1/bin/dbstart"
sudo chmod 777 /etc/rc.d/rc.local
Recommended Posts