​Install Oracle database on CentOS Linux

detailed steps

1. Hardware requirements

1、 Memory & swap

Check the memory

grep MemTotal /proc/meminfo

grep SwapTotal /proc/meminfo

2、 hard disk

Since the CentOS installation is almost 4~5G, plus the installation of Oracle, etc., please prepare at least 10G of hard disk space.

Check the disk condition

df -h

2. Software

**System platform: **CentOS 6.3(x32)

CentOS-6.3-i386-bin-DVD1.iso

**Oracle version: **Oracle 10g R2

10201_ database_linux32.zip

Three, system installation attention

The desktop mode must be installed when the system is installed, otherwise Oracle cannot be installed. In addition, do not enable SELinux. Oracle officially does not recommend using SELinux. Please temporarily turn off the firewall of CentOS to reduce the trouble during installation. To prevent garbled characters during Oracle installation, it is recommended to use English as the system language to install Oracle. The system commands described in this article, without special signs, are "#" for root authority, and "$" for oracle authority.

4. System preparation before installing Oracle

First of all, please log in as the root account and do some pre-settings first.

1、 Turn off the firewall, disable SELinux

vi /etc/selinux/config

Modify SELINUX=disabled, and then restart. If you do not want to restart the system, use the command setenforce 0

2、 Install dependencies

Installation package required by Oracle official documentation:

Check whether Oracle related packages have been installed:

Use yum to install the required packages:

yum -y install binutils compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc.i686 glibc-common glibc-devel glibc-devel.i686 glibc-headers ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel make sysstat

Finally, you need to install the library libXp, this must be installed, otherwise java Exception will occur when installing Oracle.

yum install libXp

3、 Create Oracle users and groups

Only the single-host environment is discussed here, and the configuration of the RAC environment is not considered.

Execute the following commands to add the users and groups required for oracle installation.

(1) Create a group oinstall # groupadd oinstall

(2) Create group dba# groupadd dba

(3) Add user oracle and add it to oinstall and dba groups# useradd -m -g oinstall -G dba oracle

(4) Test whether the oracle account is established # id oracle

(5) Create a new password for oracle# passwd oracle

4、 Add oracle user to sudo group

vi /etc/sudoers find the line root ALL=(ALL) ALL, and add oracle ALL=(ALL) ALL at the bottom, press the ESC button, and then type: wq! and press Enter

5、 Configure system kernel parameters

vi /etc/sysctl.conf

And enter the following:

//Indicates the total amount of shared memory (in pages) that the system can use at one time. The default value is 2097152, usually no need to modify

kernel.shmall = 2097152

//Defines the maximum size of the shared memory segment (in bytes). The default is 32M, for oracle, the default value is too low, usually set to 2

kernel.shmmax = 2147483648

//Used to set the maximum number of shared memory segments in the system. The default value of this parameter is 4096. Usually no need to change

Gkernel.shmmni = 4096

kernel.sem = 250 32000 100 128 //Indicates the set semaphore net.ipv4.ip_local_port_range = 102465000

net.core.rmem_default=4194304 //The default receiving window size net.core.rmem_max=4194304 //The maximum receiving window size net.core.wmem_default=262144 //The default sending window size net.core.wmem_max=262144 / /Maximum size of sending window

After editing: wq save, and then execute: # sysctl -p

Activate the changes just made.

6、 Edit /etc/security/limits.conf

vi /etc/security/limits.conf add the following four lines oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536

7、 Edit /etc/pam.d/login

vi /etc/pam.d/loginsession required /lib/security/pam_limits.sosession required pam_limits.so

8、 Modify /etc/profile

vi /etc/profile

Add the following code to the profile file.

if [ $USER = "oracle" ]; then

if [ $SHELL = "/bin/ksh" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

fi

9、 Modify Linux release version information

Since CentOS6 was not released when Oracle10g was released, Oracle10g did not confirm support for CentOS6, and the file needs to be modified to allow Oracle10g to support CentOS6.

Edit the /etc/redhat-release file

vi /etc/redhat-release

Change the content of CentOS release 6.3 (Final) to redhat 4

10、 Create Oracle installation folder and data storage folder

mkdir /opt/oracle#mkdir /opt/oracle/102#chown -R oracle:dba /opt/oracle

11、 Configure Linux host

Check whether there is a localhost record in the /etc/hosts file (point to 127.0.0.1). If not, there will be some problems when configuring Oracle monitoring later, causing the monitoring to be unable to start. Add this record manually here. .

The content is as follows:

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

This is the end of the first stage. Next, after completing these settings, please log out of the root account and log in to the system again with the oracle account.

12、 Configure oracle user environment variables

$ cd /home/oracle$ vi .bash_profile modify and add the following

ORACLE_BASE=/opt/oracle //Oracle installation folder created above ORACLE_HOME=ORACLE_BASE/102ORACLE_SID=orclLD_LIBRARY_PATH=ORACLE_HOME/libPATH=PATH:ORACLE_HOME/bin:$HOME/bin

export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH

After saving, use the following command to make the setting effective:

$ source /home/oracle/.bash_profile

5. Install Oracle and make related settings

1、 Unzip the installation file

Put the downloaded 10201_database_linux32.zip into the folder /opt/oracle where oracle will be installed, return to terminal mode and enter the oracle folder:

$ cd /opt/oracle

Unzip 10201_database_linux32.zip

$ unzip 10201_database_linux32.zip

Then you will see a series of decompression actions.

=========================================

How to decompress .gz files

tar –zxvf xxx.cpio.gz –C /opt/oracle/

=========================================

**Unzip the 10201_database_linux_x86_64.cpio file **gunzip 10201_database_linux_x86_64.cpio.gzcpio -idmv <10201_database_linux_x86_64.cpio

After decompression, you will see the database folder in the same folder, please enter the database folder:

$ cd database

Prepare to perform database installation. If your centos is in a Chinese environment, Chinese garbled characters will appear during installation, please follow the instructions below

$ export

Then execute

$ ./runInstaller

If you cannot see the installation interface, please use the root account to execute the following commands before running the installation program:

export DISPLAY=:0.0 # xhost + $ ./runInstaller

Start the installation procedure............>>>>

Since the related pre-work has been done before, in this step, you only need to select the UNIX DBA Group as dba and enter the database password shared by accounts such as SYS and SYSTEM. Then select Next.

Similarly, select the group as the dba group and press Next

In this step, please click Checking Network Configuration requirements as User Verified, and then click Next

Finally, the Install Summary screen appears. At this time, just press the Install button, and the system will begin installation.

Installation process.......................................>>>>

Database setup assistant, you can select password management here to modify the password. If you don’t need to modify it, just press the ok button.

Before the installation is complete, the following setup script appears:

Open a new terminal and su to root.

The two scripts required to be executed are executed in sequence.

/opt/oracle/oraInventory/orainstRoot.sh/opt/oracle/102/root.sh

The execution screen is as shown above. After execution, return to the installation window and press OK to complete all oracle installation. After installation, the following screen will appear.

At this time, you can enter the following address to test, login account: sys or system

http://CentOS-Oracle:5560/isqlplus

http://CentOS-Oracle:5560/isqlplus/dba

http://CentOS-Oracle:1158/em

The following screens all successfully represent that oracle has been installed normally.

Recommended Posts

​Install Oracle database on CentOS Linux
install oracle on centos
Install MySQL 8.0.16 on Linux Centos
Install Jenkins on linux centos (non-docker way)
Install Java on Centos 7
Nodejs install on centos7
Install FFmpeg on CentOS 8
Install RabbitMQ on CentOS 7
Install Node.js on Centos
Linux Centos7 install jdk1.8
Maven install on centos7
Install MongoDB on CentOS 7
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
Centos 7 install JDK (Linux install jdk)
How to install RPM packages on CentOS Linux
How to install Oracle Java 14 on Ubuntu Linux
Install mysql online on centos
Know Linux and install CentOS
Install ElasticSearch 7.x on CentOS 7
2.5 Linux (Ubuntu18.04) install database PostgreSQL
Linux Centos7 install redis tutorial
Install python3 on linux, keep python2
Install Oracle11gR2 database under CentOS6.9
Install docker transfer on Centos7
Install MySQL under Linux (CentOS 7)
Install Oracle Java8 on Ubuntu
Install docker on Centos system
install EPEL repo on centos
Install Zabbix 3.4 based on CentOS 7
install virtualbox on centos server
Install MongoDB database under CentOS7
CentOS 6.8 under linux install mongodb
Install Nginx server on CentOS 7
How to quickly install docker on Linux (Centos version)
How to install jdk1.8 on centOS7
How to install MySQL on CentOS 8
Common Linux operations (based on centos7)
Install JDK8 in rpm on CentOS7
How to install Memcached on CentOS 8
Install MATE or XFCE on CentOS 7
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
Install Hadoop cluster on Linux (CentOS7+hadoop-2.8.0)
How to install Gradle on CentOS 8
How to install Jenkins on CentOS 8
How to install Java on CentOS 8
How to install Go on CentOS 8
Linux CentOS 7 install JDK detailed steps
How to install GCC on CentOS 8
How to install Yarn on CentOS 8
How to install Nginx on CentOS 8