在web瀏覽器中查看服務器並使用鼠標執行系統任務,很容易管理存儲、配置網絡和檢查日志等操作。
# 安裝cockpit
yum -y install cockpit
# 啟用cockpit
systemctl enable --now cockpit.socket #設置開機自啟動同時開啟服務一條命令就可以搞定
# 查看開機是否啟動
systemctl list-unit-files|grep cockpit
cockpit-motd.service static
cockpit.service static
cockpit.socket enabled
# enabled表示開機啟動
# 啟動cockpit服務
systemctl start cockpit.service
# 查看狀態
systemctl status cockpit.service
# 使用cockpit監聽9090端口
yum install net-tools
netstat -tulnp | grep 9090
# 如果系統防火牆開啟,則需要執行以下操作,添加cockpit服務到防火牆以打開9090端口。
firewall-cmd --add-service=cockpit --permanent
firewall-cmd --reload
打開瀏覽器,輸入 https://ip地址:9090
使用系統用戶登錄即可
登陸后右上角可以設置語言
其他功能有待慢慢發掘