centos7配置無線網卡:
在虛擬機為nat的網絡連接下(就是默認的那個),centos7默認網卡未激活。
可以設置
文件 /etc/sysconfig/network-scripts/ifcfg-enp0s3(這里的enp0s3不是固定的,看你具體情況,但是基本是en開頭的)
將 ONBOOT=no 改為 ONBOOT=yes
保存后重啟網卡: service network restart
centos7重啟防火牆:
防火牆配置后執行service iptables save/restart 出現”Failed to restart iptables.service: Unit iptables.service failed to load: No such file or directory.”錯誤,在CentOS 7或RHEL 7或Fedora中防火牆由firewalld來管理,當然你可以還原傳統的管理方式。
1.systemctl stop firewalld
2.systemctl mask firewalld
3.yum install iptables-services(注:安裝iptables-services)
4.systemctl enable iptables(注:設置開機啟動)
5.
systemctl [stop|start|restart] iptables
#or
service iptables [stop|start|restart]
6.
service iptables save
#or
/usr/libexec/iptables/iptables.init save