Centos中常见error(网卡、网络、防火墙)
生活随笔
收集整理的這篇文章主要介紹了
Centos中常见error(网卡、网络、防火墙)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
一:Centos使用前需了解的
1:網卡
centos6的網卡重啟方法:
service network restart
centos7的網卡重啟方法:
systemctl restart network
2:防火墻
開啟防火墻:systemctl start firewalld
關閉防火墻:systemctl stop firewalld
查看防火墻狀態:systemctl status firewalld.service
開機自動啟動:systemctl enable firewalld
關閉防火墻并設置開機不啟動:systemctl disable firewalld
查看開機是否啟動:chkconfig --list|grep network(RHLE6)
3、關閉安全增強性(在生產環境中一定要關閉):
vim /etc/selinux/config或vim /etc/sysconfig/selinux
二:啟動網卡服務錯誤
systemctl start network 啟動網卡服務報錯
[root@localhost home]# systemctl restart network Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journal ctl -xe" for details.- 提示錯誤:
Job for network.service failed because the control process exited with error code. See “systemctl status network.service” and “journal
ctl -xe” for details
解決思路:查看錯誤日志
[root@localhost home]# systemctl status network.service ● network.service - LSB: Bring up/down networkingLoaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)Active: failed (Result: exit-code) since Sun 2021-08-01 11:03:33 PDT; 13min agoDocs: man:systemd-sysv-generator(8)Process: 4841 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)CGroup: /system.slice/network.service└─999 /sbin/dhclient -1 -q -lf /var/lib/dhclient/dhclient-bbefb2ab-4633-33f7-b5b5-dffb4e3eb945-ens33.lease -pf /var/run/...Aug 01 11:03:33 localhost.localdomain network[4841]: RTNETLINK answers: File exists Aug 01 11:03:33 localhost.localdomain network[4841]: RTNETLINK answers: File exists Aug 01 11:03:33 localhost.localdomain network[4841]: RTNETLINK answers: File exists Aug 01 11:03:33 localhost.localdomain network[4841]: RTNETLINK answers: File exists Aug 01 11:03:33 localhost.localdomain network[4841]: RTNETLINK answers: File exists Aug 01 11:03:33 localhost.localdomain network[4841]: RTNETLINK answers: File exists Aug 01 11:03:33 localhost.localdomain systemd[1]: network.service: control process exited, code=exited status=1 Aug 01 11:03:33 localhost.localdomain systemd[1]: Failed to start LSB: Bring up/down networking. Aug 01 11:03:33 localhost.localdomain systemd[1]: Unit network.service entered failed state. Aug 01 11:03:33 localhost.localdomain systemd[1]: network.service failed.- 輸入以下命令即可解決
- 再重啟網卡服務,不會報錯
三:橋接模式下無法上網
總結
以上是生活随笔為你收集整理的Centos中常见error(网卡、网络、防火墙)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【老王来了】之不眠不休教网络协议(RIP
- 下一篇: 【AWSL】之Linux常用命令,学习L