Linux 6.5(oracle 11.2.0.4)
1、解析主机、配置网络等
/etc/hosts
/etc/sysconfig/network
/etc/init.d/NetworkManager stop
chkconfig NetworkManager off
iptables -F
service iptables save
sed -ri 's/^SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux
2、配置yum
cd /etc/yum.repos.d/
touch yum_oel5.repo
vi yum_oel5.repo
添加以下内容:
[oel6]
name=oel6
baseurl=file:///mnt/Server
gpgcheck=0
enabled=1
yum clean all
yum repolist
yum list
yum install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc- gcc-c++ libaio-devel libaio libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel pdksh ksh compat-libcap1
Pdksh 一定要先装,不然后面会报错的
3、修改系统参数
调整内核参数,并使其生效
vi /etc/sysctl.conf
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
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
fs.aio-max-nr = 1048576
sysctl -p
修改limits.conf
vi /etc/security/limits.conf
oracle settings
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
grid soft stack 1024
修改/etc/pam.d/login
vi /etc/pam.d/login
session required /lib/security/pam_limits.so
session required pam_limits.so
修改/etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
修改/etc/csh.login
if ( $USER == "oracle" ) then
limit maxproc 16384
limit deors 65536
endif
4、
--添加用户和组(非Oracle Linux环境配置)
groupadd -g 501 oinstall
groupadd -g 502 dba
groupadd -g 503 oper
groupadd -g 504 asmadmin
groupadd -g 505 asmdba
groupadd -g 506 asmoper
useradd -u 500 -g oinstall -G dba,asmdba,asmadmin,oper oracle
useradd -u 507 -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid
注意,oper组不是必须的,dba,asmdba,asmadmin必须有
--修改grid和oracle用户密码
passwd oracle
passwd grid
--配置环境变量
grid:
export ORACLE_SID=+ASM
export ORACLE_BASE=/home/u01/grid
export ORACLE_HOME=$ORACLE_BASE/11.2.0
export PATH=$ORACLE_HOME/bin:$PATH:/usr/local/bin/:
export NLS_LANG=American_america.ZHS16GBK
export TEMP=/tmp
export TMP=/tmp
export TMPDIR=/tmp
umask 022
oracle:
ORACLE_SID=ydasm; export ORACLE_SID
ORACLE_BASE=/home/u01/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
GRID_HOME=/home/u01/grid/11.2.0; export GRID_HOME
NLS_DATE_FORMAT="YYYY:MM:DD HH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=american_america.ZHS16GBK; export NLS_LANG
PATH=.