1. 程式人生 > >centos7 Unit https.service failed to load: No such file or directory.

centos7 Unit https.service failed to load: No such file or directory.



CentOS7.1,安裝http後,設定httpd為自動啟動

#systemctl enable httpd.service

# systemctl start https.service
Failed to start https.service: Unit https.service failed to load: No such file or directory.

錯誤的原因是沒有重新載入/usr/lib/systemd/system目錄下的service導致的。

# systemctl daemon-reload   (執行這個操作就能解決問題)
# systemctl restart httpd.service

重啟操作成功