install oracle on centos

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_TERM=xterm

export ORACLE_BASE=/u01/oracle/app
export ORACLE_HOME=ORACLE_BASE/oracle/product/11.2.0/dbhome_1 export INVENTORY_LOCATION=ORACLE_BASE/oraInventory
export LD_LIBRARY_PATH=ORACLE_HOME/lib:/usr/lib export NLS_LANG="American_america.zhs16gbk" export NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss' export PATH=PATH:HOME/bin:ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin
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=JAVA_HOME/jre export CLASSPATH=.:JAVA_HOME/lib:JRE_HOME/lib:CLASSPATH
export PATH=JAVA_HOME/bin:JRE_HOME/bin:$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=1 to ORACLE_HOME_LISTNER=ORACLE_HOME
Modify $ORACLE_HOME/bin/dbshut (45)
Modify ORACLE_HOME_LISTNER=1 to ORACLE_HOME_LISTNER=ORACLE_HOME
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

install oracle on centos
​Install Oracle database on CentOS Linux
Install Docker on Centos7
install LNMP on centos7.4
Install Java on Centos 7
Nodejs install on centos7
Install FFmpeg on CentOS 8
Install RabbitMQ on CentOS 7
Install Node.js on Centos
Maven install on centos7
Install MongoDB on CentOS 7
Install Surelog on CentOS8
Openjdk install on centos7
Install Jenkins on centos7
install RabbitMQ on centos
Install RabbitMQ on CentOS 7
install Docker on centos6.5
Install Elasticsearch 6 on centos7
Install RabbitMQ on CentOS7
Install mysql online on centos
Install ElasticSearch 7.x on CentOS 7
Install MySQL 8.0.16 on Linux Centos
Install docker transfer on Centos7
Install docker on Centos system
1.5 Install Centos7
Install Zabbix 3.4 based on CentOS 7
install virtualbox on centos server
Install Nginx server on CentOS 7
How to install jdk1.8 on centOS7
How to install MySQL on CentOS 8
Install JDK8 in rpm on CentOS7
How to install Memcached on CentOS 8
Install MATE or XFCE on CentOS 7
How to install R on CentOS 8
How to install FFmpeg on CentOS 8
How to install Virtualbox on CentOS 8
How to install TensorFlow on CentOS 8
How to install TeamViewer on CentOS 8
How to install Perl 5 on CentOS
How to install Git on CentOS 8
How to install Gradle on CentOS 8
How to install Elasticsearch on CentOS 8
How to install Jenkins on CentOS 8
How to install Java on CentOS 8
How to install Go on CentOS 8
How to install Yarn on CentOS 8
How to install Nginx on CentOS 8
How to install Asterisk on CentOS 7
How to install Jenkins on CentOS 8
Install MySQL on Linux CentOS7 (Windows)
How to install Vagrant on CentOS 8
How to install Python 3.8 on CentOS 8
How to install Tomcat 9 on CentOS 8
How to install Webmin on CentOS 8
How to install Ruby on CentOS 8
How to install Skype on CentOS 8
How to install htop on CentOS 8
How to install Python on CentOS 8
How to install Elasticsearch on CentOS 8
How to install Postgresql on CentOS 8
How to install Wordpress on Centos