<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Unix Surgeon</title>
	<atom:link href="http://www.unixsurgeon.com/kb/feed" rel="self" type="application/rss+xml" />
	<link>http://www.unixsurgeon.com/kb</link>
	<description>Linux Hosting Solution, Linux Web Hosting Solution, Learn Linux, How to, Server Management , Web Hosting Solution , Linux Solution , KnowledgeBase , Linux Tutorial</description>
	<lastBuildDate>Mon, 16 Apr 2012 08:19:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>nagios daemon is not running cannot send restart command</title>
		<link>http://www.unixsurgeon.com/kb/nagios-daemon-is-not-running-cannot-send-restart-command.html</link>
		<comments>http://www.unixsurgeon.com/kb/nagios-daemon-is-not-running-cannot-send-restart-command.html#comments</comments>
		<pubDate>Mon, 16 Apr 2012 08:19:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Monitoring Tool]]></category>
		<category><![CDATA[Open Source Applications]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=367</guid>
		<description><![CDATA[Nagios daemon is not running cannot send restart command in NagiosQL
I have nagiosql 3.1.1 earlier today I have upgraded nagiosql with version 3.2.0,upgradation done successfully,every thing is working fine,but once i go to Administration &#62;&#62; Support to check the nagiosql settings,it displays two errors :-
1. Nagios process file :- failed (file is missing).
2. Nagios binary [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Nagios daemon is not running cannot send restart command in </strong><strong>NagiosQL</strong></p>
<p>I have nagiosql 3.1.1 earlier today I have upgraded nagiosql with version 3.2.0,upgradation done successfully,every thing is working fine,but once i go to Administration &gt;&gt; Support to check the nagiosql settings,it displays two errors :-</p>
<p>1. Nagios process file :- failed (file is missing).<br />
2. Nagios binary file :- failed (file is missing).</p>
<p style="text-align: center;"></p>
<p>Even when i tried to restart the nnagios through nagiosql,it throws the below error:-</p>
<p><strong>&#8220;nagios daemon is not running cannot send restart command&#8221;</strong></p>
<p>Solution :- NagiosQL is looking for /var/run/nagios/nagios.pid file.. However, nagios is using your nagioslocation/nagios.lock file..</p>
<p>Just make a link from /var/run/nagios.pid which points to /usr/local/nagios/var/nagios.lock,,,</p>
<p>To do this just login to your NagiosQL Admin panel ;-</p>
<p>1. Click on Administration &gt;&gt; Config Targets<br />
2. Change your settings here (Nagios binary file &amp; Nagios process file path).</p>
<p style="text-align: center;"></p>
<p>Enjoy Linux&#8230;!!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/nagios-daemon-is-not-running-cannot-send-restart-command.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NagiosQL for Nagios</title>
		<link>http://www.unixsurgeon.com/kb/nagiosql-for-nagios.html</link>
		<comments>http://www.unixsurgeon.com/kb/nagiosql-for-nagios.html#comments</comments>
		<pubDate>Mon, 16 Apr 2012 07:54:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Monitoring Tool]]></category>
		<category><![CDATA[Open Source Applications]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Nagiosql]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=365</guid>
		<description><![CDATA[NagiosQL is a web based administration tool designed for Nagios, but might also work with forks. It helps you to easily build a complex configuration with all options, manage and use them. NagiosQL is based on a webserver with PHP, MySQL and local file or remote access to the Nagios configuration files.

The main features are:-
1. [...]]]></description>
			<content:encoded><![CDATA[<p>NagiosQL is a web based administration tool designed for Nagios, but might also work with forks. It helps you to easily build a complex configuration with all options, manage and use them. NagiosQL is based on a webserver with PHP, MySQL and local file or remote access to the Nagios configuration files.</p>
<p style="text-align: center;"></p>
<p>The main features are:-</p>
<p>1. Create, delete, modify and copy settings<br />
2. Create and export configuration files<br />
3. Create and download configuration files<br />
4. Easy configuration import<br />
5. Auto backup configuration files<br />
6. Consistency checks<br />
7. Syntax verification<br />
8. User management<br />
9. Instant activation of new configs<br />
10. Many translations<br />
11. Easy Installation wizard<br />
12. MySQL database platform</p>
<p style="text-align: center;"></p>
<p>You can download the document &amp; application with the followign url :-</p>
<p><a href="http://www.nagiosql.org/documentation.html">Documentation</a><br />
<a href="http://www.nagiosql.org/files/category/2-download-release.html">Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/nagiosql-for-nagios.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recover/Retrive mailid password in plesk.</title>
		<link>http://www.unixsurgeon.com/kb/recoverretrive-mailid-password-in-plesk.html</link>
		<comments>http://www.unixsurgeon.com/kb/recoverretrive-mailid-password-in-plesk.html#comments</comments>
		<pubDate>Thu, 29 Mar 2012 03:46:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Plesk]]></category>
		<category><![CDATA[password in plesk]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=363</guid>
		<description><![CDATA[Some time you need the password of your mailid when you forgot the password, In my plesk server, I have several domains and corresponding email addresses,  This is pretty lame if you ask me. The reason for this is that mail is not handled on the domain level, but rather the username level. That is [...]]]></description>
			<content:encoded><![CDATA[<p>Some time you need the password of your mailid when you forgot the password, In my plesk server, I have several domains and corresponding email addresses,  This is pretty lame if you ask me. The reason for this is that mail is not handled on the domain level, but rather the username level. That is a whole other issue though.</p>
<p>If you want to get your existing password,this article will help you. Login into mysql as the root admin. There is a databases psa db which stands for Plesk Server Administration.</p>
<p style="text-align: center;"></p>
<p><strong>mysql&gt; SELECT mail.mail_name, domains.name from mail LEFT OUTER JOIN domains ON domains.id = mail.dom_id;<br />
+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| mail_name | name            |<br />
+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| ads       | example.com     |<br />
| xyz       | example.com     |<br />
| chen      | example.com     |<br />
+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+</strong></p>
<p>You will get the details of mailid &amp; domainname,But I needed to find the passwords for these mailid&#8217;s,for the same you have to run the following query:-</p>
<p style="text-align: center;"></p>
<p><strong>mysql&gt; SELECT accounts.id, mail.mail_name, accounts.password, domains.name FROM domains LEFT JOIN mail ON domains.id = mail.dom_id LEFT JOIN accounts ON mail.account_id = accounts.id;<br />
+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| id   | mail_name | password       | name            |<br />
+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
|    4 | ads       | !bh2012    | example.com         |<br />
|    7 | xyz       | x@y2012    | example.com         |<br />
|    8 | chen      | pho2012    | example.com         |<br />
+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
7 rows in set (0.01 sec)</strong></p>
<p><strong> </strong></p>
<p><strong>mysql&gt; exit</strong></p>
<p>It will display you the mailid,password &amp; domainname.</p>
<p>Enjoy Linux.. <img src='http://www.unixsurgeon.com/kb/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/recoverretrive-mailid-password-in-plesk.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Get a real root shell &#124; Nexenta</title>
		<link>http://www.unixsurgeon.com/kb/how-to-get-a-real-root-shell-nexenta.html</link>
		<comments>http://www.unixsurgeon.com/kb/how-to-get-a-real-root-shell-nexenta.html#comments</comments>
		<pubDate>Tue, 20 Mar 2012 03:41:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux tutorials]]></category>
		<category><![CDATA[Nexenta]]></category>
		<category><![CDATA[Open Source Applications]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=360</guid>
		<description><![CDATA[The Nexentastor is a power pack storage solution,You can do almost everything you need from the web based GUI.There’s a few more things you can do from the character based Nexenta Management Console (NMC).Sometimes, though, you may want a root shell…
When you log in as root on a Nexenta box, you get the nmc console.
People [...]]]></description>
			<content:encoded><![CDATA[<p>The Nexentastor is a power pack storage solution,You can do almost everything you need from the web based GUI.There’s a few more things you can do from the character based Nexenta Management Console (NMC).Sometimes, though, you may want a root shell…</p>
<p>When you log in as root on a Nexenta box, you get the nmc console.</p>
<p>People that really like to break things fiddle like an honest to goodness root shell.  If you really want a  root shell, then do:</p>
<p style="text-align: center;"></p>
<p>[root@unixsurgeon ~]$ <strong>ssh root@my_nexenta</strong><br />
Password:<br />
Last login: Wed AUG 20 01:34:10 2010 from unixsurgeon<br />
nmc@my_nexenta:/$ <strong>option expert_mode = 1</strong></p>
<p>nmc@my_nexenta:/$ <strong>!bash</strong><br />
You are about to enter the Unix (&#8221;raw&#8221;) shell and execute low-level Unix command(s). Warning: using low-level Unix commands is not recommended! Execute?  (y/n) &lt;press y&gt;</p>
<p>now it will place you at root shell.<br />
root@my_nexenta:/volumes#</p>
<p>root@my_nexenta:/volumes# <strong>&lt;Any root related command&gt;</strong><br />
root@my_nexenta:/volumes#<strong> exit</strong><br />
exit</p>
<p>Important: To re-sync the appliance&#8217;s management state information, please consider running<strong> &#8217;setup appliance nms restart&#8217;</strong> command.</p>
<p style="text-align: center;"></p>
<p>nmc@my_nexenta:/$</p>
<p>Probably is a good idea to run <strong>‘setup appliance nms restart’</strong>, seeing as they told you to…</p>
<p>Enjoy Linux.. <img src='http://www.unixsurgeon.com/kb/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/how-to-get-a-real-root-shell-nexenta.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get full path of a running process in linux</title>
		<link>http://www.unixsurgeon.com/kb/get-full-path-of-a-running-process-in-linux.html</link>
		<comments>http://www.unixsurgeon.com/kb/get-full-path-of-a-running-process-in-linux.html#comments</comments>
		<pubDate>Tue, 20 Mar 2012 03:14:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux tutorials]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[pstree]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=358</guid>
		<description><![CDATA[Linux &#8211; Get full path of a running process  :- There is 2 methods to get the full path of a running process in linux.
First method  :- /proc/&#60;pid&#62;/exe is a symlink to the actual exe. Here&#8217;s what I get for a process httpds running on linux machine with pid 19712 :-

[root@unixsurgeon /]# ls -la /proc/19712/exe
lrwxrwxrwx [...]]]></description>
			<content:encoded><![CDATA[<p>Linux &#8211; Get full path of a running process  :- There is 2 methods to get the full path of a running process in linux.</p>
<p><strong>First method  :-</strong> /proc/&lt;pid&gt;/exe is a symlink to the actual exe. Here&#8217;s what I get for a process httpds running on linux machine with pid 19712 :-</p>
<p style="text-align: center;"></p>
<p>[root@unixsurgeon /]# <strong>ls -la /proc/19712/exe</strong><br />
lrwxrwxrwx 1 apache apache 0 Mar 20 11:02 /proc/19712/exe -&gt; /dev/shm/-lib/httpds<br />
[root@unixsurgeon /]#</p>
<p><strong>Second Method :-</strong> With ps command we can get the full path:</p>
<p>[root@unixsurgeon /]# <strong>ps u -p 19712</strong><br />
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND<br />
apache   19712  0.0  0.0   1912   652 ?        S    Mar19   0:00 /usr/bin/httpd<br />
[root@unixsurgeon /]#</p>
<p>Enjoy Linux <img src='http://www.unixsurgeon.com/kb/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: center;"></p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/get-full-path-of-a-running-process-in-linux.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup Nginx as Reverse Proxy with Apache.</title>
		<link>http://www.unixsurgeon.com/kb/setup-nginx-as-reverse-proxy-with-apache.html</link>
		<comments>http://www.unixsurgeon.com/kb/setup-nginx-as-reverse-proxy-with-apache.html#comments</comments>
		<pubDate>Wed, 15 Feb 2012 12:26:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux tutorials]]></category>
		<category><![CDATA[Open Source Applications]]></category>
		<category><![CDATA[lamp server]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[reverse proxy]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=354</guid>
		<description><![CDATA[cPanel: Setup Nginx as Reverse Proxy with Apache
WHM/Cpanel comes by default with Apache web server. That doesn&#8217;t mean that we can&#8217;t integrate Nginx &#8220;EngineX&#8221;. With some minor changes, we can install Nginx to listen
on port 80 and forward any PHP request to Apache to handle on another port like 8081. Apache is not really good [...]]]></description>
			<content:encoded><![CDATA[<p><strong>cPanel: Setup Nginx as Reverse Proxy with Apache</strong></p>
<p>WHM/Cpanel comes by default with Apache web server. That doesn&#8217;t mean that we can&#8217;t integrate Nginx &#8220;EngineX&#8221;. With some minor changes, we can install Nginx to listen</p>
<p>on port 80 and forward any PHP request to Apache to handle on another port like 8081. Apache is not really good in handling static files, so we pass this task to</p>
<p>Nginx. You will notice that your memory and CPU will decrease once you have done this setup.</p>
<p>Warning: This setting is not suitable for shared hosting environment. I strongly recommend you to apply this if you have 1 busy website running under cPanel. Make sure</p>
<p>you have compiled your Apache modules and features using EasyApache.</p>
<p><strong>If you want nginx for shared hosting,please refer the following post/article :-</strong></p>
<p>I am using variables as below:</p>
<p>OS: CentOS 5.6 32bit<br />
cPanel: cPanel 11.30.1 (build 5)<br />
Domain IP: 10.20.30.11<br />
Apache port: 8081<br />
Domain: unixsurgeon.com<br />
User: unixsurgeon<br />
Home directory: /home/unixsurgeon</p>
<p style="text-align: center;"></p>
<p>1. Since Nginx will be reverse proxy for Apache, we don’t want our log file to record the proxy IP. We want the real IP as usual. This will make sure our stats page</p>
<p>like Webalizer and AWstats will record the correct information. So we need to install mod_rpaf which is “Reverse Proxy Add Forward” module for Apache. You can download</p>
<p>that at http://stderr.net/apache/rpaf/download:</p>
<p># cd /usr/local/src<br />
# wget http://stderr.net/apache/rpaf/download/mod_rpaf-0.6.tar.gz<br />
# tar -xzf mod_rpaf-0.6.tar.gz<br />
# cd mod_rpaf-*<br />
# apxs -i -c -n mod_rpaf-2.0.so mod_rpaf-2.0.c</p>
<p>2. Once installed, we need to load the module into Apache configuration. Since cPanel already has Include Editor for Apache, we will use that functions. Login to WHM &gt; Service Configuration &gt; Apache Configuration &gt; Include Editor &gt; Pre Main Include &gt; All Versions and paste following text:</p>
<p>LoadModule rpaf_module modules/mod_rpaf-2.0.so<br />
RPAFenable On<br />
RPAFproxy_ips 127.0.0.1  10.20.30.11 # replace the value with your server IP<br />
RPAFsethostname On<br />
RPAFheader X-Real-IP</p>
<p style="text-align: center;"></p>
<p>3. Click Update &gt; Restart Apache. The module should be loaded after restart.</p>
<p>4. Before we install Nginx, we need to change Apache port to 8081. Login to WHM &gt; Server Configuration &gt; Tweak Settings &gt; Apache non-SSL IP/port:</p>
<p>0.0.0.0:8081</p>
<p>5. We need to run following command so cPanel will remember that Apache configuration template has changed:</p>
<p>#  /usr/local/cpanel/bin/apache_conf_distiller &#8211;update &#8211;main<br />
#  /scripts/rebuildhttpdconf</p>
<p>6. Lets install Nginx and all requirements using yum. You can download Nginx source at http://nginx.org/en/download.html:</p>
<p>#  yum install pcre* -y<br />
#  cd /usr/local/src<br />
#  wget http://nginx.org/download/nginx-1.0.5.tar.gz<br />
#  cd nginx-*<br />
#  ./configure<br />
#  make<br />
#  make install</p>
<p>7. Once installed, we need to do some changes to Nginx configuration file. Using text editor, copy and paste following line and change the required value to fit your environment:</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>user  nobody;</p>
<p>worker_processes  1;</p>
<p>error_log  logs/error.log  info;</p>
<p>events {<br />
worker_connections  1024;<br />
}</p>
<p>http {<br />
server_names_hash_max_size 2048;<br />
include       mime.types;<br />
default_type  application/octet-stream;</p>
<p>log_format   main &#8216;$remote_addr &#8211; $remote_user [$time_local]  $status &#8216;<br />
&#8216;&#8221;$request&#8221; $body_bytes_sent &#8220;$http_referer&#8221; &#8216;<br />
&#8216;&#8221;$http_user_agent&#8221; &#8220;$http_x_forwarded_for&#8221;&#8216;;</p>
<p>sendfile        on;<br />
tcp_nopush     on;</p>
<p>keepalive_timeout  10;</p>
<p>gzip  on;<br />
gzip_min_length  1100;<br />
gzip_buffers  4 32k;<br />
gzip_types    text/plain application/x-javascript text/xml text/css;<br />
ignore_invalid_headers on;</p>
<p>client_header_timeout  3m;<br />
client_body_timeout 3m;<br />
send_timeout     3m;<br />
connection_pool_size  256;<br />
client_header_buffer_size 4k;<br />
large_client_header_buffers 4 32k;<br />
request_pool_size  4k;<br />
output_buffers   4 32k;<br />
postpone_output  1460;</p>
<p>server {<br />
# this is your access logs location<br />
access_log /usr/local/apache/domlogs/unixsurgeon/unixsurgeon.com;</p>
<p>error_log  logs/vhost-error_log warn;<br />
listen    80;<br />
# change to your domain<br />
server_name  unixsurgeon.com www.unixsurgeon.com;</p>
<p>location ~* \.(gif|jpg|jpeg|png|wmv|avi|mpg|mpeg|mp4|htm|html|js|css)$ {<br />
# this is your public_html directory<br />
root   /home/unixsurgeon/public_html;<br />
}</p>
<p>location / {<br />
client_max_body_size    10m;<br />
client_body_buffer_size 128k;</p>
<p>proxy_send_timeout   90;<br />
proxy_read_timeout   90;</p>
<p>proxy_buffer_size    4k;<br />
proxy_buffers     16 32k;<br />
proxy_busy_buffers_size 64k;<br />
proxy_temp_file_write_size 64k;</p>
<p>proxy_connect_timeout 30s;</p>
<p># change to your domain name<br />
proxy_redirect  http://www.unixsurgeon.com:8081   http://www.unixsurgeon.com;<br />
proxy_redirect  http://unixsurgeon.com:8081   http://unixsurgeon.com;</p>
<p>proxy_pass   http://127.0.0.1:8081/;<br />
proxy_set_header   Host   $host;<br />
proxy_set_header   X-Real-IP  $remote_addr;<br />
proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;<br />
}<br />
}<br />
}</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>8. We need to check the Nginx configuration file before start the Nginx. Use following command to check the configuration file:</p>
<p>root@cpanel [~]# /usr/local/nginx/sbin/nginx -t<br />
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok<br />
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful</p>
<p style="text-align: center;"></p>
<p>9. If everything is OK, we can start the Nginx as below:</p>
<p># /usr/local/nginx/sbin/nginx start</p>
<p>10. Lets check whether Nginx and Apache are listening to the correct port:</p>
<p>root@cpanel [~]# netstat -tulpn | grep -e nginx -e httpd<br />
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      16728/nginx<br />
tcp        0      0 0.0.0.0:8081                  0.0.0.0:*                   LISTEN      19655/httpd<br />
tcp        0      0 0.0.0.0:443                 0.0.0.0:*                   LISTEN      19655/httpd</p>
<p>11. If everything is run as expected, edit /etc/rc.local using text editor and add following line so Nginx will start automatically after reboot :-</p>
<p># /usr/local/nginx/sbin/nginx restart</p>
<p>Nginx no need to be restarted to load the latest configuration file. You can run following command and it will reload the configuration on-the-fly without downtime:</p>
<p>kill -HUP `ps -ef | grep nginx | grep master | awk {&#8217;print $2&#8242;}`</p>
<p>Enjoy Linux&#8230;. !!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/setup-nginx-as-reverse-proxy-with-apache.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install NginX on cPanel WHM/Cpanel Server</title>
		<link>http://www.unixsurgeon.com/kb/how-to-install-nginx-on-cpanel-whmcpanel-server.html</link>
		<comments>http://www.unixsurgeon.com/kb/how-to-install-nginx-on-cpanel-whmcpanel-server.html#comments</comments>
		<pubDate>Mon, 06 Feb 2012 10:42:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux tutorials]]></category>
		<category><![CDATA[Open Source Applications]]></category>
		<category><![CDATA[lamp server]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[nginxadmin]]></category>
		<category><![CDATA[nginxcp]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=351</guid>
		<description><![CDATA[Install NginxAdmin to WHM/Cpanel for Optimize Performance.
Diffrence between nginx &#38; apache :-
Apache is a process-based server, while nginx is an event-based web server.Nginx known as &#8220;engineX&#8221; 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 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Install NginxAdmin to WHM/Cpanel for Optimize Performance.</strong></p>
<p><strong>Diffrence between nginx &amp; apache :-</strong></p>
<p>Apache is a process-based server, while nginx is an event-based web server.Nginx known as &#8220;engineX&#8221; probably the best-known asynchronous server and Apache is undoubtedly the best known process-based server.</p>
<p>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.</p>
<p>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.</p>
<p>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).</p>
<p style="text-align: center;"></p>
<p><strong>Nginx+cPanel+Apache= Performance boosted secured hosting server</strong></p>
<p><strong>How NginxAdmin will help your cPanel server to increase the performance ?</strong></p>
<p>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&#8217;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.</p>
<p>Even if you don&#8217;t expect to handle thousands of simultaneous requests, you can still benefit from Nginx&#8217;s high-performance and small memory footprint. Nginx scales in all directions: from the smallest VPS all the way up to clusters of servers.</p>
<p style="text-align: center;"></p>
<p><strong>To install copy and execute following lines :-</strong></p>
<p># cd /usr/local/src<br />
# wget http://nginxcp.com/nginxadmin2.8-stable.tar<br />
# tar -xvf nginxadmin2.8-stable.tar<br />
# cd publicnginx<br />
# ./nginxinstaller install<br />
# /etc/init.d/httpd restart</p>
<p><strong>Troubleshooting Installation:-</strong></p>
<p>If you receive any pyaml related error or the following error</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Welcome to the Nginx Admin installer&#8230;&#8230;Starting Install<br />
Generating vhosts&#8230;<br />
Traceback (most recent call last):<br />
File &#8220;/scripts/createvhosts.py&#8221;, line 2, in ?<br />
import yaml<br />
File &#8220;/usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-i686.egg/yaml/__init__.py&#8221;, line 26<br />
SyntaxError: &#8216;yield&#8217; not allowed in a &#8216;try&#8217; block with a &#8216;finally&#8217; clause<br />
Installing WHM interface&#8230;<br />
deploying booster rockets<br />
Traceback (most recent call last):<br />
File &#8220;/usr/local/src/publicnginx/nginxinstaller2&#8243;, line 9, in ?<br />
import createvhosts<br />
File &#8220;/usr/local/src/publicnginx/createvhosts.py&#8221;, line 2, in ?<br />
import yaml<br />
File &#8220;/usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-i686.egg/yaml/__init__.py&#8221;, line 26<br />
SyntaxError: &#8216;yield&#8217; not allowed in a &#8216;try&#8217; block with a &#8216;finally&#8217; clause<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Then run execute following commands &#8230;.<br />
<strong>For i686 architecture :-</strong></p>
<p># easy_install Pyyaml==3.09<br />
# rm -f /usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-i686.egg</p>
<p><strong>For x86_64 architecture :-</strong></p>
<p># easy_install Pyyaml==3.09<br />
# rm -f /usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-x86_64.egg</p>
<p style="text-align: center;"></p>
<p><strong>Then Again run the following commands :-<br />
</strong><br />
# ./nginxinstaller install<br />
# /etc/init.d/httpd restart</p>
<p>Now Nginx run on the port no:80 and apache run on the port no.8081.You can manage the nginx through WHM &gt;&gt; Main &gt;&gt; Nginx Admin</p>
<p><img class="alignnone" title="nginxadmin" src="http://unixsurgeon.com/images/nginx.png" alt="" width="656" height="341" /></p>
<p><strong>To uninstall nginx use following :-</strong></p>
<p>#  cd /usr/local/src<br />
#  wget http://nginxcp.com/nginxadmin2.8-stable.tar<br />
#  tar xf nginxadmin2.8-stable.tar<br />
#  cd publicnginx<br />
#  ./nginxinstaller uninstall</p>
<p><strong>Enjoy Linux&#8230;!!!!</strong></p>
<p style="text-align: center;"></p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/how-to-install-nginx-on-cpanel-whmcpanel-server.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Install MP4Box with ffmpeg.</title>
		<link>http://www.unixsurgeon.com/kb/install-mp4box-with-ffmpeg.html</link>
		<comments>http://www.unixsurgeon.com/kb/install-mp4box-with-ffmpeg.html#comments</comments>
		<pubDate>Fri, 03 Feb 2012 06:16:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[FFMPEG]]></category>
		<category><![CDATA[Linux tutorials]]></category>
		<category><![CDATA[Open Source Applications]]></category>
		<category><![CDATA[MP4Box]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=348</guid>
		<description><![CDATA[Install MP4Box with ffmpeg
The following are the instructions for installing a fully fuctional Mp4Box plugins with ffmpeg. You first need to install ffmepg and all its related modules using the script  from  this website. Then please proceed the following steps.

#  yum -y install freetype-devel SDL-devel freeglut-devel
#  wget -c http://mirror.ffmpeginstaller.com/source/gpac/gpac-full-0.4.5.tar.gz
#  tar -xzf gpac-full-0.4.5.tar.gz
#  cd gpac/
# ./configure [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Install MP4Box with ffmpeg</strong></p>
<p>The following are the instructions for installing a fully fuctional Mp4Box plugins with ffmpeg. You first need to install ffmepg and all its related modules using the script  from  this website. Then please proceed the following steps.</p>
<p style="text-align: center;"></p>
<p><strong>#  yum -y install freetype-devel SDL-devel freeglut-devel<br />
#  wget -c http://mirror.ffmpeginstaller.com/source/gpac/gpac-full-0.4.5.tar.gz<br />
#  tar -xzf gpac-full-0.4.5.tar.gz<br />
#  cd gpac/<br />
# ./configure –-prefix=/usr/local/cpffmpeg/ –-extra-cflags=-I/usr/local/cpffmpeg/include/ –-extra-ldflags=-L/usr/local/cpffmpeg/lib –-disable-wx –-strip<br />
</strong></p>
<p><strong>#  make<br />
#  make install</strong><br />
Then create softlink for the same :-</p>
<p><strong>#  ln -s /usr/local/cpffmpeg/bin/MP4Box /usr/local/bin/MP4Box<br />
#  ln -s /usr/local/cpffmpeg/bin/MP4Box /usr/bin/MP4Box</strong></p>
<p style="text-align: center;"></p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/install-mp4box-with-ffmpeg.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto install Nginx on Centos.</title>
		<link>http://www.unixsurgeon.com/kb/howto-install-nginx-on-centos.html</link>
		<comments>http://www.unixsurgeon.com/kb/howto-install-nginx-on-centos.html#comments</comments>
		<pubDate>Fri, 03 Feb 2012 04:41:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux tutorials]]></category>
		<category><![CDATA[Open Source Applications]]></category>
		<category><![CDATA[lamp server]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=337</guid>
		<description><![CDATA[Today we are going to install Nginx on Centos. Nginx (pronounced “Engine X”) is a lightweight web server that offers speed and flexibility without all of the extra features that larger web servers like Apache offer. Although it is a free and open source application, CentOS does not offer the latest version in its default [...]]]></description>
			<content:encoded><![CDATA[<p>Today we are going to install Nginx on Centos. Nginx (pronounced “Engine X”) is a lightweight web server that offers speed and flexibility without all of the extra features that larger web servers like Apache offer. Although it is a free and open source application, CentOS does not offer the latest version in its default YUM repository. To install it, you need to add the EPEL (Extra Packages for Enterprise Linux) repository, which is part of the Fedora Project.</p>
<p style="text-align: center;"></p>
<p><strong>First of all installing the EPEL repository:-</strong></p>
<p>[p-root@unixsurgeon ~]# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5Server/i386/epel-release-5-4.noarch.rpm</p>
<p>Retrieving http://download.fedora.redhat.com/pub/epel/5Server/i386/epel-release-5-4.noarch.rpm<br />
warning: /var/tmp/rpm-xfer.toDVXj: Header V3 DSA signature: NOKEY, key ID 217521f6<br />
Preparing…                ########################################### [100%]<br />
1:epel-release              ########################################### [100%]</p>
<p><strong>Install nginx:-</strong></p>
<p>[p-root@unixsurgeon ~]# yum install nginx</p>
<p>It will install nginx and ask gpg-key for EPEL, accept with yes option.</p>
<p><strong>Now start your nginx web server.</strong></p>
<p>[p-root@unixsurgeon ~]# service nginx start</p>
<p>Starting nginx:                                            [  OK  ]</p>
<p style="text-align: center;"></p>
<p>The default document root of nginx server :- /usr/share/nginx/html<br />
And the config file path is :-  /etc/nginx/nginx.conf<br />
Now open your browser and type 127.0.0.1 , it will open your default nginx page like below:-</p>
<p>http://127.0.0.1</p>
<p>The Default Document root is /usr/share/nginx/html&#8230;.you should now put your content in a location of your choice and edit the root configuration directive in the nginx configuration file /et/nginx/nginx.conf.</p>
<p><img class="aligncenter" title="nginx" src="http://unixsurgeon.com/images/nginxcentos.png" alt="" width="681" height="144" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/howto-install-nginx-on-centos.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cannot start session without errors &#124; Phpmyadmin</title>
		<link>http://www.unixsurgeon.com/kb/cannot-start-session-without-errors-phpmyadmin.html</link>
		<comments>http://www.unixsurgeon.com/kb/cannot-start-session-without-errors-phpmyadmin.html#comments</comments>
		<pubDate>Thu, 02 Feb 2012 07:15:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[Open Source Applications]]></category>
		<category><![CDATA[lamp server]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=335</guid>
		<description><![CDATA[Today i m encountered an error&#8230; phpMyAdmin is inaccessible and throws the error following message &#8220;Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly &#8220;. This can be due to server-sided permissions of the temporary directory where session files are stored.

Solution :-
The [...]]]></description>
			<content:encoded><![CDATA[<p>Today i m encountered an error&#8230; phpMyAdmin is inaccessible and throws the error following message<strong> &#8220;Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly &#8220;. </strong>This can be due to server-sided permissions of the temporary directory where session files are stored.</p>
<p style="text-align: center;"></p>
<p><strong>Solution :-</strong></p>
<p>The issue with directory permissions or directory ownership of the directory where PHP keeps its session files.</p>
<p>Locate the directory where sessions are stored in the php.ini file. It will look something like this, although the exact path will vary depending on the distro and any customizations you may have made yourself:</p>
<p><strong>session.save_path = &#8220;/var/lib/php/session&#8221;</strong></p>
<p>Now check the permissions of that directory and make sure that the web server has permissions to access it.</p>
<p>You may need to either change ownership of the directory, e.g.:</p>
<p><strong># chown user:group /var/lib/php/session</strong></p>
<p>and substitute &#8220;user&#8221; for the actual username and &#8220;group&#8221; for the actual group, and /var/lib/php/session for the actual session save path.</p>
<p>Alternatively, just change the permissions of the directory so it&#8217;s world readable and writable:</p>
<p><strong># chmod 0777 /var/lib/php/session</strong><br />
<strong>Enjoy Linux&#8230;!!!!<br />
</strong></p>
<p style="text-align: center;"></p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/cannot-start-session-without-errors-phpmyadmin.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

