CentOS7.2で、nginxを起動しようとしたら怒られた。
[bash] $ sudo systemctl start nginxJob for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
[/bash]
メッセージに従って、
[bash]
$ journalctl -xe
[/bash]
すると、
[bash]
nginx: [emerg] bind() to unix:/var/run/nginx.sock failed (98: Address already in use)
[/bash]
って出る。そこで、
/var/run/以下を確認すると、nginx.sockが存在。
こいつを消してあげると無事起動できるようになりました。