A.
1.
编辑/etc/sysconfig/network-scripts/ifcfg-eth0,初始化网络参数(根据实际情况编辑)。
编辑/etc/hosts,加入主机名和IP(主机名用hostname或者uname –u命令查看)
2.
禁用一些不必要的系统服务
chkconfig iptables off chkconfig ip6tables off chkconfig cups off chkconfig firstboot off chkconfig wpa_supplicant off chkconfig postfix off |
3.
安装kernel-devel和kernel-headers,并且在更新系统时,禁止更新kernel:
yum -y install kernel-devel kernel-headers && echo exclude=kernel* >> /etc/yum.conf |
更新系统:
yum -y update |
安装常用软件:
yum -y install autoconf automake binutils-devel bison cpp dos2unix ftp gcc gcc-c++ lrzsz python-devel |
安装Oracle必需软件:
yum -y install compat-db compat-gcc-34 compat-gcc-34-c++ compat-libstdc++-33 glibc-* glibc-*.i686 libXpm-*.i686 libXp.so.6 libXt.so.6 libXtst.so.6 libgcc_s.so.1 ksh libXp libaio-devel numactl numactl-devel unixODBC unixODBC-devel |
注:安装完成以上软件后,建议重启系统。
4.
以下命令按顺序执行:
groupadd oinstall groupadd dba useradd -g oinstall -G dba oracle passwd oracle |
usermod -g oinstall -G dba oracle mkdir -p /usr/local/oracle chown -R oracle:oinstall /usr/local/oracle chmod -R 755 /usr/local/oracle |
5.
编辑/etc/sysctl.conf:
cat >> /etc/sysctl.conf << EOF kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65500 net.core.rmem_default = 4194304 net.core.wmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_max = 262144 EOF |
修改完成后,运行sysctl -p使设置生效。
6.
编辑/etc/security/limits.conf:
cat >> /etc/security/limits.conf << EOF oracle oracle oracle oracle EOF |