redhat相关配置

网络配置:

vi /etc/sysconfig/network-scripts/ifcfg-eth

BOOTPROTO=static
ONBOOT=yes
IP配置
IPADDR=192.168.31.102
NETMASK=255.255.255.0
GATEWAY=192.168.31.1
DNS1=192.168.31.1
 
 
redhat6:防火墙:
1. 永久性生效
开启:
chkconfig iptables on
关闭:
chkconfig iptables off
2. 即时生效,重启后失效
开启:
service iptables start
关闭:
service iptables stop
 
 
redhat7:防火墙:
查看防火墙状态。
systemctl status firewalld
临时关闭防火墙命令。重启电脑后,防火墙自动起来。
systemctl stop firewalld
永久关闭防火墙命令。
重启后,防火墙不会自动启动。
systemctl disable firewalld
打开防火墙命令。
systemctl enable firewalld

猜你喜欢

转载自www.cnblogs.com/tiankafei/p/10339783.html