Nutshell

Follow by Email

 

NginX with cPanel WHM/Cpanel Server

Thursday

How to install NginX on cPanel WHM Server

Install NginxAdmin to WHM/Cpanel for Optimizing the Performance.

Diffrence between apache and nginx:-

Apache is a process-based server, while nginx is an event-based web server.Nginx known as “engineX” probably the best-known asynchronous server and Apache is undoubtedly the best known process-based server.

The main advantage of the asynchronous approach is scalability. In a process-based server, each simultaneous connection requires a thread which incurs significant overhead. An asynchronous server, on the other hand, is event-driven and handles requests in a single (or at least, very few) threads.

While a process-based server can often perform on par with an asynchronous server under light loads, under heavier loads they usually consume far too much RAM which significantly degrades performance. Also, they degrade much faster on less powerful hardware or in a resource-restricted environment such as a VPS.

Pulling numbers from thin air for illustrative purposes, serving 10,000 simultaneous connections would probably only cause Nginx to use a few megabytes of RAM whereas Apache would probably consume hundreds of megabytes (if it could do it at all).

Nginx+cPanel+Apache= Performance boosted secured hosting server

How NginxAdmin will help your cPanel server to increase the performance ?

NginxAdmin is WHM interface of Nginx installer for cPanel server. This plugin will increase your server performance and decrease the server Apache Load. So you can host more websites in a cPanel server than usual.Nginx is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption.Unlike traditional servers, Nginx doesn’t rely on threads to handle requests. Instead it uses a much more scalable event-driven architecture. This architecture uses small, but more importantly, predictable amounts of memory under load.

Even if you don’t expect to handle thousands of simultaneous requests, you can still benefit from Nginx’s high-performance and small memory footprint. Nginx scales in all directions: from the smallest VPS all the way up to clusters of servers.

To install copy and execute following lines :-

# 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

Troubleshooting Installation:-

If you receive any pyaml related error or the following error

—————————–
Welcome to the 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 execute following commands ….
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

Then Again run the following commands :-

# ./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


To uninstall nginx use following :-

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

0 comments:

Post a Comment

Total Pageviews