我已經卸載了nginx。所以,如果我再次嘗試:Arch - Nginx卸載後仍然處於活動狀態?
$ sudo pacman -Rns nginx
error: target not found: nginx
但它仍然是我的默認端口上運行時,我檢查:
$ sudo systemctl status nginx
Failed to dump process list, ignoring: Unit nginx.service not found.
● nginx.service
Loaded: not-found (Reason: No such file or directory)
Active: active (running) since Mon 2017-04-10 04:28:41 BST; 1 weeks 3 days ago
Main PID: 26966 (nginx)
CGroup: /system.slice/nginx.service
即使它說nginx.service not found
但它仍然說,這是積極的:
Active: active (running) since Mon 2017-04-10 04:28:41 BST; 1 weeks 3 days ago
這是怎麼回事?我怎樣才能完全刪除它?
任何想法?
我正在嘗試安裝Apache。但是我有一個來自Apache的錯誤,因爲它說端口80已經被使用了!
$ sudo systemctl status httpd
● httpd.service - Apache Web Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2017-04-20 23:32:36 BST; 14s ago
Process: 956 ExecStop=/usr/bin/httpd -k graceful-stop (code=exited, status=0/SUCCESS)
Process: 954 ExecStart=/usr/bin/httpd -k start -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 954 (code=exited, status=1/FAILURE)
Apr 20 23:32:35 localhost systemd[1]: Started Apache Web Server.
Apr 20 23:32:35 localhost httpd[954]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Apr 20 23:32:35 localhost httpd[954]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Apr 20 23:32:35 localhost httpd[954]: no listening sockets available, shutting down
Apr 20 23:32:35 localhost httpd[954]: AH00015: Unable to open logs
Apr 20 23:32:36 localhost systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Apr 20 23:32:36 localhost httpd[956]: httpd (no pid file) not running
Apr 20 23:32:36 localhost systemd[1]: httpd.service: Unit entered failed state.
Apr 20 23:32:36 localhost systemd[1]: httpd.service: Failed with result 'exit-code'.
剛殺nginx:'pkill -9 nginx' –
@NarūnasK謝謝。我使用'sudo fuser -k 80/tcp',它似乎沒問題! – laukok