oracle12c 单实例安装思路
环境准备
linux版本:rhel7.4
1、关闭防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service
vim /etc/selinux/config
selinux=disabled
2、配置yum源
mount /dev/sr0 /mnt
cd /etc/yum.repos.d
vim rhel.repo
[name]
name=
enabled=1
gpgcheck=0
baseurl=file:///mnt
yum clean all
yum repolist
3、设置主机名
vim /etc/hostname
修改/etc/hosts,设置主机名和Ip的对应关系
4、安装依赖包
yum install -y bc
yum install -y compat-libcap1*
yum install -y compat-libcap*
yum install -y binutils
yum install -y compat-libstdc++-33
yum install -y elfutils-libelf
yum install -y elfutils-libelf-devel
yum install -y gcc
yum install -y gcc-c++
yum install -y glibc-2.5
yum install -y glibc-common
yum install -y glibc-devel
yum install -y glibc-headers
yum install -y ksh libaio
yum install -y libaio-devel
yum install -y libgcc
yum install -y libstdc++
yum install -y libstdc++-devel
yum install -y make
yum install -y sysstat
yum install -y unixODBC
yum install -y unixODBC-devel
yum install -y binutils*
yum install -y compat-libstdc*
yum install -y elfutils-libelf*
yum install -y gcc*
yum install -y glibc*
yum install -y ksh*
yum install -y libaio*
yum install -y libgcc*
yum install -y libstdc*
yum install -y make*
yum install -y sysstat*
yum install -y libXp*
yum install -y glibc-kernheaders
yum install -y net-tools-*
yum install -y iscsi-initiator-utils
yum install -y udev
5、修改内核参数
vim /etc/sysctl.conf
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
kernel.panic_on_oops = 30
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
sysctl -p生效
6、设置oracle用户shell限制
vim /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 10240
7、设置pam
vim /etc/pam.d/login
session required pam_limits.so
8、设置ulimit
vim /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -u 16384?
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
9、创建用户、组、目录结构
groupadd oinstall
groupadd dba
groupadd oper
创建oracle用户,组为oinstall
useradd -g oinstall -g dba -m oracle
mkdir -p /oracle/app
mkdir -p /oracle/app/oracle
mkdir -p /oracle/app/oradata
mkdir -p /oracle/app/oracle/product
修改目录权限
chown -R oracle:oinstall /oracle
10、设置oracle用户环境变量
su - oracle
vim .bash_profile
export ORACLE_BASE=/oracle/app
export ORACLE_HOME=$ORACLE_BASE/oracle/product/12.2.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
source .bash_profile生效
11、安装软件
调用图形化
su - root
export DISPLAY=:0.0
xhost +
su - oracle
export DISPLAY=:0.0
xhost +
unzip linuxx64_12201_database.zip
cd到解压生成的database文件夹
./runinstaller