原创作品,出自 “深蓝的blog” 博客,欢迎转载,转载时请务必注明以下出处,否则追究版权法律责任。
深蓝的blog:http://blog.csdn.net/huangyanlong/article/details/40181003
CentOS6.2上Oracle10g安装
1. 域名解析设置及网络配置
# vi /etc/hosts
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.56.103 hyl
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
--修改网卡配置
--若在安装系统时设置,此处可不进行修改
# Intel Corporation 82540EM Gigabit Ethernet Controller
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.56.103
NETMASK=255.255.255.0
HWADDR=08:00:27:29:DB:B2
ONBOOT=yes
~
# service network restart
--重启网卡使其生效
# vi /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=hyl
~
设置系统服务
禁用一些不必要的系统服务:
chkconfig iptables off
chkconfig ip6tables off
chkconfig cups off
chkconfig firstboot off
chkconfig wpa_supplicant off
chkconfig postfix off
禁用 SELinux:
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
设置 SSH:
sed -i 's/^GSSAPIAuthentication yes$/GSSAPIAuthentication no/' /etc/ssh/sshd_config
sed -i 's/#UseDNS yes/UseDNS no/' /etc/ssh/sshd_config
PS:设置完以上这两步以后,重启 Network 服务:
[root@hyl ~]# /etc/init.d/network restart
以上“设置系统服务”操作可以使用脚本一次性执行,但要保证脚本内容为在LINUX系统上编写的,参考如下:
#vi serverstop.sh
--编写关闭服务脚本
chkconfig iptables off
chkconfig ip6tables off
chkconfig cups off
chkconfig firstboot off
chkconfig wpa_supplicant off
chkconfig postfix off
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
sed -i 's/^GSSAPIAuthentication yes$/GSSAPIAuthentication no/' /etc/ssh/sshd_config
sed -i 's/#UseDNS yes/UseDNS no/' /etc/ssh/sshd_config
--执行关闭服务脚本