01,创建用户,用户组
[root@rac1 ~]# groupadd -g 501 oinstall
[root@rac1 ~]# groupadd -g 502 dba
[root@rac1 ~]# groupadd -g 503 asmadmin
[root@rac1 ~]# groupadd -g 504 asmdba
[root@rac1 ~]# groupadd -g 505 asmoper
[root@rac1 ~]# useradd -u 501 -g oinstall -G asmadmin,asmdba,asmoper grid
[root@rac1 ~]# useradd -u 502 -g oinstall -G dba,asmdba oracle
passwd oracle
passwd grid ----配置密码
02,配置hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
:: localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.171 rac1
192.168.0.177 rac2
192.168.0.173 rac1vip
192.168.0.174 rac2vip
172.168.0.171 rac1prv
172.168.0.177 rac2prv
192.168.0.176 dbscan
03,关闭时间同步
mv /etc/ntp.conf /etc/ntp.conf.bak
04, 修改内核
vim /etc/sysctl.conf
kernel.shmmni =
kernel.sem =
fs.file-max =
net.ipv4.ip_local_port_range =
net.core.rmem_default =
net.core.rmem_max =
net.core.wmem_default =
net.core.wmem_max =
sysctl -p 立即生效
05, 限制参数
/etc/security/limits.conf
grid soft nproc
grid hard nproc
grid soft nofile
grid hard nofile
oracle soft nproc
oracle hard nproc
oracle soft nofile
oracle hard nofile
06, 配置profile
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p
ulimit -n
else
ulimit -u -n
fi
umask
fi
07,登录限制
/etc/pam.d/login
session required pam_limits.so
08,创建目录
[root@rac1 ~]# mkdir -p /oracle/app/oraInventory
[root@rac1 ~]# chown -R grid:oinstall /oracle/app/oraInventory
[root@rac1 ~]# chmod -R 775 /oracle/app/oraInventory
[root@rac1 ~]# mkdir -p /oracle/11.2.0/grid/crs/
[root@rac1 ~]# chown -R grid:oinstall /oracle/11.2.0/grid
[root@rac1 ~]# chmod -R 775 /oracle/11.2.0/grid
[root@rac1 ~]# cd /oracle/11.2.0
[root@rac1 11.2.]# mkdir 11.2.0
[root@rac1 11.2.]# chown -R grid:oinstall 11.2.0
[root@rac1 11.2.]# chmod -R 775 11.2.0
[root@rac1 11.2.]# mkdir -p /oracle/app/oracle
[root@rac1 11.2.]# chown -R oracle:oinstall /oracle/app/oracle
[root@rac1 11.2.]# chmod -R 775 /oracle/app/oracle
[root@rac1 11.2.]# mkdir -p /oracle/app/oracle/product/11.2.0/db_1
[root@rac1 11.2.]# chown -R oracle:oinstall /oracle/app/oracle/product/11.2.0/db_1
[root@rac1 11.2.]# chmod -R 775 /oracle/app/oracle/product/11.2.0/db_1
09,关闭防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service
systemctl status firewalld.service
10.软件环境安装
rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' binutils \
compat-libstdc++- \
elfutils-libelf \
elfutils-libelf-devel \
gcc \
gcc-c++ \
glibc \
glibc-common \
glibc-devel \
glibc-headers \
ksh \
libaio \
libaio-devel \
libgcc \
libstdc++ \
libstdc++-devel \
make \
sysstat \
unixODBC \
unixODBC-devel
没有的使用
yum -y install *** (什么没有写什么)