Arch - Nginx卸载后仍然处于活动状态?
问题描述:
我已经卸载了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'.
答
你可以只用sudo systemctl stop nginx.service
停止nginx的服务或@teelou提到,使用端口80
答
这是因为在你的浏览器缓存文件可能杀掉进程。你应该试试这个:goto setting
- >选择clear browsing data
- >选择cached image and files
- >点击clear browsing data
然后刷新你的页面。这与我合作。
刚杀nginx:'pkill -9 nginx' –
@NarūnasK谢谢。我使用'sudo fuser -k 80/tcp',它似乎没问题! – laukok