1、登录主机
ssh root@ip password
2、检查oracle安装依赖是否安装
//查看oracle安装的依赖包是否已安装
rpm -q binutils compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXext libXtst libX11 libXau libXi make sysstat
3、安装系统中没有的依赖包
yum list gcc-c++
yum install
yum install gcc-c++.x86_64
4、将oracle安装包同步到服务器中
存放路径 :/var/paic/OracleInstaller/
解压文件:
unzip -d /var/paic/ /var/paic/OracleInstaller/linuxamd64_12102_database_1of2.zip
unzip -d /var/paic/ /var/paic/OracleInstaller/linuxamd64_12102_database_2of2.zip
5、修改内核参数
mv /etc/sysctl.conf /etc/sysctl.conf-20180828.backup
mv /var/paic/OracleInstaller/sysctl.conf /etc/
/etc/sysctl.conf 生效内核参数 /sbin/sysctl -p 刷新内核参数表
mv /etc/security/limits.conf /etc/security/limits.conf-20180828.backup
mv /var/paic/OracleInstaller/limits.conf /etc/security/
/etc/security/limits.conf
修改主机名称
vim /etc/sysconfig/network 新增 HOSTNAME=winker-oracle
vim /etc/hosts 新增 ip winker-oracle
hostname winker-oracle
6、关闭防火墙
关闭selinux&iptables
vim /etc/selinux/config
SELINUX=disabled
/etc/init.d/iptables stop
chkconfig iptables off
7、创建用户及组
groupadd oinstall
groupadd dba
groupadd oper
useradd -g oinstall -G dba,oper oracle
passwd oracle
WinkerPaic1.0
8、创建文件夹
#创建数据库主目录
mkdir /var/paic/app
#创建数据库存放目录
mkdir -p /var/paic/app/oracle/oradata
#数据库备份目录
mkdir -p /var/paic/app/oracle/oradata_back
#授权其他用户读写权限
chmod -R 775 /var/paic/app
#修改文件夹的属主及所属组
chown -R oracle:oinstall /var/paic/
9、修改配置文件
/etc/profile 增加以下内容
#20180828 add oracle settings
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
#20180828 end
10、配置系统环境变量
su - oracle
vim ~/.bash_profle
source ~/.bash_profle
11、修改用户ID
su - root
vim /etc/passwd
ada:x:10:3::/var/ada:/bin/bash
授权oracle用户读权限
chmod 775 /etc/sysctl.conf
chmod 775 /etc/security/limits.conf
12、执行静默安装
mv /var/paic/database/response/db_install.rsp /var/paic/database/response/db_install.rsp-20180828.backup
mv /var/paic/OracleInstaller/db_install.rsp /var/paic/database/response/
cd /var/paic/database
./runInstaller -force -silent -noconfig -responseFile /var/paic/database/response/db_install.rsp
yum list compat-libcap1
yum install compat-libcap1.x86_64
13、查看安装日志
tail -100f /var/paic/app/oraInventory/logs/installActions2018-08-28_02-24-15PM.log
14、root用户执行文件
/var/paic/app/oracle/oraInventory/orainstRoot.sh
/var/paic/app/oracle/product/12.2.0.1/db_1/root.sh
15、配置监听
netca -silent -responsefile /var/paic/database/response/netca.rsp
第一次执行时报错的话就再执行一次就可以了