Nginx 安装在我们的 ubuntu 12.04 服务器上,我们想要找到版本。以下是我们所做的:
admin@ibm-testbox:/opt/nginx/sbin$ nginx -v
The program 'nginx' can be found in the following packages:
* nginx-extras
* nginx-full
* nginx-light
* nginx-naxsi
Try: sudo apt-get install <selected package>
admin@ibm-testbox:/opt/nginx/sbin$ nginx -V
The program 'nginx' can be found in the following packages:
* nginx-extras
* nginx-full
* nginx-light
* nginx-naxsi
Try: sudo apt-get install <selected package>
然后我们尝试查找 nginx 是否正在运行。输出如下:
admin@ibm-testbox:/opt/nginx/sbin$ ps waux | grep nginx
root 7652 0.0 0.0 37560 1100 ? Ss Dec20 0:00 nginx: master process /opt/nginx/sbin/nginx
nobody 7653 0.0 0.0 38008 2316 ? S Dec20 0:00 nginx: worker process
admin 23376 0.0 0.0 9388 924 pts/0 S+ 08:35 0:00 grep --color=auto nginx
nginx 安装了 PhusionPassenger 模块。为什么 nginx -v (-V) 没有显示版本?
答案1
似乎 nginx 没有正确安装。您可以通过以下方式重新安装 nginx
apt-get purge nginx*
apt-get autoremove
apt-get update
apt-get install nginx-full
您也可以尝试易引擎在 ubuntu 服务器上安装和管理网站。