CentOS 7 is one of the most widely used Linux operating systems today. For many businesses, Oracle Database is one of the most common enterprise-level databases. This article will provide you with the steps required to set up an Oracle 11g database and install it using CentOS 7.
Installing Oracle 11g
Before you start installing Oracle 11g, make sure you have obtained the correct version of Oracle installation media, such as oracle-11.2.0.4-1.x86_64.rpm. The downloaded installation media should be in a directory on your hard drive.
Before you start installing Oracle 11g, make sure you have an X server installed on your CentOS 7 system. If your Linux server does not have an X server, please use the following command to install the system, but some additional software packages and components still need to be installed for use by the Oracle database.
The following are the software packages and commands that require additional installation:
Install grep, ksh, mkisofs, sysstatsudo yum groupinstall "GNOME Desktop"
sudo yum install -y grep ksh mkisofs sysstat
fs.file-max = 6815744 kernel.sem = 250 32000 100 128 kernel.shmmni = 4096 kernel.shmall = 1073741824 kernel.shmmax = 4398046511104 kernel.panic_on_oops = 1 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 net.ipv4.conf.default.rp_filter = 2 net.ipv4.conf.all.rp_filter = 2
Set up user account
In order to install and run Oracle database normally, you need to create a user account named "oracle". Before installing the oracle account, make sure the required packages are enabled on your system.
Enter the following command to create the oracle account and assign groups and permissions to it:
sudo sysctl -p
Create the installation directory
You need to create an oracle directory in which to install Oracle Database software. This directory must be created by the oracle user and must have the correct permissions. Let’s create a directory called /u01/app/oracle and assign it to the oracle user:
sudo useradd -m -d /home/oracle -s /bin/bash oracle sudo passwd oracle sudo groupadd oinstall sudo groupadd dba sudo usermod -aG oinstall oracle sudo usermod -aG dba oracle
Before installing Oracle 11g, there are some environment variables that need to be set. Please edit the oracle user's .bash_profile file and add the following entries:
sudo mkdir -p /u01/app/oracle sudo chown -R oracle:oinstall /u01 sudo chmod -R 775 /u01
Execute the following command to override the environment variable changes on your .bash_profile file:
# Oracle Settings export TMP=/tmp export ORACLE_HOSTNAME=localhost.localdomain export ORACLE_UNQNAME=orcl export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 export ORACLE_SID=orcl export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
Install Oracle 11g
The final step is to install the Oracle database software. First log in to the system as the root user, then switch to the oracle user and start the Oracle installer using the following command:
source ~/.bash_profile
At this point, please wait for the Oracle installer to automatically perform its initial tasks, which may take a while. Once all tasks of the installer are completed, you should be able to start and connect to the Oracle database.
Summary
In this article, we introduced how to install and configure Oracle 11g database using CentOS 7 operating system. We describe the packages and components that must be installed and explain some of the steps you must take to prepare your system. By following the steps provided in this article, you will be able to successfully install Oracle database on CentOS 7.
The above is the detailed content of centos oracle 11g installation. For more information, please follow other related articles on the PHP Chinese website!