Install Oracle Database on Linux


Check memory space and swap area
free

Check the disk space size, the /tmp directory must have at least 200M space
df -k /tmp

Turn off the firewall
service iptables stop

禁用seLinux
vim /etc/selinux/config
SELINUX=disabled

检查软件包的安装情况缺什么装什么
rpm -q binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers kernel-headers ksh libaio libaio-devel libgcc libgomp libstdc++ libstdc++-devel make numactl-devel sysstat unixODBC unixODBC-devel
yum -y install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers kernel-headers ksh libaio libaio-devel libgcc libgomp libstdc++ libstdc++-devel make numactl-devel sysstat unixODBC unixODBC-devel

Configure kernel parameters
as root Edit /etc/sysctl.conf file
vim /etc/sysctl.conf #Add
the following parameters
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file -max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max =
4194304 net.core.wmem_default = 262144
net.core.wmem_max = 262144 #Run
the command as root to set Take effect
/sbin/sysctl -p

Create the user group required to install the database
groupadd oinstall
groupadd dba #Create
an oracle user with oinstall as the main group and dba as the subgroup
useradd -g oinstall -G dba oracle
Set the password of the oracle user to oracle11g
passwd oracle

Add limit parameter for oracle user

Modify the /etc/security/limits.conf file
vim /etc/security/limits.conf #Add
the following
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

Modify the /etc/pam.d/login file
vim /etc/pam.d/login #Add
the following content
session required /lib/security/pam_limits.so
session required pam_limits.so

Modify /etc/profile file
vim /etc/profile #Add
the following
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

Create the directories required for installation
root login create the following directory
mkdir -p /data/app/
chown -R oracle:oinstall /data/app/
chmod -R 775 /data/app/
root login create temporary files for installation folder
sudo mkdir /data/tmp
sudo chmod a+wr /data/tmp


Set the environment variables
of Oracle Log in as the oracle user Set the environment variables of the oracle user

TMP=/data/tmp
TMPDIR=/data/tmp
export TMP TMPDIR

ORACLE_BASE=/data/app/oracle
ORACLE_HOME=/data/app/oracle/product/11.2.0/dbhome_1
ORACLE_SID=bing
export ORACLE_BASE ORACLE_HOME ORACLE_SID

PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH LD_LIBRARY_PATH

 

 

 

export LANG=en_US.UTF-8
chown -R oracle:oinstall /data/app

The oracle user logs in to sqlplus /nolog to verify whether the Oracle installation is successful

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325183261&siteId=291194637