Centos7 常用配置

配置静态地址

BOOTPROTO="static" #dhcp改为static
ONBOOT="yes" #开机启用本配置
IPADDR=192.168.7.106 #静态IP
GATEWAY=192.168.7.1 #默认网关
NETMASK=255.255.255.0 #子网掩码
DNS1=192.168.7.1 #DNS 配置

注意:要在桥接模式下,ping通百度,一定要配置dns和网关

2、firewalld的基本使用
启动: systemctl start firewalld
关闭: systemctl stop firewalld
查看状态: systemctl status firewalld 
开机禁用  : systemctl disable firewalld
开机启用  : systemctl enable firewalld

 

posted @ 2019-07-24 22:30  fanrenren  阅读(264)  评论(0编辑  收藏  举报