centos配置--常用命令

2017年3月6日 11:43:07

1. chkconfig 管理程序的运行级别

如:设置防火墙默认不开启

chkconfig --level 35 iptables off
运行级别 3(命令行),5(界面)不开启iptables
2. 配置网卡
虚拟机网卡模式 桥接
自己手动设定IP
配置网卡
cd /etc/sysconfig/network-scripts
------
[root@localhost network-scripts]# cat ifcfg-eth0 
DEVICE=eth0
TYPE=Ethernet
UUID=e94d49b5-92d0-448f-a2a3-9337d3c3949c
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=192.168.1.194
PREFIX=24
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
HWADDR=00:0C:29:1B:F6:A7
LAST_CONNECT=1488389050
------
启动网卡
ifup eth0
关闭网卡 
ifdown eth0





猜你喜欢

转载自blog.csdn.net/niu91/article/details/60573529
今日推荐