CentOS7的網絡卡開機自啟動

2021-07-31 05:41:04 字數 704 閱讀 3495

本來以為centos7的網絡卡開機啟動應該是:systemctl enable  network

但是設定了始終還是沒有開機啟動網路服務,最好只好去改配置檔案

vi /etc/sysconfig/network-scrips/ifcfg-ens33

type=ethernet

bootproto=none

defroute=yes

ipv4_failure_fatal=no

ipv6init=yes

ipv6_autoconf=yes

ipv6_defroute=yes

ipv6_failure_fatal=no

ipv6_addr_gen_mode=stable-privacy

name=ens33

uuid=3c881316-6e92-40c1-9f99-7820a4e27ae6

device=ens33

onboot=yes

dns1=192.168.0.1

ipaddr=192.168.0.53

prefix=24

gateway=192.168.0.1

ipv6_peerdns=yes

ipv6_peerroutes=yes

ipv6_privacy=no

將其中onboot引數的值改為yes,即可了,這是犯的錯誤,特此記錄下,還是該檔案比較保險!

關於CentOS7的開機自啟動

在centos7中,如果需要使用rc.local進行開機自啟動,需要給rc.local加執行許可權chmod x etc rc.local配置檔案存在於以下三個目錄中 1.etc systemd system 存放系統啟動的預設級別及啟動的unit的軟連線,優先順序最高 2.run systemd ...

CentOS7 的開機自啟動systemctl

centos7自啟項已不用chkconfig改為 systemctl list unit filessystemctl enable redis systemctl disable redis根據字尾名識別型別 1.service 定義系統服務的啟動 2.target定義了系統啟動級別的標籤,sys...

CentOS7設定開機自啟動命令大全

任務 舊指令新指令 使某服務自動啟動 使某服務不自動啟動 檢查服務狀態 systemctl status httpd.service 服務詳細資訊 systemctl is active httpd.service 僅顯示是否 active 顯示所有已啟動的服務 chkconfig list sys...