Categories

How to install NginX on cPanel Based Server

NginX on cPanel Based Server
NginX Installation Is not Difficult and its very easy to install via shh Using Any Programe i use Putty for that. Advantage of installing NginX  on cpanel server is to reduce apache load so you host more websites on your small server or even host a big website on your server. For installation you need to login to your server root using Putty after connecting to putty please use below command to install NginX on your cpanel server.

# cd /usr/local/src

# wget http://nginxcp.com/nginxadmin2.8-stable.tar

# tar -xvf nginxadmin2.8-stable.tar

# cd publicnginx

# ./nginxinstaller install

# /etc/init.d/httpd restart

Installation is Finish Usually we get error of upgrading cpanel version while installing NginX on server Upgrade your version to the latest if you recieve error regarding  pyaml  the following error

Nginx Admin installer……Starting Install
Generating vhosts…
Traceback (most recent call last):
File “/scripts/createvhosts.py”, line 2, in ?
import yaml
File “/usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-i686.egg/yaml/__init__.py”, line 26
SyntaxError: ‘yield’ not allowed in a ‘try’ block with a ‘finally’ clause
Installing WHM interface…
deploying booster rockets
Traceback (most recent call last):
File “/usr/local/src/publicnginx/nginxinstaller2″, line 9, in ?
import createvhosts
File “/usr/local/src/publicnginx/createvhosts.py”, line 2, in ?
import yaml
File “/usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-i686.egg/yaml/__init__.py”, line 26
SyntaxError: ‘yield’ not allowed in a ‘try’ block with a ‘finally’ clause

——————————————————————————————————————————

Then Run The Following Command to Fix this issue

For i686 architecture :-

# easy_install Pyyaml==3.09 # rm -f /usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-i686.egg

For x86_64 architecture :-

# easy_install Pyyaml==3.09 # rm -f /usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-x86_64.egg

——————————————————————————————————————————

After Fixing issue try to install NginX again by Following Command

# ./nginxinstaller install

# /etc/init.d/httpd restart

Now Nginx run on the port no:80 and apache run on the port no.8081.You can manage the nginx through WHM >> Main >> Nginx Admin

——————————————————————————————————————————

If you Want to unistall Nginx From your Cpanel server Use the Following Command

#  cd /usr/local/src
#  wget http://nginxcp.com/nginxadmin2.8-stable.tar
#  tar xf nginxadmin2.8-stable.tar
#  cd publicnginx
#  ./nginxinstaller uninstall

——————————————————————————————————————————-

Leave a Comment

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>