Centos 最小化安裝默認(rèn)沒有ifconfig 命令 只能通過(guò)ip add 查看IP地址
一、沒有yum
(1)cd /etc/sysconfig/network-scripts
(2)顯示所有l(wèi)s -lah?目錄文件
(3)編輯網(wǎng)卡 vi ifcfg-ens33(自己網(wǎng)卡名稱)? 把“ONBOOT”的值修改為"yes",CentOS最小化? 安裝的網(wǎng)卡默認(rèn) ? ? ? 不跟隨系統(tǒng)啟用
(4)shutdown -r now 重啟系統(tǒng)問題解決
二、沒有ifconfig
(1)檢查是否有ifconfig 配置文件
ls /sbin | grep ifconfig
(2)搜索ifconfig 安裝包
yum search ifconfig
(3)安裝網(wǎng)絡(luò)工具包
yum install -y net-tools.x86_64
三、開啟SSH
(1)安裝SSH服務(wù)
yum install -y openssh-server
(2)開啟SSH服務(wù)
? systemctl start sshd.service
(3) 設(shè)置SSH 隨機(jī)啟動(dòng)
? systemctl enable sshd.service