日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > centos >内容正文

centos

Centos中常见error(网卡、网络、防火墙)

發布時間:2024/9/3 centos 90 豆豆
生活随笔 收集整理的這篇文章主要介紹了 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.
  • 輸入以下命令即可解決
[root@localhost zzc]# systemctl stop NetworkManager [root@localhost zzc]# systemctl disable NetworkManager [root@localhost zzc]#
  • 再重啟網卡服務,不會報錯
[root@localhost home]# systemctl restart network [root@localhost home]#

三:橋接模式下無法上網

總結

以上是生活随笔為你收集整理的Centos中常见error(网卡、网络、防火墙)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。