Hosts File: Automatic Setup
Hosts File: Automatic Setup
The "/etc/hosts" file must contain a fully qualified name for the server.
For example.
ol7.localdomain
Automatic Setup
If you plan to use the "oracle-rdbms-server-12cR1-preinstall" package to perform all
your prerequisite setup, issue the following command.
Earlier versions of Oracle Linux required manual setup of the Yum repository by
following the instructions at http://public-yum.oracle.com.
It is probably worth doing a full update as well, but this is not strictly speaking
necessary.
# yum update -y
It's worth running the all the YUM commands listed in the manual setup section.
Depending on the OS package groups you have selected, some additional packages
might also be needed.
Manual Setup
If you have not used the "oracle-rdbms-server-12cR1-preinstall" package to perform all
prerequisites, you will need to manually perform the following setup tasks.
Add the following lines to the "/etc/sysctl.conf" file, or in a file called "/etc/sysctl.d/98-
oracle.conf".
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.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
/sbin/sysctl -p
The following packages are listed as required, including the 32-bit version of some of
the packages. Many of the packages should be installed already.
Additional Setup
The following steps must be performed, whether you did the manual or automatic setup.
Set the password for the "oracle" user.
passwd oracle
Set secure Linux to permissive by editing the "/etc/selinux/config" file, making sure the
SELINUX flag is set as follows.
SELINUX=permissive
Once the change is complete, restart the server or run the following command.
# setenforce Permissive
If you have the Linux firewall enabled, you will need to disable or configure it, as
shown here or here. To disable it, do the following.
mkdir -p /u01/app/oracle/product/12.1.0.2/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
Putting mount points directly under root is typically a bad idea. It's done here for
simplicity, but for a real installation "/" should be reserved for the OS.
Unless you are working from the console, or using SSH tunnelling, login as root and
issue the following command.
xhost +<machine-name>
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=ol7.localdomain
export ORACLE_UNQNAME=cdb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1
export ORACLE_SID=cdb1
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib