Linux安装后常规配置
时间:2010-11-18 来源:xuxic
1.不需要安装图形界面
2.安装开发包,以免以后麻烦
3.语言最好选择英文,如果需要中文支持,选择zh_CN.gb2312
不然虚拟终端软件会显示乱码
vi /etc/profie
export LANG=zh_CN.gb2312 4.更改sshd端口
vi /etc/ssh/sshd_config
port 2002 5.设置防火墙
chkconfig --level 2345 iptables off //关闭系统缺省的防火墙 vi /etc/rc.d/rc.local
iptables -P INPUT DROP iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 2002 -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
6.网卡设置
vi /etc/resolv.conf
nameserver 202.96.134.133
nameserver 202.96.128.68 vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=203.86.10.20
NETMASK=255.255.255.240
GATEWAY=203.86.10.17 7. ntp
contab -e
*/1 * * * * /usr/sbin/ntpdate 218.75.4.130 211.51.221.130 >/dev/null 2>&1
不然虚拟终端软件会显示乱码
vi /etc/profie
export LANG=zh_CN.gb2312 4.更改sshd端口
vi /etc/ssh/sshd_config
port 2002 5.设置防火墙
chkconfig --level 2345 iptables off //关闭系统缺省的防火墙 vi /etc/rc.d/rc.local
iptables -P INPUT DROP iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 2002 -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
6.网卡设置
vi /etc/resolv.conf
nameserver 202.96.134.133
nameserver 202.96.128.68 vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=203.86.10.20
NETMASK=255.255.255.240
GATEWAY=203.86.10.17 7. ntp
contab -e
*/1 * * * * /usr/sbin/ntpdate 218.75.4.130 211.51.221.130 >/dev/null 2>&1
相关阅读 更多 +