最近更新ubuntu下的nginx,报了以下的错误:
正在设置nginx-core(1.4.6-1ubuntu3.1)...
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
invoke-rc.d: initscript nginx,action "start" failed.
nginx: [emerg] still could not bind()
invoke-rc.d: initscript nginx,action "start" failed.
可以看到,80端口被占用,方法很简单,使用如下命令解除端口的占用就ok了.
sudo fuser -k 80/tcp