sudo apt-get install nginx 即可

    安装后nginx已经启动,再执行nginx启动会提示下面的错误

    1. lijian@lijian-virtual-machine:/etc/apt$ sudo nginx
    2. nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
    3. nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
    4. nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
    5. nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
    6. nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
    7. nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
    8. nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
    9. nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
    10. nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
    11. nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
    12. nginx: [emerg] still could not bind()