天天看點

Centos7配置小結

問題一:CentOS 7.0 VMware虛拟機沒有網卡 

1:Vmware無法識别網卡,導緻虛拟機無法上網問題

2:Vmware虛拟機無法橋接網卡,提示無法将網絡更改為橋接模式沒有未橋接的主機網絡擴充卡

①:解決方法由于Vmware虛拟網卡和linux相容問題導緻驅動無法正常安裝,預設的網卡類型不相容找到我們的Vmware虛拟機檔案夾,将VMware 虛拟機配置 (.vmx),追加一條設定我們網卡類型ethernet0.virtualDev = "e1000"。

②:解決方法設定Vmware橋接設定,将所有橋接卡net0 net8全部删除,然後重新開機我們電腦,再點選恢複預設即可解決原因:應該由于之前Vm網卡沒有驅動正常。

問題二:CentOS7執行ifconfig Command not found 未找到指令

解決方法:[root@chaoge ~]# yum install net-tools

服務管理與優化

最小化安裝的Centos7系統并沒有nano、vim、wget、curl、ifconfig、lsof指令,這裡首先安裝一下:

   yum -y install nano vim wget curl net-tools lsof

可以通過netstat和lsof檢視系統都運作了哪些服務,将不必要的進行關閉

systemctl stop postfix

systemctl stop avahi-daemon

systemctl disable postfix

systemctl disable avahi-daemon

systemctl list-unit-files    檢視正在運作服務的狀态報告

systemctl start httpd.service    啟動服務

systemctl stop  httpd.service    關閉服務

systemctl restart  httpd.service 重新開機服務

systemctl reload   httpd.service 重新加載服務

systemctl disable  httpd.service 開機不啟動

systemctl enable   httpd.service 開機啟動

systemctl status   httpd.service 檢視服務運作狀态

systemctl show     httpd.service 顯示服務或任務的屬性

systemctl list-dependencies  httpd.service  檢查服務依賴關系

systemctl is-enabled  httpd.service  檢查服務是否開機啟動及級别

systemctl -H 192.168.117.128 start httpd.service   啟動192.168.117.128機器上的httpd服務

本文轉自奔跑在路上部落格51CTO部落格,原文連結http://blog.51cto.com/qiangsh/1669674如需轉載請自行聯系原作者

qianghong000

繼續閱讀