导航: 首页 » 使用说明 » 如何在HostGator服务器控制面板中安装Nginx

  如何在HostGator服务器控制面板中安装Nginx

发布时间: 2017年05月13日 作者: nisheng
如何在HostGator服务器控制面板中安装Nginx已关闭评论

有些用户在使用HostGator独立服务时需要使用Nginx,但是目前cpanel控制面板只支持Apache,那么这时候用户就需要使用第三方插件了,安装相应的插件后便可以使用Nginx,但是Nginx官方是不提供的后期支持的,如果在使用后期遇到什么问题,只能由插件提供商来提供Nginx的后期支持。

Cpanel官方提供了以下两种插件:

http://cpnginx.com/    (收费)

http://www.nginxcp.com/  (免费)

具体安装实力可参考:http://www.nginxcp.com/

Nginx Admin Install instruction:

cd /usr/local/src

wget http://nginxcp.com/latest/nginxadmin.tar

tar xf nginxadmin.tar

cd publicnginx

./nginxinstaller install

重启即可

如何判断是否已经成功安装Nginx

rpm -qa|grep httpd #查看apache包,找到名字(例如httpd-2.2.15-15.el6_2.1.x86_64)后用下面命令删除

rpm -e httpd-2.2.15-15.el6_2.1.x86_64 #不过要先把依赖apache的包删除

或者

yum list|grep httpd #查看apache包名,例如httpd.x86_64

yum erase httpd.x86_64 #相关依赖包自动会被删除

查看nigix是否在正常运行,需要用linux命令查看nginx运行情况。

执行命令:

ps -A | grep nginx

如果返回结果,说明有nginx在运行,服务已经启动。

如果不怕nginx关闭的话。也可以执行:

service nginx restart

把nginx服务重启,在重启时,也可以看到具体有没有什么地方出错

以上便是如何在HostGator独立服务器cpanel控制面板中安装Nginx的教程,希望可以帮到需要的朋友。



TAG: , ,
Filed Under:使用说明

Comments are closed.