<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1164734105379592467</id><updated>2011-10-06T04:07:49.932-07:00</updated><category term='troubleshooting'/><category term='How to'/><category term='firewall'/><category term='howto setup'/><category term='Tips and Tricks'/><category term='security'/><title type='text'>do the Linux!</title><subtitle type='html'>Hello, This blog is for Linux aspirants , which will be useful for the Linux Guru&amp;#39;s and also for the newbies. You can find catagories like tips &amp;amp; tricks ,howto&amp;#39;s,configurations &amp;amp; also several troubleshootings on issues!</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>49</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-9149434997482424294</id><published>2010-09-27T22:14:00.000-07:00</published><updated>2010-09-27T22:28:19.747-07:00</updated><title type='text'>How to set up SPF records</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;SPF is an emerging standard that let’s the owners of domain names tell people who receive email claiming to be from that domain name which SMTP servers are allowed to send email from that domain name. That’s a slightly complex sentence, so let me give you an example. Then I’ll make a note or two about how to add SPF records to your DNS settings. There is a point or two that is quite difficult to figure out from the documentation I’ve found online, but once you figure it out, it’s not that difficult. So, the example of the process:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1) A spammer sends an email with a fake address–let’s say that address is fakeaddress@geckotribe.com.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2) It leaves their email client and goes through their ISP’s SMTP server–let’s say that’s smtp.spammerisp.com (in reality, they probably wouldn’t use thier ISP’s SMTP server, but we’ll ignore that fact).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3) The message arrives at the recipient’s (poor@sucker.com) mail server (mail.sucker.com).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4) Their mail server (mail.sucker.com) checks the sender’s address (fakeaddress@geckotribe.com), extracts the domain name from it (geckotribe.com).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;5) mail.sucker.com asks the DNS server for geckotribe.com (ns.geckotribe.com) for a list of SMTP servers that are allowed to send email addressed from geckotribe.com (like fakeaddress@geckotribe.com).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;6) ns.geckotribe.com replies that mail.geckotribe.com and mail.myhomeisp.com are allowed to send such email, and no one else.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;7) mail.sucker.com notes that smtp.spammerisp.com is not on the list.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;8) mail.sucker.com either rejects the message or marks it in some way so that the recipient knows that the SPF check failed, so it’s likely that it’s spam.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There’s the process. How does the administrator for geckotribe.com set up the DNS record to indicate that mail.geckotribe.com and mail.myhomeisp.com are allowed to send email addressed from geckotribe.com? Here are two lines that need to be added to the DNS configuration file, followed by an explanation of them:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;geckotribe.com. IN TXT “v=spf1 a:mail.geckotribe.com ?include:myhomeisp.com -all”&lt;/div&gt;&lt;div&gt;mail.geckotribe.com. IN TXT “v=spf1 a:mail.geckotribe.com -all”&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;On the first line:&lt;/div&gt;&lt;div&gt;• geckotribe.com.: this indicates “mail address from somebody@geckotribe.com. Note the “.” after “.com”. You can either put that dot there, or omit “geckotribe.com.” completely.&lt;/div&gt;&lt;div&gt;• IN TXT: Indicates that this is a text record. Trust me. That’s what you want.&lt;/div&gt;&lt;div&gt;• v=spf1: Indicates that this is an SPF version 1 record. You need this.&lt;/div&gt;&lt;div&gt;• a:: An “A” record (not a CNAME, TXT, MX, NS… or other type of DNS record). IMPORTANT NOTE: “a:” could have been prefixed with a plus sign, ie., this could have been “+a:mail.geckotribe.com”. The plus sign is optional–it is the default prefix. It means that if this rule matches, then the sender is legitimate. I’ll mention other prefixes later.&lt;/div&gt;&lt;div&gt;• mail.geckotribe.com: Lookup the IP address for mail.geckotribe.com–if that’s the IP address you’re getting the mail from, then it’s legitimate.&lt;/div&gt;&lt;div&gt;• ?: The question mark prefix means that if the following rule matches, the sender may or may not be legitimate. I’ll tell you why you’d use a question mark here in a minute.&lt;/div&gt;&lt;div&gt;• include:: This means that I don’t know the IP addresses or fully qulified domain names of the mail servers that I’m going to talk about next, but I’m going to name of the domain that you should ask for that information.&lt;/div&gt;&lt;div&gt;• myhomeisp.com: This is the domain name of the ISP I connect to the internet through when I’m at home. Now to answer the question of why we prefixed this rule with a question mark. It’s because when I send email via my ISP, it’s legitimate, but if somebody else with the same ISP sends mail claiming to be from geckotribe.com, it’s not. The question mark says “don’t rule it out, but it might not be legitimate”.&lt;/div&gt;&lt;div&gt;• -: The minus sign says that if the following rule matches, then sender is not legitimate.&lt;/div&gt;&lt;div&gt;• all: This rule matches anybody who wasn’t already matched by one of the preceding rules.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Briefly, the second line means that if mail claims to be from somebody@mail.geckotribe.com, it’s legit if it came via mail.geckotribe.com, but not if it came from anywhere else.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To recap and point out a few more things:&lt;/div&gt;&lt;div&gt;• You put multiple rules on each line. They are evaluated from left to right until one matches. The rest are ignored.&lt;/div&gt;&lt;div&gt;• “+” means legitimate, “?” means it might be legitimate, and “-” means it’s not legitimate.&lt;/div&gt;&lt;div&gt;• Each rule starts with a prefix (if none is specified, then the default is “+”) followed by “a”, “include”, “ptr”, “mx” or one of a few other things (check the specifications for details) followed by a colon.&lt;/div&gt;&lt;div&gt;• You should end each line with ?all or -all. Use ?all if you want to be able to send email through any ISP (for example, if you send email from your laptop as you travel all over the place). Use -all if you know (and have indicated earlier on the line) every possible SMTP server that you might send email through.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-9149434997482424294?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/9149434997482424294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/09/how-to-set-up-spf-records.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/9149434997482424294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/9149434997482424294'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/09/how-to-set-up-spf-records.html' title='How to set up SPF records'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-1520878701886898848</id><published>2010-08-27T01:42:00.000-07:00</published><updated>2010-08-27T02:54:32.561-07:00</updated><title type='text'>Patching the kernel</title><content type='html'>These instructions require having the skills of a sysadmin. Personally, I avoid recompiling any kernel unless absolutely necessary. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Make sure your product is affected&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Linux and UNIX source software often comes with security and other patches. You can download them from Internet or project home page. There is a command called patch that apply a diff file or patch to an original source tree.&lt;/div&gt;&lt;div&gt;patch takes a patch file patchfile containing a difference listing produced by the diff program and applies those differences to one or more original files, producing patched versions. Normally the patched versions are put in place of the originals.&lt;/div&gt;&lt;div&gt;&lt;div&gt;he following usage is most commonly used:&lt;/div&gt;&lt;div&gt;$ patch -p1 &lt; {/path/to/patch/file}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;To apply a patch, one could run the following command in a shell:&lt;/div&gt;&lt;div&gt;$ patch &lt; /path/to/file&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Patches can be undone, or reversed, with the '-R' option:&lt;/div&gt;&lt;div&gt;$ patch -R &lt; /path/to/file&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-1520878701886898848?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/1520878701886898848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/08/patching-kernel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/1520878701886898848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/1520878701886898848'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/08/patching-kernel.html' title='Patching the kernel'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-4008027853884971273</id><published>2010-07-22T05:09:00.000-07:00</published><updated>2010-07-22T05:10:03.881-07:00</updated><title type='text'>apache/mysql optimization</title><content type='html'>Apache Tweaks&lt;br /&gt;------------------------&lt;br /&gt;The apache directive KeepAlive specifies whether a connection has to be established dedicatedly for a request.&lt;br /&gt;If you enable this directive using "on" , you must specify KeepAliveTimeout.The number of seconds Apache will wait for a subsequent request before closing the connection. Once a request has been received, the timeout value specified by the Timeout directive applies.&lt;br /&gt;&lt;br /&gt;Setting KeepAliveTimeout to a high value may cause performance problems in heavily loaded servers. The higher the timeout, the more server processes will be kept occupied waiting on connections with idle clients.&lt;br /&gt;This prevents unused connections from staying open for excessive amounts of time If you are going to leave KeepAlive on you will want to increase MaxKeepAliveRequests. Setting this higher allows more requests per connection and increases efficiency&lt;br /&gt;#Another minor tweak that will give you a small performance boost as well as help reduce the effects of a DOS attack is changing the TimeOut Directive. This directive tells Apache how many seconds to wait while receiving an incoming request, processing it, and sending back a response.&lt;br /&gt;&lt;br /&gt;HostnameLookups&lt;br /&gt;&lt;br /&gt;This adds latency to every request because it requires a DNS lookup to complete before the request is finished. So it is always better to disable this directive.&lt;br /&gt;&lt;br /&gt;MPM&lt;br /&gt;&lt;br /&gt; Apache supports Multi-ProcessingModules (MPms).  You can choose either Worker or Prefork.  THe Prefork consumes higher memory than worker , it is quite famous for its speed of execution. So we normally enable Prefork for servers unless it is quite busy.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Below are the directives used in Prefork&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;MaxClients  - sets a limit on the number of simultaneous connections/requests that will be served.Set this number too low and resources will go to waste. Set this number too high and an influx of connections will bring the server to a stand still. Set this number just right and your server will fully utilize the available resources.&lt;br /&gt;&lt;br /&gt;An approximation of this number should be derived by dividing the amount of system memory (physical RAM) available by the maximum size of an apache/httpd process. The default value [ServerLimit 256] will work with 1-2GB of RAM.&lt;br /&gt;&lt;br /&gt;Directive MaxRequestsPerChild is used to recycle processes. When this directive is set to 0, an unlimited amount of requests are allowed per process.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# StartServers: number of server processes to start&lt;br /&gt;# MinSpareServers: minimum number of server processes which are kept spare&lt;br /&gt;# MaxSpareServers: maximum number of server processes which are kept spare&lt;br /&gt;&lt;br /&gt;# MaxRequestsPerChild: maximum number of requests a server process serves&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So a sample prefork configuration would look like this&lt;br /&gt;&lt;br /&gt;StartServers       10&lt;br /&gt;MinSpareServers   5&lt;br /&gt;MaxSpareServers   10&lt;br /&gt;&lt;br /&gt;MaxClients       225&lt;br /&gt;MaxRequestsPerChild  4000&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the prefork model, a new process is created per request. Spare processes are kept idle to handle incoming requests, which reduces the start-up latency. The previous configuration starts 10 processes as soon as the Web server comes up and tries to keep between 5 and 10 idle servers running. The hard limit on processes is dictated by MaxClients. Even though a process can handle many consecutive requests, Apache kills off processes after 4,000 connections, which mitigates the risk of memory leaks.&lt;br /&gt;&lt;br /&gt;The other apache configuration directives are as follows&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Timeout 200&lt;br /&gt;KeepAlive On&lt;br /&gt;MaxKeepAliveRequests 200&lt;br /&gt;KeepAliveTimeout 3&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[mysqld]&lt;br /&gt;skip-locking&lt;br /&gt;max_connections=500 #The number of simultaneous clients allowed.&lt;br /&gt;&lt;br /&gt;connect_timeout=15 #Number of seconds before timeout connection.&lt;br /&gt;&lt;br /&gt;key_buffer = 128M  #shared by all threads&lt;br /&gt;key_buffer_size = 128M # key_buffer_size to at least a quarter, but no more than half, of the total amount of memory on the     server&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;join_buffer_size = 3M #The size of the buffer that is used for full joins (joins that do not use indexes).&lt;br /&gt;record_buffer = 1M # Each request doing a sequential scan over a table allocates a read buffer&lt;br /&gt;max_allowed_packet = 16M #Max size of packet client can read from server.&lt;br /&gt;&lt;br /&gt;table_cache = 3000 #Each time MySQL accesses a table, it places it in the cache. If the system accesses many tables, it is  faster to have these in the cache. You should increase the table_cache if you have enough memory.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;max_heap_table_size = 16M #This variable sets the maximum size to which MEMORY tables are allowed to grow.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;tmp_table_size = 64M # The maximum size of internal in-memory temporary tables&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;sort_buffer_size = 4M # Each thread that needs to do a sort allocates a buffer of this size. Increase this value for faster ORDER BY or GROUP BY operations.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;read_buffer_size = 2M #Each thread that does a sequential scan allocates a buffer of this size for each table it scans.&lt;br /&gt;&lt;br /&gt;myisam_sort_buffer_size = 32M #The buffer that is allocated when  sorting the index&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;query_cache_type=1&lt;br /&gt;&lt;br /&gt;query_cache_limit=2M #The query_cache_limit (default 1MB) parameter sets the maximum result sets size stored in the query cache.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;query_cache_size=64M # The memory allocated to store results from old queries.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;max_user_connections = 25 # The maximum number of active connections for a single user .&lt;br /&gt;max_connect_errors=10000 #If there is more than this number of interrupted connections from a host this host will be blocked from further connections.&lt;br /&gt;safe-show-database&lt;br /&gt;&lt;br /&gt;slow_query_log = 1&lt;br /&gt;open_files_limit = 12000 #`open_files_limit' Number of files the system allows mysqld to open.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-4008027853884971273?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/4008027853884971273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/07/apachemysql-optimization.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/4008027853884971273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/4008027853884971273'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/07/apachemysql-optimization.html' title='apache/mysql optimization'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-377256113522393112</id><published>2010-06-29T10:04:00.000-07:00</published><updated>2010-06-29T10:55:08.457-07:00</updated><title type='text'>cPanel Error – error : Invalid maildirsize file!</title><content type='html'>&lt;p&gt;Login to your server via SSH. The follow example applies  where the email address is sharaf@domain.com, and the account  username is “username”. Substitute the values in bold.&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;cd /home/&lt;strong&gt;username&lt;/strong&gt;/mail/&lt;strong&gt;domain.com&lt;/strong&gt;/&lt;strong&gt;sharaf&lt;/strong&gt;/&lt;br /&gt;rm -f maildirsize&lt;/p&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-377256113522393112?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/377256113522393112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/06/cpanel-error-error-invalid-maildirsize.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/377256113522393112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/377256113522393112'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/06/cpanel-error-error-invalid-maildirsize.html' title='cPanel Error – error : Invalid maildirsize file!'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-422738284698476931</id><published>2010-06-08T10:53:00.000-07:00</published><updated>2010-06-08T10:58:33.073-07:00</updated><title type='text'>Customize Apache default Success page</title><content type='html'>You just have to login to your server via ssh.&lt;br /&gt;&lt;p&gt;Navigate to /usr/local/apache/htdocs&lt;br /&gt;&lt;/p&gt;&lt;p&gt;cd /usr/local/apache/htdocs&lt;/p&gt;&lt;p&gt;And finaly edit the file index.html&lt;br /&gt;&lt;br /&gt;   nano index.html&lt;br /&gt;&lt;br /&gt;If you list the content of /usr/local/apache/htdocs you will see that you can also modify the content of other error pages that cpanel’s apache outputs.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-422738284698476931?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/422738284698476931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/06/customize-apache-default-success-page.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/422738284698476931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/422738284698476931'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/06/customize-apache-default-success-page.html' title='Customize Apache default Success page'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-7901864865021061892</id><published>2010-06-04T05:43:00.000-07:00</published><updated>2010-06-04T05:44:23.054-07:00</updated><title type='text'>MySQL ERROR! Couldn't find MySQL manager (/var/lib/bin/mysqlmanager)</title><content type='html'>cpanel server&lt;br /&gt;&lt;br /&gt;/etc/init.d/mysql status&lt;br /&gt; ERROR! MySQL is not running&lt;br /&gt;[root@ns2 subsys]# /etc/init.d/mysql restart&lt;br /&gt; ERROR! MySQL manager or server PID file could not be found!&lt;br /&gt;Starting MySQL ERROR! Couldn't find MySQL manager (/var/lib/bin/mysqlmanager) or server (/var/lib/bin/mysqld_safe)&lt;br /&gt;[root@ns2 subsys]# /etc/init.d/mysql stop  &lt;br /&gt; ERROR! MySQL manager or server PID file could not be found!&lt;br /&gt;&lt;br /&gt;check in /etc/my.cnf ----------whether base_dir is set to /var/lib if so remove it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-7901864865021061892?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/7901864865021061892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/06/mysql-error-couldnt-find-mysql-manager.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/7901864865021061892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/7901864865021061892'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/06/mysql-error-couldnt-find-mysql-manager.html' title='MySQL ERROR! Couldn&apos;t find MySQL manager (/var/lib/bin/mysqlmanager)'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-8547632460619606293</id><published>2010-05-28T02:38:00.000-07:00</published><updated>2010-05-28T02:39:23.727-07:00</updated><title type='text'>Increase max emails per hour for a single domain in cPanel</title><content type='html'>&lt;p&gt;You can change the maximum number of emails allowed for a particular domain to a different number than the system default using the file (Other than WHM settings)&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;/var/cpanel/maxemails&lt;br /&gt;Just add an entry like “domain.com = 100″  . Now 100 is the maximum email per hour limit for domain.com.&lt;/p&gt; &lt;p&gt;But please make sure that you have executed the following script after updating the file /var/cpanel/maxemails.&lt;/p&gt; &lt;p&gt;#/scripts/build_maxemails_config&lt;/p&gt;              &lt;p class="postmetadata"&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-8547632460619606293?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/8547632460619606293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/05/increase-max-emails-per-hour-for-single.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/8547632460619606293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/8547632460619606293'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/05/increase-max-emails-per-hour-for-single.html' title='Increase max emails per hour for a single domain in cPanel'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-4825883678189013630</id><published>2010-05-20T00:34:00.001-07:00</published><updated>2010-05-20T00:35:43.586-07:00</updated><title type='text'>OpenVZ network down SIOCADDRT: Network is unreachable</title><content type='html'>Have you ever come across in a situation where the VPS is running, but network is unreachable?  OpenVZ VPS may be up and running, but network service will be down resulting downtime for websites hosted in it. If you try to restart the network, you will get the below error:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;====================================&lt;/div&gt; &lt;p&gt;&lt;span id="more-713"&gt;&lt;/span&gt;&lt;/p&gt; &lt;div&gt;[root@pers ~]# /etc/init.d/network restart&lt;/div&gt; &lt;div id="_mcePaste"&gt;Shutting down interface venet0:                            [  OK  ]&lt;/div&gt; &lt;div id="_mcePaste"&gt;Shutting down loopback interface:                          [  OK  ]&lt;/div&gt; &lt;div id="_mcePaste"&gt;Bringing up loopback interface:                            [  OK  ]&lt;/div&gt; &lt;div id="_mcePaste"&gt;Bringing up interface venet0:  SIOCADDRT: Network is unreachable&lt;/div&gt; &lt;div id="_mcePaste"&gt;SIOCADDRT: Network is unreachable&lt;/div&gt; &lt;div&gt; &lt;div&gt;====================================&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To fix this, SSH into the main node server and enter into the VPS and  then execute the below command:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;blockquote&gt;/etc/sysconfig/network-scripts/ifup-routes venet0:0&lt;/blockquote&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-4825883678189013630?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/4825883678189013630/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/05/openvz-network-down-siocaddrt-network.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/4825883678189013630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/4825883678189013630'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/05/openvz-network-down-siocaddrt-network.html' title='OpenVZ network down SIOCADDRT: Network is unreachable'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-2154311423280810138</id><published>2010-05-09T07:38:00.000-07:00</published><updated>2010-05-09T07:39:03.596-07:00</updated><title type='text'>open3: fork failed: Cannot allocate memory at cpsrvd-ssl line 6152</title><content type='html'>Cpanel Internal Server Error&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;open3: fork failed: Cannot allocate memory at cpsrvd-ssl line 6152&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;cpsrvd/11.25 Server at 216.18.214.132&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Internal Server Error&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Soln: /scripts/upcp --force&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-2154311423280810138?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/2154311423280810138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/05/open3-fork-failed-cannot-allocate.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/2154311423280810138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/2154311423280810138'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/05/open3-fork-failed-cannot-allocate.html' title='open3: fork failed: Cannot allocate memory at cpsrvd-ssl line 6152'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-2450626310206738847</id><published>2010-05-02T03:42:00.000-07:00</published><updated>2010-05-02T03:43:22.811-07:00</updated><title type='text'></title><content type='html'>http://gnufreakz.wordpress.com/page/11/&lt;br /&gt;&lt;br /&gt;http://kb.mediatemple.net/questions/246/(dv)+HOWTO:+Basic+Apache+performance+tuning+(httpd)&lt;br /&gt;&lt;br /&gt;http://www.perlcode.org/tutorials/apache/tuning.html&lt;br /&gt;&lt;br /&gt;http://www.devside.net/articles/apache-performance-tuning&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;http://phplens.com/phpeverywhere/tuning-apache-php&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-2450626310206738847?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/2450626310206738847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/05/httpgnufreakz.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/2450626310206738847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/2450626310206738847'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/05/httpgnufreakz.html' title=''/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-1569017247925483508</id><published>2010-04-21T03:29:00.000-07:00</published><updated>2010-04-21T03:31:27.556-07:00</updated><title type='text'>LNMP – A tool to auto-compile &amp; install &amp; manage Nginx+MySQL+PHP on Linux</title><content type='html'>LNMP is a tool to auto-compile &amp;amp; install &amp;amp; manage Nginx+MySQL+PHP on Linux.&lt;br /&gt;&lt;br /&gt;The current version : 0.3 ,Now support Linux distribution : CentOS 4.8~5.4 32/64bit,  Debian 4.0~5.0  32bit/64bit ,Ubuntu.&lt;br /&gt;&lt;br /&gt;The programme installed in LNMP:&lt;br /&gt;Nginx:0.7.63&lt;br /&gt;PHP:5.2.10&lt;br /&gt;MySQL:5.1.35&lt;br /&gt;Zend Optimizer:3.3.9&lt;br /&gt;eaccelerator:0.9.5.3&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Installation Guide:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt; wget -c http://soft.vpser.net/lnmp/lnmp0.4-full.tar.gz&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;1.Install on CentOS&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;First Download lnmp ,Run the command : wget http://soft.vpser.net/lnmp/lnmp0.3.tar.gz , Then decompress lnmp0.3.tar.gz Run the command : tar zxvf lnmp0.3.tar.gz&lt;br /&gt;Run the command : cd lnmp0.3&lt;br /&gt;Run ./centos.sh then enter the domain name, press Enter key twice. The programme will auto-complie and install Nginx,MySQL,PHP,Zend Optimizer.&lt;br /&gt;&lt;br /&gt;2.Install on Debian&lt;br /&gt;First Download lnmp ,Run the command : wget http://soft.vpser.net/lnmp/lnmp0.3.tar.gz , Then decompress lnmp0.3.tar.gz Run the command : tar zxvf lnmp0.3.tar.gz&lt;br /&gt;Run the command : cd lnmp0.3&lt;br /&gt;If you Debian is 32bit please run ./debian.sh else run ./debian64bit.sh. then enter the domain name, press Enter key twice. The programme will auto-complie and install Nginx,MySQL,PHP,Zend Optimizer.&lt;br /&gt;&lt;br /&gt;3&lt;strong&gt;&lt;em&gt;.Install eaccelerator&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;If you want to use eaccelerator please run ./eaccelerator.sh the programme will auto-compile and install.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;4.VirtualHost Management&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;1). Add VirtualHost: run ./vhost.sh Prompted to enter the domain name you want to binding, press Enter key, and then enter the directory to be bound (absolute directory, such as /home/wwwroot/lnmp).&lt;br /&gt;2). More feature under development.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-1569017247925483508?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/1569017247925483508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/04/lnmp-tool-to-auto-compile-install.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/1569017247925483508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/1569017247925483508'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/04/lnmp-tool-to-auto-compile-install.html' title='LNMP – A tool to auto-compile &amp; install &amp; manage Nginx+MySQL+PHP on Linux'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-6722830637597219914</id><published>2010-04-02T18:42:00.000-07:00</published><updated>2010-04-02T18:43:35.091-07:00</updated><title type='text'>Cpanel disk used incorrect showing unlimited or 0MB</title><content type='html'>You can fix this by running the script  /scripts/fixquotas&lt;br /&gt;&lt;br /&gt;is this doesn't work and you are using Virtuozzo or OpenVZ you will need to set the QUOTAUGIDLIMIT perimeter - this allows the system to allocate user IDs (UID)&lt;br /&gt;&lt;br /&gt;e.g (openvz)&lt;br /&gt;&lt;br /&gt;vzctl set 101 --quotaugidlimit 1000 --save&lt;br /&gt;&lt;br /&gt;then run the scrip "/scripts/fixquotas"&lt;br /&gt;&lt;br /&gt;and it should all work.&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;Troubleshooting&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;If you've done the above and it still doesn't work (or the value still says 0MB) this may be due to cPanel caching the disk usage results. to disable this:&lt;br /&gt;&lt;br /&gt;Select the following in your WHM.&lt;br /&gt;&lt;br /&gt;WHM &gt;&gt; Tweak Settings &gt;&gt; System &gt;&gt; "Disable Disk Quota display caching (WHM will cache disk usage which may result in the display of disk quotas being up to 15 minutes behind the actual disk usage. Disabling this may result in a large performance degradation.)"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-6722830637597219914?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/6722830637597219914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/04/cpanel-disk-used-incorrect-showing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/6722830637597219914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/6722830637597219914'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/04/cpanel-disk-used-incorrect-showing.html' title='Cpanel disk used incorrect showing unlimited or 0MB'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-1221446664344322611</id><published>2010-04-02T18:40:00.000-07:00</published><updated>2010-04-02T18:41:29.609-07:00</updated><title type='text'>Mysql Database showing 0MB disk usage</title><content type='html'>If your Mysql DB are showing 0MB disk usage in cPanel then do the following things.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;vi &lt;span style="font-family: Trebuchet MS;"&gt;&lt;span style="color: Olive;"&gt;/var/cpanel/cpanel.config&lt;br /&gt;&lt;br /&gt;find &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Trebuchet MS;"&gt;&lt;span style="color: Blue;"&gt;"disk_usage_include_sqldbs"&lt;br /&gt;&lt;br /&gt;change the value from 0 to 1&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-family: Trebuchet MS;"&gt;&lt;span style="color: Blue;"&gt;&lt;br /&gt;&lt;br /&gt;and run&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Trebuchet MS;"&gt;&lt;b&gt;#&lt;/b&gt;&lt;span style="color: Olive;"&gt;&lt;blockquote style="font-weight: bold;"&gt;/scripts/update_db_cache&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Issue should be fixed :)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-1221446664344322611?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/1221446664344322611/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/04/mysql-database-showing-0mb-disk-usage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/1221446664344322611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/1221446664344322611'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/04/mysql-database-showing-0mb-disk-usage.html' title='Mysql Database showing 0MB disk usage'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-2596196315256910234</id><published>2010-03-06T19:59:00.000-08:00</published><updated>2010-03-06T20:00:49.096-08:00</updated><title type='text'>mysql</title><content type='html'>&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;blockquote&gt;mysqladmin proc stat&lt;/blockquote&gt;&lt;/span&gt;&lt;/b&gt;&lt;div&gt;or&lt;/div&gt;&lt;div&gt;&lt;b&gt; &lt;blockquote&gt;mysqladmin processlist&lt;/blockquote&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-2596196315256910234?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/2596196315256910234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/03/mysql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/2596196315256910234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/2596196315256910234'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/03/mysql.html' title='mysql'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-5229677253582747599</id><published>2010-02-17T15:45:00.000-08:00</published><updated>2010-02-17T17:29:46.790-08:00</updated><title type='text'>Error "psa dead but subsys locked" is shown when check status of Parallels Plesk Panel from the command line</title><content type='html'>&lt;h2 class="title"&gt;Error "psa dead but subsys locked" is shown when check status of Parallels Plesk Panel from the command line&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="article-part"&gt;I get the following error when check status of Parallels Plesk Panel from the command line:&lt;br /&gt;&lt;br /&gt;&lt;div class="commandline"&gt;&lt;code&gt;&lt;b&gt;&lt;/b&gt;&lt;blockquote&gt;&lt;b&gt;~# /etc/init.d/psa status&lt;br /&gt;&lt;/b&gt;&lt;strong&gt;psa dead but subsys locked&lt;/strong&gt;&lt;b&gt;&lt;br /&gt;~#&lt;/b&gt;&lt;/blockquote&gt;&lt;b&gt;&lt;/b&gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;What does the error mean?&lt;br /&gt;    &lt;/div&gt;     &lt;div class="article-part"&gt;      &lt;h2&gt;Cause&lt;/h2&gt;      The error means that Parallels Plesk Panel is stopped but lock file exists.&lt;br /&gt;&lt;br /&gt;Another way to check status of Parallels Plesk Panel is using command "&lt;strong&gt;netstat&lt;/strong&gt;". Here is an example of correct output if Parallels Plesk Panel was running:&lt;br /&gt;&lt;br /&gt;Parallels Plesk Panel version 7.x, 8.x&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;div class="commandline"&gt;&lt;code&gt;~# netstat -antp | grep 8443&lt;br /&gt;tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 9691/httpsd&lt;br /&gt;~#&lt;/code&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;Parallels Plesk Panel version 9.x&lt;br /&gt;&lt;br /&gt;&lt;div class="commandline"&gt;&lt;code&gt;~# netstat -antp | grep 8443&lt;br /&gt;tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 21856/sw-cp-serverd&lt;br /&gt;~#&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;Here is result if Parallels Pleks Panel is not running:&lt;br /&gt;&lt;br /&gt;&lt;div class="commandline"&gt;&lt;code&gt;~# netstat -antp | grep 8443&lt;br /&gt;~#&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;Lock file of Parallels Plesk Panel on RedHat-like operating systems is &lt;strong&gt;/var/lock/subsys/psa&lt;/strong&gt;.&lt;br /&gt;    &lt;/div&gt;     &lt;div class="article-part"&gt;      &lt;h2&gt;Resolution&lt;/h2&gt;      Remove file /var/lock/subsys/psa manually and start the service usual way:&lt;br /&gt;&lt;br /&gt;&lt;div class="commandline"&gt;&lt;code&gt;~# rm -f /var/lock/subsys/psa&lt;br /&gt;~# /etc/init.d/psa start1&lt;br /&gt;Starting Plesk... &lt;span style="color: rgb(51, 153, 102);"&gt;done&lt;/span&gt;&lt;br /&gt;~#&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE: &lt;/strong&gt;Option "&lt;strong&gt;start1&lt;/strong&gt;" allows to start only Parallels Panel Panel without other services.&lt;br /&gt;&lt;br /&gt;Error log file is &lt;strong&gt;/usr/local/psa/admin/logs/httpsd_error_log&lt;/strong&gt; for Parallels Plesk Panel version 7.x, 8.5 or &lt;strong&gt;/var/log/sw-cp-server/error_log&lt;/strong&gt; for Parallels Plesk Panel version 9.x.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-5229677253582747599?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/5229677253582747599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/02/error-psa-dead-but-subsys-locked-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/5229677253582747599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/5229677253582747599'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/02/error-psa-dead-but-subsys-locked-is.html' title='Error &quot;psa dead but subsys locked&quot; is shown when check status of Parallels Plesk Panel from the command line'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-2712609263415732225</id><published>2010-02-01T12:56:00.000-08:00</published><updated>2010-02-01T12:58:19.638-08:00</updated><title type='text'>sysctl hardening</title><content type='html'>&lt;div&gt;#Kernel sysctl configuration file for Red Hat Linux&lt;/div&gt;&lt;div&gt;#&lt;/div&gt;&lt;div&gt;# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and&lt;/div&gt;&lt;div&gt;# sysctl.conf(5) for more details.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Disables packet forwarding&lt;/div&gt;&lt;div&gt;net.ipv4.ip_forward=0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Disables IP source routing&lt;/div&gt;&lt;div&gt;net.ipv4.conf.all.accept_source_route = 0&lt;/div&gt;&lt;div&gt;net.ipv4.conf.lo.accept_source_route = 0&lt;/div&gt;&lt;div&gt;net.ipv4.conf.eth0.accept_source_route = 0&lt;/div&gt;&lt;div&gt;net.ipv4.conf.default.accept_source_route = 0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Enable IP spoofing protection, turn on source route verification&lt;/div&gt;&lt;div&gt;net.ipv4.conf.all.rp_filter = 1&lt;/div&gt;&lt;div&gt;net.ipv4.conf.lo.rp_filter = 1&lt;/div&gt;&lt;div&gt;net.ipv4.conf.eth0.rp_filter = 1&lt;/div&gt;&lt;div&gt;net.ipv4.conf.default.rp_filter = 1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Disable ICMP Redirect Acceptance&lt;/div&gt;&lt;div&gt;net.ipv4.conf.all.accept_redirects = 0&lt;/div&gt;&lt;div&gt;net.ipv4.conf.lo.accept_redirects = 0&lt;/div&gt;&lt;div&gt;net.ipv4.conf.eth0.accept_redirects = 0&lt;/div&gt;&lt;div&gt;net.ipv4.conf.default.accept_redirects = 0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Enable Log Spoofed Packets, Source Routed Packets, Redirect Packets&lt;/div&gt;&lt;div&gt;net.ipv4.conf.all.log_martians = 0&lt;/div&gt;&lt;div&gt;net.ipv4.conf.lo.log_martians = 0&lt;/div&gt;&lt;div&gt;net.ipv4.conf.eth0.log_martians = 0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Disables IP source routing&lt;/div&gt;&lt;div&gt;net.ipv4.conf.all.accept_source_route = 0&lt;/div&gt;&lt;div&gt;net.ipv4.conf.lo.accept_source_route = 0&lt;/div&gt;&lt;div&gt;net.ipv4.conf.eth0.accept_source_route = 0&lt;/div&gt;&lt;div&gt;net.ipv4.conf.default.accept_source_route = 0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Enable IP spoofing protection, turn on source route verification&lt;/div&gt;&lt;div&gt;net.ipv4.conf.all.rp_filter = 1&lt;/div&gt;&lt;div&gt;net.ipv4.conf.lo.rp_filter = 1&lt;/div&gt;&lt;div&gt;net.ipv4.conf.eth0.rp_filter = 1&lt;/div&gt;&lt;div&gt;net.ipv4.conf.default.rp_filter = 1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;# Disable ICMP Redirect Acceptance&lt;/div&gt;&lt;div&gt;net.ipv4.conf.all.accept_redirects = 0&lt;/div&gt;&lt;div&gt;net.ipv4.conf.lo.accept_redirects = 0&lt;/div&gt;&lt;div&gt;net.ipv4.conf.eth0.accept_redirects = 0&lt;/div&gt;&lt;div&gt;net.ipv4.conf.default.accept_redirects = 0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Disables the magic-sysrq key&lt;/div&gt;&lt;div&gt;kernel.sysrq = 0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Decrease the time default value for tcp_fin_timeout connection&lt;/div&gt;&lt;div&gt;net.ipv4.tcp_fin_timeout = 15&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Decrease the time default value for tcp_keepalive_time connection&lt;/div&gt;&lt;div&gt;net.ipv4.tcp_keepalive_time = 1800&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Turn off the tcp_window_scaling&lt;/div&gt;&lt;div&gt;net.ipv4.tcp_window_scaling = 0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Turn off the tcp_sack&lt;/div&gt;&lt;div&gt;net.ipv4.tcp_sack = 0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Turn off the tcp_timestamps&lt;/div&gt;&lt;div&gt;net.ipv4.tcp_timestamps = 0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Enable TCP SYN Cookie Protection&lt;/div&gt;&lt;div&gt;net.ipv4.tcp_syncookies = 1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Enable ignoring broadcasts request&lt;/div&gt;&lt;div&gt;net.ipv4.icmp_echo_ignore_broadcasts = 1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Enable bad error message Protection&lt;/div&gt;&lt;div&gt;net.ipv4.icmp_ignore_bogus_error_responses = 1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Log Spoofed Packets, Source Routed Packets, Redirect Packets&lt;/div&gt;&lt;div&gt;net.ipv4.conf.all.log_martians = 1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Increases the size of the socket queue (effectively, q0).&lt;/div&gt;&lt;div&gt;net.ipv4.tcp_max_syn_backlog = 1024&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Increase the tcp-time-wait buckets pool size&lt;/div&gt;&lt;div&gt;net.ipv4.tcp_max_tw_buckets = 1440000&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;# Allowed local port range&lt;/div&gt;&lt;div&gt;net.ipv4.ip_local_port_range = 16384 65536&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-2712609263415732225?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/2712609263415732225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/02/sysctl-hardening.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/2712609263415732225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/2712609263415732225'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/02/sysctl-hardening.html' title='sysctl hardening'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-1298995211883845208</id><published>2010-02-01T12:10:00.002-08:00</published><updated>2010-02-01T12:42:03.155-08:00</updated><title type='text'>Securing Your Server</title><content type='html'>&lt;div&gt;1)Never work with root accout.You can create an admin account.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;  useradd &amp;amp; passwd vpsadmin&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;add some basic permissions to the account. By adding the user to the wheel group we are giving it some administrative rights.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    usermod -a -G wheel vpsadmin&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2)SSH security&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;vim /etc/ssh/sshd_config&lt;/div&gt;&lt;div&gt;Port 12345&lt;/div&gt;&lt;div&gt;PermitRootLogin no&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/etc/init.d/sshd restart&lt;/div&gt;&lt;div&gt;&lt;div&gt;3)Install firewall (APF)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;wget http://www.rfxnetworks.com/downloads/apf-current.tar.gz&lt;/div&gt;&lt;div&gt;tar -xvf apf-current.tar.gz&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;cd apf-current.tar.gz&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;./install.sh&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;vim /etc/apf/conf.ap&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First look for the line that says&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;DEVEL_MODE=”1″&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Leaving this option as “1″ will disable your firewall after 5 minutes, so make  sure to change it to “0″.&lt;/div&gt;&lt;div&gt;So replace 1 eith 0 and it look like this:-&lt;/div&gt;&lt;div&gt;DEVEL_MODE=”0″&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Next, take a look at the allowed inbound ports. You should see something like&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;IG_TCP_CPORTS=”22,80,443″&lt;/div&gt;&lt;div&gt;&lt;div&gt;Notice that port 22, the default SSH port is open. We want to change this to the port we gave SSH earlier. You can leave port 80 (HTTP) and 443 (HTTPS) open if you plan on running a website.&lt;/div&gt;&lt;div&gt;If you want to open any port, you have to give an entry in to the above place.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;By default, APF will not filter outbound traffic but if would like to change that look for the following line&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;EGF=”0″&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And change this value to “1″. On the line directly below it you should see the allowed outbound ports&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;EG_TCP_CPORTS=”21,25,80,443″&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; Change these if you have enabled outbound filtering and save the firewall config. Now we should add the firewall to start when we reboot our VPS and enable it&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;chkconfig --add apf&lt;/div&gt;&lt;div&gt;chkconfig --level 345 apf on&lt;/div&gt;&lt;div&gt;/etc/init.d/apf start&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4)SECURING CPANEL AND WHM&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;These are items inside of WHM/Cpanel that should be changed to secure your server.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Goto Server Setup =&gt;&gt; Tweak Settings&lt;/div&gt;&lt;div&gt;Check the following items...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Under Domains&lt;/div&gt;&lt;div&gt;Prevent users from parking/adding on common internet domains. (ie hotmail.com, aol.com)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Under Mail&lt;/div&gt;&lt;div&gt;Attempt to prevent pop3 connection floods&lt;/div&gt;&lt;div&gt;Default catch-all/default address behavior for new accounts - blackhole&lt;/div&gt;&lt;div&gt;(SET TO FAIL)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Under System&lt;/div&gt;&lt;div&gt;Use jailshell as the default shell for all new accounts and modified accounts&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Goto Security =&gt;&gt; Security Center&lt;/div&gt;&lt;div&gt;Enable php open_basedir Protection&lt;/div&gt;&lt;div&gt;Enable mod_userdir Protection&lt;/div&gt;&lt;div&gt;Disabled Compilers for unprivileged users.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Goto Security =&gt;&gt; Manage Wheel Group Users&lt;/div&gt;&lt;div&gt;Remove all users except for root and your main account from the wheel group.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Goto Security =&gt;&gt; Security Center =&gt;&gt; Shell Fork Bomb Protection&lt;/div&gt;&lt;div&gt;Enable Shell Fork Bomb/Memory Protection&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When setting up Feature Limits for resellers in Resellers =&gt;&gt; Reseller Center, under Privileges always disable Allow Creation of Packages with Shell Access and enable Never allow creation of accounts with shell access; under Root Access disable All Features.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Goto Service Configuration =&gt;&gt; FTP Configuration&lt;/div&gt;&lt;div&gt;Disable Anonymous FTP&lt;/div&gt;&lt;div&gt;&lt;div&gt;Goto Account Functions =&gt;&gt; Manage Shell Access&lt;/div&gt;&lt;div&gt;Disable Shell Access for all users&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Goto Mysql =&gt;&gt; MySQL Root Password&lt;/div&gt;&lt;div&gt;Change root password for MySQL (Use a very hard, random password that is not used elsewhere as the chances of actually using it are probably slim and actually using it for databases is a security risk.)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Goto Security and run Quick Security Scan and Scan for Trojan Horses often.&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;6)INSTALLING CSF&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;wget http://www.configserver.com/free/csf.tgz&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;tar -zxf csf.tar.gz&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;sh /csf/install.sh&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you want to remove apf or any other firewall,&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;sh /etc/csf/remove_apf_bfd.sh&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For starting firewall---&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;csf -s&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;restart the firewall---&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;csf -r&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;flush the rules or stop the firewall.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;csf -f&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you are running a VPS plan,&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Open the /etc/csf/csf.conf and look for a line MONOLITHIC_KERNEL = "0" and change to&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;MONOLITHIC_KERNEL = "1"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Config Files&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/etc/csf/csf.conf =&gt; CSF Firewall configuration file&lt;/div&gt;&lt;div&gt;/etc/csf/csf.allow =&gt; Config file to allow IPs&lt;/div&gt;&lt;div&gt;/etc/csf/csf.deny =&gt; Config file to deny IPs&lt;/div&gt;&lt;div&gt;/etc/csf/ =&gt; Alert files with TXT extension are stored within this directory&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Harden the firewall security by performing the system security check. To do this go to Cpanel WHM &gt; CSF Firewall &amp;amp; Security &gt; Check System Security. There it will list WARNINGS based on your server.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;-bash-3.2# chkconfig --add csf&lt;/div&gt;&lt;div&gt;-bash-3.2# chkconfig --level 345 csf on&lt;/div&gt;&lt;div&gt;&lt;div&gt;-bash-3.2# chkconfig --list | grep csf&lt;/div&gt;&lt;div&gt;csf             0:off   1:off   2:on    3:on    4:on    5:on    6:off&lt;/div&gt;&lt;div&gt;-bash-3.2#&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Remove the CSF Firewall&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;sh /etc/csf/uninstall.sh&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;7)Install a root breach DETECTOR and EMAIL WARNING&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;vim .bash_profile&lt;/div&gt;&lt;div&gt;add the following line..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;echo 'ALERT - Root Shell Access (YourserverName) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" you@yourdomain.com&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Set an SSH Legal Message&lt;/div&gt;&lt;div&gt;----------------------------&lt;/div&gt;&lt;div&gt;To an SSH legal message, SSH into server and login as root.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;At command prompt type:&lt;/div&gt;&lt;div&gt;vim /etc/motd&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enter your message, save and exit.&lt;/div&gt;&lt;div&gt;Note: I use the following message…&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ALERT! You are entering a secured area! Your IP and login information&lt;/div&gt;&lt;div&gt;have been recorded. System administration has been notified.&lt;/div&gt;&lt;div&gt;This system is restricted to authorized access only. All activities on&lt;/div&gt;&lt;div&gt;this system are recorded and logged. Unauthorized access will be fully&lt;/div&gt;&lt;div&gt;investigated and reported to the appropriate law enforcement agencies.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;=========================================&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;9)) Securing /tmp&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;first check whether /tmp is exist or not using df -h&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Finally, if you don’t have the ability to create a fresh /tmp partition on existing drives, you can use the loopback capabilities of the Linux kernel by creating a loopback filesystem that will be mounted as /tmp and can use the same restrictive mount options. To create a 1GB loopback filesystem, execute:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# dd if=/dev/zero of=/.tmpfs bs=1024 count=1000000&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# mke2fs -j /.tmpfs&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# cp -av /tmp /tmp.old&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# mount -o loop,noexec,nosuid,rw /.tmpfs /tmp&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# chmod 1777 /tmp&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# mv -f /tmp.old/* /tmp/&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# rmdir /tmp.old&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Once this is complete, edit /etc/fstab to have the loopback filesystem mounted automatically at boot:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/.tmpfs /tmp ext3 loop,nosuid,noexec,rw 0 0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Little things like ensuring proper permissions and using restrictive mount options will prevent a lot of harm coming to the system. If a bot lands on a filesystem that is unable to execute, that bot is essentially worthless&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;10)securing /etc/sysctl.conf&lt;/div&gt;&lt;div&gt;  ------------------------------&lt;/div&gt;&lt;div&gt;&lt;div&gt;vim /etc/sysctl.conf&lt;/div&gt;&lt;div&gt;1)If you're not forwarding traffic between interfaces or if you have only a single interface, its usually a good idea to disable forwarding:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/proc/sys/net/ipv4/ip_forward 0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2)rp_filter can reject incoming packets if their source does not match the networks interface from which they are arriving from. This is a good way to prevent IP spoofing (usually not a good idea if you have several IP addresses on different interfaces or if a single interface has multiple IP addys).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/proc/sys/net/ipv4/conf/all/rp_filter 1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3)Enable TCP SYN Cookie Protection&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A "SYN Attack" is a denial of service attack that consumes all the resources on a machine. Any server that is connected to a network is potentially subject to this attack.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To enable TCP SYN Cookie Protection, edit the /etc/sysctl.conf file and add the following line:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;net.ipv4.tcp_syncookies = 1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4)Disable IP Source Routing&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Source Routing is used to specify a path or route through the network from source to destination. This feature can be used by network people for diagnosing problems. However, if an intruder was able to send a source routed packet into the network, then he could intercept the replies and your server might not know that it's not communicating with a trusted server.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To enable Source Route Verification, edit the /etc/sysctl.conf file and add the following line:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;  net.ipv4.conf.all.accept_source_route = 0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;5)Disable ICMP Redirect Acceptance&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ICMP redirects are used by routers&lt;/div&gt;&lt;div&gt;to tell the server that there is a better path to other networks than the one chosen by the server. However, an intruder could potentially use ICMP redirect packets to alter the hosts's routing table by causing traffic to use a path you didn't intend.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To disable ICMP Redirect Acceptance, edit the /etc/sysctl.conf file and add the following line:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;net.ipv4.conf.all.accept_redirects = 0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;6)Enable IP Spoofing Protection&lt;/div&gt;&lt;div&gt;&lt;div&gt;IP spoofing is a technique where an intruder sends out packets which claim to be from another host by manipulating the source address. IP spoofing is very often used for denial of service attacks. For more information on IP Spoofing, I recommend the article IP Spoofing: Understanding the basics.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To enable IP Spoofing Protection, turn on Source Address Verification. Edit the /etc/sysctl.conf file and add the following line:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;  net.ipv4.conf.all.rp_filter = 1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;7)Enable Ignoring Broadcasts Request&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you want or need Linux to ignore broadcast requests, edit the /etc/sysctl.conf file and add the following line:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;   net.ipv4.icmp_echo_ignore_broadcasts = 1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;8)Enable Bad Error Message Protection&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To alert you about bad error messages in the network, edit the /etc/sysctl.conf file and add the following line:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;net.ipv4.icmp_ignore_bogus_error_responses = 1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;9)Enable Logging of Spoofed Packets, Source Routed Packets, Redirect Packets&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To turn on logging for Spoofed Packets, Source Routed Packets, and Redirect Packets, edit the /etc/sysctl.conf file and add the following line:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;net.ipv4.conf.all.log_martians = 1&lt;/div&gt;&lt;div&gt;-----------------------------------------------------------------------&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;11)Securing /dev/shm&lt;/div&gt;&lt;div&gt;&lt;div&gt;Rename it and create a symbolic link to /tmp:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; mv /var/tmp /var/tmp1&lt;/div&gt;&lt;div&gt; ln -s /tmp /var/tmp&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;vim /etc/fstab&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;change:&lt;/div&gt;&lt;div&gt;"none /dev/shm tmpfs defaults,rw 0 0" to&lt;/div&gt;&lt;div&gt;"none /dev/shm tmpfs defaults,nosuid,noexec,rw 0 0"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;mount -a&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;-----------------------------------------------------------&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;12) Harden host.conf&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Log into each server as root.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Edit the /etc/host.conf file.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ensure this file has the following settings:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Lookup names via DNS first then fall back to etc/hosts.&lt;/div&gt;&lt;div&gt;order bind,hosts&lt;/div&gt;&lt;div&gt;# We have machines with multiple IP addresses.&lt;/div&gt;&lt;div&gt;multi on&lt;/div&gt;&lt;div&gt;# Check for IP address spoofing.&lt;/div&gt;&lt;div&gt;nospoof on&lt;/div&gt;&lt;div&gt;spoofalert on&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Save the file.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;for details see :--------&lt;/div&gt;&lt;div&gt;http://www.faqs.org/docs/securing/chap5sec39.html&lt;/div&gt;&lt;div&gt;--------------------------&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;13) Installing rootkit&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;RKHunter - (RootKit Hunter) Is a security scanning tool which will scan for rootkits, backdoors, and local exploits. RKHunter will ensure you about 99.9% that your dedicated web server is secure.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. Login to your server via SSH as root.&lt;/div&gt;&lt;div&gt;Then Type: cd /usr/local/src/&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. Download RKHunter Version 1.1.4&lt;/div&gt;&lt;div&gt;Type: wget http://optusnet.dl.sourceforge.net/sourceforge/rkhunter/rkhunter-1.3.0.tar.gz&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. Extract files&lt;/div&gt;&lt;div&gt;Type: tar -xzvf rkhunter-1.3.0.tar.gz&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4. Type: cd rkhunter-1.3.0.tar.gz&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;5. Type: ./installer.sh --help&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The default should do&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;./installer.sh --layout /usr/local --install&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;vi /etc/cron.daily/rkhunter.sh&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#!/bin/bash&lt;/div&gt;&lt;div&gt;(/usr/local/bin/rkhunter -c --cronjob 2&gt;&amp;amp;1 | mail -s "Daily Rkhunter Scan&lt;/div&gt;&lt;div&gt;Report" email@domain.com)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;chmod 700 /etc/cron.daily/rkhunter.sh&lt;/div&gt;&lt;div&gt;rkhunter --update&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;14)apache OPtimizing&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;change Timeout 300 to&lt;/div&gt;&lt;div&gt;Timeout 45&lt;/div&gt;&lt;div&gt;# change KeepAlive Off to&lt;/div&gt;&lt;div&gt;KeepAlive On&lt;/div&gt;&lt;div&gt;# MaxKeepAliveRequests: The maximum number of requests to allow&lt;/div&gt;&lt;div&gt;# during a persistent connection. Set to 0 to allow an unlimited amount.&lt;/div&gt;&lt;div&gt;# We recommend you leave this number high, for maximum performance.&lt;/div&gt;&lt;div&gt;# -- change MaxKeepAliveRequests 100 to 500&lt;/div&gt;&lt;div&gt;MaxKeepAliveRequests 500&lt;/div&gt;&lt;div&gt;# KeepAliveTimeout: Number of seconds to wait for the next request from the&lt;/div&gt;&lt;div&gt;# same client on the same connection.&lt;/div&gt;&lt;div&gt;# change KeepAliveTimeout 15 to&lt;/div&gt;&lt;div&gt;KeepAliveTimeout 5&lt;/div&gt;&lt;div&gt;# Increase MaxClients after benchmarking. mine is&lt;/div&gt;&lt;div&gt;MaxClients 200&lt;/div&gt;&lt;div&gt;# Turn off ServerSignature&lt;/div&gt;&lt;div&gt;ServerSignature Off&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#ServerTokens Product&lt;/div&gt;&lt;div&gt;ServerTokens ProductOnly&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;More Details&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;http://www.mysql-apache-php.com/basic-linux-security.htm&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;15)APF in lxadmin&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;This may help, I have modified a tutorial for apf so it will work for LXAdmin. If you see any changes that need to be made let me know.&lt;/div&gt;&lt;div&gt;Important: Be sure Iptables were enabled when the VM was created (openvz)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. cd /root/downloads or another temporary folder where you store your files.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. wget http://www.rfxnetworks.com/downloads/apf-current.tar.gz&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. tar -xvzf apf-current.tar.gz&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4. cd apf-0.9.6-2/ or whatever the latest version is.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;5. Run the install file: ./install.sh&lt;/div&gt;&lt;div&gt;You will receive a message saying it has been installed&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Installing APF 0.9.6-2: Completed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Installation Details:&lt;/div&gt;&lt;div&gt;Install path: /etc/apf/&lt;/div&gt;&lt;div&gt;Config path: /etc/apf/conf.apf&lt;/div&gt;&lt;div&gt;Executable path: /usr/local/sbin/apf&lt;/div&gt;&lt;div&gt;AntiDos install path: /etc/apf/ad/&lt;/div&gt;&lt;div&gt;AntiDos config path: /etc/apf/ad/conf.antidos&lt;/div&gt;&lt;div&gt;DShield Client Parser: /etc/apf/extras/dshield/&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Other Details:&lt;/div&gt;&lt;div&gt;Listening TCP ports: 1,21,22,25,53,80,110,111,143,443,465,993,995,7776,7777,7778, 7779,3306&lt;/div&gt;&lt;div&gt;Listening UDP ports: 53,55880&lt;/div&gt;&lt;div&gt;Note: These ports are not auto-configured; they are simply presented for information purposes. You must manually configure all port options.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;6. Lets configure the firewall: pico /etc/apf/conf.apf (or nano /etc/apf/conf.apf)&lt;/div&gt;&lt;div&gt;&lt;div&gt;We will go over the general configuration to get your firewall running. This isn't a complete detailed guide of every feature the firewall has. Look through the README and the configuration for an explanation of each feature.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We like to use DShield.org's "block" list of top networks that have exhibited&lt;/div&gt;&lt;div&gt;suspicious activity.&lt;/div&gt;&lt;div&gt;FIND: USE_DS="0"&lt;/div&gt;&lt;div&gt;CHANGE TO: USE_DS="1"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Find the following lines:&lt;/div&gt;&lt;div&gt;IFACE_IN="eth0"&lt;/div&gt;&lt;div&gt;IFACE_OUT="eth0"&lt;/div&gt;&lt;div&gt;and change them to&lt;/div&gt;&lt;div&gt;IFACE_IN="venet0"&lt;/div&gt;&lt;div&gt;IFACE_OUT="venet0"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;7. Configuring Firewall Ports:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;LxAdmin Servers&lt;/div&gt;&lt;div&gt;We like to use the following on our Cpanel Servers&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Common ingress (inbound) ports&lt;/div&gt;&lt;div&gt;# Common ingress (inbound) TCP ports -3000_3500 = passive port range for Pure FTPD&lt;/div&gt;&lt;div&gt;IG_TCP_CPORTS="21,22,25,53,80,110,143,443,7777,7778,7779,3000_3500 "&lt;/div&gt;&lt;div&gt;#&lt;/div&gt;&lt;div&gt;# Common ingress (inbound) UDP ports&lt;/div&gt;&lt;div&gt;IG_UDP_CPORTS="53"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Common egress (outbound) ports&lt;/div&gt;&lt;div&gt;# Egress filtering [0 = Disabled / 1 = Enabled]&lt;/div&gt;&lt;div&gt;EGF="1"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Common egress (outbound) TCP ports&lt;/div&gt;&lt;div&gt;EG_TCP_CPORTS="21,25,80,443,43,7777,7778,7779"&lt;/div&gt;&lt;div&gt;#&lt;/div&gt;&lt;div&gt;# Common egress (outbound) UDP ports&lt;/div&gt;&lt;div&gt;EG_UDP_CPORTS="20,21,53"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Save the changes: Ctrl+X then Y&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;8. Starting the firewall&lt;/div&gt;&lt;div&gt;/usr/local/sbin/apf -s&lt;/div&gt;&lt;div&gt;&lt;div&gt;Other commands:&lt;/div&gt;&lt;div&gt;usage ./apf [OPTION]&lt;/div&gt;&lt;div&gt;-s|--start ......................... load firewall policies&lt;/div&gt;&lt;div&gt;-r|--restart ....................... flush &amp;amp; load firewall&lt;/div&gt;&lt;div&gt;-f|--flush|--stop .................. flush firewall&lt;/div&gt;&lt;div&gt;-l|--list .......................... list chain rules&lt;/div&gt;&lt;div&gt;-st|--status ....................... firewall status&lt;/div&gt;&lt;div&gt;-a HOST CMT|--allow HOST COMMENT ... add host (IP/FQDN) to allow_hosts.rules and&lt;/div&gt;&lt;div&gt;immediately load new rule into firewall&lt;/div&gt;&lt;div&gt;-d HOST CMT|--deny HOST COMMENT .... add host (IP/FQDN) to deny_hosts.rules and&lt;/div&gt;&lt;div&gt;immediately load new rule into firewall&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;9. After everything is fine, change the DEV option&lt;/div&gt;&lt;div&gt;Stop the firewall from automatically clearing itself every 5 minutes from cron.&lt;/div&gt;&lt;div&gt;We recommend changing this back to "0" after you've had a chance to ensure everything is working well and tested the server out.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;pico /etc/apf/conf.apf&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;FIND: DEVM="1"&lt;/div&gt;&lt;div&gt;CHANGE TO: DEVM="0"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;10. Configure AntiDOS for APF&lt;/div&gt;&lt;div&gt;Relatively new to APF is the new AntiDOS feature which can be found in: /etc/apf/ad&lt;/div&gt;&lt;div&gt;The log file will be located at /var/log/apfados_log so you might want to make note of it and watch it!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;pico /etc/apf/ad/conf.antidos&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are various things you might want to fiddle with but I'll get the ones that will alert you by email.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# [E-Mail Alerts]&lt;/div&gt;&lt;div&gt;Under this heading we have the following:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Organization name to display on outgoing alert emails&lt;/div&gt;&lt;div&gt;CONAME="Your Company"&lt;/div&gt;&lt;div&gt;Enter your company information name or server name..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Send out user defined attack alerts [0=off,1=on]&lt;/div&gt;&lt;div&gt;USR_ALERT="0"&lt;/div&gt;&lt;div&gt;Change this to 1 to get email alerts&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-1298995211883845208?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/1298995211883845208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/02/securing-your-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/1298995211883845208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/1298995211883845208'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/02/securing-your-server.html' title='Securing Your Server'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-554763194221961191</id><published>2010-02-01T12:10:00.001-08:00</published><updated>2010-02-01T12:10:50.171-08:00</updated><title type='text'>HyperVM/Kloxo</title><content type='html'>http://www.howtoforge.com/managing-openvz-with-hypervm-on-centos-5.2&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-554763194221961191?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/554763194221961191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/02/hypervmkloxo.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/554763194221961191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/554763194221961191'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/02/hypervmkloxo.html' title='HyperVM/Kloxo'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-9063089162894702916</id><published>2010-02-01T12:08:00.000-08:00</published><updated>2010-02-01T12:10:11.490-08:00</updated><title type='text'>How to install wordpress!</title><content type='html'>&lt;div&gt;WordPress is an open source blog publishing application. WordPress is the official successor of b2\cafelog which was developed by Michel Valdrighi. The latest release of WordPress is version 2.7.1, released on 10 February 2009.WordPress has a templating system, which includes widgets that can be rearranged without editing PHP or HTML code, as well as themes that can be installed and switched between. The PHP and HTML code in themes can also be edited for more advanced customizations. WordPress also features integrated link management; a search engine-friendly, clean permalink structure; the ability to assign nested, multiple categories to articles; multiple author capability; and support for tagging of posts and articles. Automatic filters that provide for proper formatting and styling of text in articles (for example, converting regular quotes to smart quotes) are also included. WordPress also supports the Trackback and Pingback standards for displaying links to other sites that have themselves linked to a post or article. Finally, WordPress has a rich plugin architecture which allows users and developers to extend its functionality beyond the features that come as part of the base install.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The instllation of wordpress is quite simple.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;1)Download the latest version of wordpress and extract it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2)Place the WordPress files in the desired location on your web server,using FTP&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;* If you want to integrate WordPress into the root of your domain (e.g. http://example.com/), move or upload all contents of the unzipped WordPress directory (but excluding the directory itself) into the root directory of your web server.&lt;/div&gt;&lt;div&gt;* If you want to have your WordPress installation in its own subdirectory on your web site (e.g. http://example.com/blog/), rename the directory wordpress to the name you'd like the subdirectory to have and move or upload it to your web server. For example if you want the WordPress installation in a subdirectory called "blog", you should rename the directory called "wordpress" to "blog" and upload it to the root directory of your web server.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3)Here i am uploading the folder(blog) to public_html, using ftp. Make sure that you upload the folder as a user, not the root.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4)now goto the cpanel,and create a mysql user and a database.please remember the dbname, user and password.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;5)then goto filemanager, inside the uploaded folder (blog), edit the file wp-config-sample.php&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;6)rename the wp-config-sample.php to wp-config.php.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;7)edit the wp-config.php and insert the db details of the one which we have created.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is the default wp-config-sample.php, you will need to replace the default values in this file with your own specific database settings.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;define('DB_NAME', 'putyourdbnamehere'); // The name of the database&lt;/div&gt;&lt;div&gt;define('DB_USER', 'usernamehere'); // Your MySQL username&lt;/div&gt;&lt;div&gt;define('DB_PASSWORD', 'yourpasswordhere'); // ...and password&lt;/div&gt;&lt;div&gt;define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;usually the DB_HOST must be 'localhost'.if it is not working contact your web hosting provider.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;8)Run the WordPress installation script by accessing wp-admin/install.php in your favorite web browser.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;* If you installed WordPress in the rootl directory, you should visit: http://example.com/wp-admin/install.php&lt;/div&gt;&lt;div&gt;* If you installed WordPress in its own subdirectory called blog, for example, you should visit: http://example.com/blog/wp-admin/install.php&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;9)The instllation process will now beging. The screen shots fir the instllation is given below.&lt;/div&gt;&lt;div&gt;&lt;div&gt;10)goto www.yourdomain.com/blog/wp-login.php to login for the next time.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-9063089162894702916?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/9063089162894702916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/02/how-to-install-wordpress.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/9063089162894702916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/9063089162894702916'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/02/how-to-install-wordpress.html' title='How to install wordpress!'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-500079869925592034</id><published>2010-01-14T10:37:00.000-08:00</published><updated>2010-01-14T10:39:17.342-08:00</updated><title type='text'>Howto: enable TUN module on a VPS</title><content type='html'>&lt;p&gt;&lt;strong&gt;TUN module is required to configure VPN tunneling&lt;/strong&gt; and to configure VPN on a VPS, you need to enable the module from the Hardware node. &lt;strong&gt;Login to your Host server and execute the following command:&lt;/strong&gt;&lt;/p&gt;&lt;div&gt;&lt;p&gt;&lt;strong&gt;First check if the TUN module is enabled on the hardware node:&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;strong&gt;&lt;code&gt;lsmod | grep tun&lt;/code&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;If not, &lt;strong&gt;load the module using modprobe&lt;/strong&gt;:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;strong&gt;&lt;code&gt;modprobe tun&lt;/code&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;Now, &lt;strong&gt;enable the TUN module on a VPS:&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;strong&gt;vzctl set VEID  devices c:10:200:rw  save&lt;br /&gt; vzctl exec VEID mkdir -p /dev/net&lt;br /&gt; vzctl exec VEID mknod /dev/net/tun c 10 200&lt;br /&gt; vzctl exec VEID chmod 600 /dev/net/tun&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;strong&gt;where, VEID is the VPS ID&lt;/strong&gt; you want to enable the TUN module on.&lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-500079869925592034?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/500079869925592034/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/01/howto-enable-tun-module-on-vps.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/500079869925592034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/500079869925592034'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/01/howto-enable-tun-module-on-vps.html' title='Howto: enable TUN module on a VPS'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-1691704160967430079</id><published>2010-01-13T16:09:00.000-08:00</published><updated>2010-01-13T16:10:30.306-08:00</updated><title type='text'>Fantastico shows error 'You cannot install more than one script in the root directory of a domain'</title><content type='html'>1. Login to your  cpanel&lt;br /&gt;2. Go to "file manager"&lt;br /&gt;3. click on the ".fantasticodata" folder&lt;br /&gt;4. open up "installed_in_root.php" and edit it.&lt;br /&gt;&lt;br /&gt;This is an example of what I mean:&lt;br /&gt;&lt;br /&gt;If you open up "installed_in_root.php" you will see something like this:&lt;br /&gt;&lt;br /&gt;$installed_in_root["domain.com"] = 1;&lt;br /&gt;&lt;br /&gt;This is what you need to delete.&lt;br /&gt;&lt;br /&gt;(this is just an example from my "installed_in_root,php" file).&lt;br /&gt;&lt;br /&gt;Keep in mind that every install of wordpress you have made will be stored in this file, be very carefull not to delete any of your other wordpress sites out of it.&lt;br /&gt;&lt;br /&gt;I hope this makes sense lol, I'm not very good at explaining things.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-1691704160967430079?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/1691704160967430079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/01/fantastico-shows-error-you-cannot.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/1691704160967430079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/1691704160967430079'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/01/fantastico-shows-error-you-cannot.html' title='Fantastico shows error &apos;You cannot install more than one script in the root directory of a domain&apos;'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-5047276458189818347</id><published>2010-01-13T13:38:00.000-08:00</published><updated>2010-01-13T13:42:41.947-08:00</updated><title type='text'>Change Time Zone for a particular account on cpanel server</title><content type='html'>To change the timezone for only a particular account using .htaccess:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;SetEnv TZ  &lt;time&gt;&lt;time&gt; "TimeZone" &lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;&lt;/time&gt;&lt;/strong&gt;&lt;p&gt;&lt;strong&gt;&lt;time&gt;php_value date.timezone &lt;timezone&gt; "&lt;timezone&gt;TimeZone"&lt;/timezone&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;time&gt;&lt;timezone&gt;&lt;br /&gt;&lt;/timezone&gt;&lt;/strong&gt;&lt;/p&gt;&lt;strong&gt;&lt;time&gt;&lt;timezone&gt;&lt;/timezone&gt;&lt;/time&gt;&lt;/strong&gt;&lt;time&gt;&lt;timezone&gt;Visit http://php.net/manual/en/timezones.php for various time zones&lt;br /&gt;&lt;br /&gt;e.g. SetEnv TZ Australia/Adelaide&lt;br /&gt;&lt;br /&gt;php_value date.timezone "Australia/Adelaide"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-5047276458189818347?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/5047276458189818347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/01/change-time-zone-for-particular-account.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/5047276458189818347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/5047276458189818347'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2010/01/change-time-zone-for-particular-account.html' title='Change Time Zone for a particular account on cpanel server'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-7990815211952940827</id><published>2009-12-21T01:37:00.000-08:00</published><updated>2009-12-21T02:09:42.912-08:00</updated><title type='text'>How To Add DomainKeys and SPF Records on CPanel Servers</title><content type='html'>This how to describe how to add domainkeys and SPF (Sender Policy Framework) records on CPanel Servers. Whenever you create a domain on CPanel server using WHM, it wont add domainkeys and SPF records for particular domains. To add domainkeys and SPF records please use following steps.&lt;br /&gt;&lt;br /&gt;We consider here we have a domain &lt;strong&gt;howtodolinux.com&lt;/strong&gt; with cpanel username &lt;strong&gt;dothelinux&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;p&gt;Please note on CPanel servers most of the work is done using cpanel username which then reflect setting on particular domains. If you have several domains / sub domains under one username, it will add domainkeys and SPF records for all domains / subdomains.&lt;/p&gt; &lt;p&gt;Execute the following command on your CPanel server using root.&lt;/p&gt; &lt;h3 style="font-family: georgia;"&gt;&lt;span style="font-size:85%;"&gt;1 DomainKeys&lt;/span&gt;&lt;/h3&gt; &lt;h3&gt;&lt;span style="font-size:85%;"&gt;1.1 Add DomainKeys for single user&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;/usr/local/cpanel/bin/domain_keys_installer &lt;/span&gt;&lt;strong&gt;&lt;span style="font-weight: bold;"&gt;dothelinux&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/blockquote&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;h3 style="font-weight: bold;"&gt;&lt;span style="font-size:85%;"&gt;1.2 Add DomainKeys for all CPanel users.&lt;/span&gt;&lt;/h3&gt; &lt;p&gt;If you wish to add DomainKeys for all Cpanel users on your server, execute following command.&lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote style="font-weight: bold;"&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;blockquote style="font-weight: bold;"&gt;cat /var/cpanel/users | while read a; do&lt;br /&gt;/usr/local/cpanel/bin/domain_keys_installer $a&lt;br /&gt;done&lt;/blockquote&gt;&lt;p style="font-weight: bold;"&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;h3&gt;&lt;/h3&gt;&lt;blockquote&gt;&lt;h3&gt;&lt;span style="font-size:85%;"&gt;2 SPF (Sender Policy Framework)&lt;/span&gt;&lt;/h3&gt; &lt;h3&gt;&lt;span style="font-size:85%;"&gt;2.1 Add SPF for single account.&lt;/span&gt;&lt;/h3&gt;&lt;/blockquote&gt;&lt;h3&gt;&lt;/h3&gt; &lt;blockquote&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;/usr/local/cpanel/bin/spf_installer &lt;/span&gt;&lt;strong&gt;&lt;span style="font-weight: bold;"&gt;dothelinux&lt;/span&gt;&lt;/strong&gt;&lt;/blockquote&gt;&lt;strong&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;blockquote&gt;&lt;strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;h3 style="font-weight: bold;"&gt;&lt;span style="font-size:85%;"&gt;2.2 Add SPF for all Cpanel accounts.&lt;/span&gt;&lt;/h3&gt; &lt;p&gt;If you want to add SPF records for all cpanel accounts exist on your server then use the following command.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;cat /var/cpanel/users | while read a; do&lt;br /&gt;/usr/local/cpanel/bin/spf_installer $a&lt;br /&gt;done&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;h3&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;blockquote&gt;3 Enable DomainKeys and SPF for every new CPanel account.&lt;/blockquote&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;/h3&gt; &lt;p&gt;If you want to add DomainKeys and SPF for every new account created on Cpanel, then do the following.&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;blockquote style="font-weight: bold;"&gt;vi /scripts/postwwwacct&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;postwwwacct is a file which execute after wwwacct (used to create account), paste following lines in the file&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;p style="font-weight: bold;"&gt;#!/usr/bin/perl&lt;/p&gt; &lt;p style="font-weight: bold;"&gt;my %OPTS = @ARGV;&lt;br /&gt;$ENV{USER} = “$OPTS{’user’}”;&lt;br /&gt;system q(/usr/local/cpanel/bin/domain_keys_installer $USER);&lt;br /&gt;system q(/usr/local/cpanel/bin/spf_installer $USER);&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-7990815211952940827?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/7990815211952940827/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/12/how-to-add-domainkeys-and-spf-records.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/7990815211952940827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/7990815211952940827'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/12/how-to-add-domainkeys-and-spf-records.html' title='How To Add DomainKeys and SPF Records on CPanel Servers'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-1803400860708158385</id><published>2009-12-12T23:39:00.000-08:00</published><updated>2009-12-12T23:41:54.989-08:00</updated><title type='text'>How to Install FFmpeg in Linux</title><content type='html'>FFmpeg is a very fast video and audio converter. It can also grab from a live audio/video source. FFmpeg is so important if you are planning to run a video website with streaming with conversion of video files to different video formats. This blog is intended for Centos/Redhat versions of Linux where any novice user can install ffmpeg without compiling the source which is a more traditional way of installing the FFmpeg software on linux servers. In this blog i will show you the easy way to install ffmpeg and ffmpeg-php (php extension) with just yum rather than compiling ffmpeg from source files.&lt;br /&gt;&lt;br /&gt;Installation&lt;br /&gt;&lt;br /&gt;First you need to add a file in yum repository directory for dag packages installation. For this edit the following file:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Vi /etc/yum.repos.d/dag.repo&lt;br /&gt;&lt;br /&gt;add the following contents to the file,&lt;br /&gt;&lt;br /&gt;[dag]&lt;br /&gt;name=Dag RPM Repository for Red Hat Enterprise Linux&lt;br /&gt;baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag&lt;br /&gt;gpgcheck=0&lt;br /&gt;enabled=1&lt;br /&gt;&lt;br /&gt;Then enter the command,&lt;br /&gt;&lt;br /&gt;yum install ffmpeg ffmpeg-devel&lt;br /&gt;&lt;br /&gt;To check what audi/video formats are supported&lt;br /&gt;&lt;br /&gt;ffmpeg -formats &gt; ffmpeg-format.txt&lt;br /&gt;&lt;br /&gt;Open the ffmpeg-formats.txt to see the ooutput&lt;br /&gt;&lt;br /&gt;D means decode&lt;br /&gt;E means encode&lt;br /&gt;V means video&lt;br /&gt;A means audio&lt;br /&gt;T = Truncated&lt;br /&gt;&lt;br /&gt;Installation of FFMPEG-PHP Extension&lt;br /&gt;&lt;br /&gt;  FFmpeg-php is a very good extension and wrapper for PHP which can pull useful information about video through API interface. Inorder to install it you will need to download the source file and then compile and install extension in your server.&lt;br /&gt;For downloading the source tarball click here&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;wget http://biznetnetworks.dl.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2&lt;br /&gt;&lt;br /&gt;Extract the souce tarball.&lt;br /&gt;&lt;br /&gt;tar -xjf ffmpeg-php-0.6.0.tbz2&lt;br /&gt;&lt;br /&gt;cd ffmpeg-php-0.6.0/&lt;br /&gt;&lt;br /&gt; phpize&lt;br /&gt;&lt;br /&gt;Some time you will get an error like "Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable is set correctly and then rerun this script."&lt;br /&gt;&lt;br /&gt;YOU CAN SEE THE FIX OF THIS ERROR UNDER COMMON ERRORS.&lt;br /&gt;&lt;br /&gt;./configure&lt;br /&gt;&lt;br /&gt;make&lt;br /&gt;&lt;br /&gt;make install&lt;br /&gt;&lt;br /&gt;Editing PHP.INI&lt;br /&gt;&lt;br /&gt; Once you have done that without any problems then you will see the php extension file /usr/local/lib/php/extensions/no-debug-non-zts-20060613/ffmpeg.so and you will need mention that extension in php.ini file&lt;br /&gt;&lt;br /&gt;vi /usr/local/lib/php.ini&lt;br /&gt;&lt;br /&gt;Put the below two lines at the end of the php.ini file&lt;br /&gt;&lt;br /&gt;[ffmpeg]&lt;br /&gt;extension=ffmpeg.so&lt;br /&gt;&lt;br /&gt;Then restart the server&lt;br /&gt;&lt;br /&gt;service httpd restart&lt;br /&gt;To check whether ffmpeg enabled with php, point your browser to test.php file. It should show the confirmation of installed ffmpeg php extension&lt;br /&gt;&lt;br /&gt;// # vi test.php&lt;br /&gt;&lt;br /&gt;&lt;?&lt;br /&gt;&lt;br /&gt;phpinfo();&lt;br /&gt;&lt;br /&gt;?&gt;&lt;br /&gt;&lt;br /&gt;Picture.................................................paste here...&lt;br /&gt;&lt;br /&gt;If any case the ffmpeg does not show in the phpinfo() test make sure that php.ini path to ffmpeg.so is correct. Still the problem occures, the reason could be you might be using older version of ffmpeg-php which is buggy. just download the latest version of ffmpeg-php sourse then complile it.&lt;br /&gt;&lt;br /&gt;Common Errors&lt;br /&gt;&lt;br /&gt;1. If you get command not found error for phpize, then you will need to do yum install php-devel&lt;br /&gt;&lt;br /&gt;2.&lt;br /&gt;&lt;br /&gt;2. If you get error like "ffmpeg headers not found" while configuring the source.&lt;br /&gt;&lt;br /&gt;configure: error: ffmpeg headers not found. Make sure ffmpeg is compiled as shared libraries using the --enable-shared option&lt;br /&gt;&lt;br /&gt;then it means you have not installed ffmpeg-devel packages.&lt;br /&gt;&lt;br /&gt;To Fix: Just install ffmpeg-devel using&lt;br /&gt;&lt;br /&gt;yum install ffmpeg-devel&lt;br /&gt;&lt;br /&gt;3. If you get an error like shared libraries not found problem and the program halts in the middle, then you must specify the ffmpeg installed path explicitly to the ./configure.&lt;br /&gt;&lt;br /&gt;A) configure: error: ffmpeg shared libraries not found. Make sure ffmpeg is compiled as shared libraries using the --enable-shared option&lt;br /&gt;&lt;br /&gt;To Fix:&lt;br /&gt;&lt;br /&gt;1. First find out the ffmpeg path with ffmpeg --help command. The prefix default path should be like /usr/local/cpffmpeg&lt;br /&gt;2. Conf./configure --with-ffmpeg=/usr/local/cpffmpeg&lt;br /&gt;&lt;br /&gt;That should resolve the problem!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;B)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Installing Mplayer + Mencoder&lt;br /&gt;&lt;br /&gt;Just issue the following yum commands to install the rest of the packages.&lt;br /&gt;&lt;br /&gt;yum install mplayer mencoder&lt;br /&gt;&lt;br /&gt;Installing FlvTool2&lt;br /&gt;&lt;br /&gt;Flvtool2 is a flash video file manipulation tool. It can calculate metadata and can cut and edit cue points for flv files.&lt;br /&gt;&lt;br /&gt;yum install flvtool2&lt;br /&gt;&lt;br /&gt;Installing LAME MP3 Encoder, Libogg, LIBVORBIS&lt;br /&gt;&lt;br /&gt;LAME is a high quality MPEG Audio Layer III (MP3) encoder licensed under the LGPL. Both quality and speed improvements are still happening, probably making LAME the only MP3 encoder still being actively developed.&lt;br /&gt;&lt;br /&gt;yum install lame libogg libvorbis&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-1803400860708158385?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/1803400860708158385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/12/how-to-install-ffmpeg-in-linux.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/1803400860708158385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/1803400860708158385'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/12/how-to-install-ffmpeg-in-linux.html' title='How to Install FFmpeg in Linux'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-5966995706018213383</id><published>2009-11-01T11:24:00.000-08:00</published><updated>2009-11-01T11:25:52.104-08:00</updated><title type='text'>Unable to open pty: No such file or directory</title><content type='html'>While trying to SSH or enter into a VPS from the node, you may get the following error :&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    Unable to open pty: No such file or directory&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;or&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    root@tip~]# vzctl enter 900&lt;/div&gt;&lt;div&gt;    enter into VE 900 failed&lt;/div&gt;&lt;div&gt;    Unable to open pty: No such file or directory&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There is a temporary and permenant fix for this issue.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Temporary Fix :-&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Execute the following commands from the node&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    vzctl exec VEID /sbin/MAKEDEV pty&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    vzctl exec VEID /sbin/MAKEDEV tty&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    vzctl enter VEID&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Where VEID is the VPS id.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Permanent Fix :-&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First temporarly fix the issue and enter into the VPS.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1) vzctl enter VEID&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2) Edit the file /etc/rc.sysinit of the VPS&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    vi /etc/rc.sysini&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3) Search for the line /sbin/start_udev and comment it&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    #/sbin/start_udev&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4) Add the following two lines under /sbin/start_udev&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    #/sbin/start_udev&lt;/div&gt;&lt;div&gt;    /sbin/MAKEDEV tty&lt;/div&gt;&lt;div&gt;    /sbin/MAKEDEV pty&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Logout from your VPS (Ctrl d)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;5) Reboot the VPS and you are done!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    vzctl restart VEID&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-5966995706018213383?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/5966995706018213383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/unable-to-open-pty-no-such-file-or.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/5966995706018213383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/5966995706018213383'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/unable-to-open-pty-no-such-file-or.html' title='Unable to open pty: No such file or directory'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-7553432731589336375</id><published>2009-11-01T11:20:00.000-08:00</published><updated>2009-11-01T11:24:17.842-08:00</updated><title type='text'>scripts</title><content type='html'>ls -1A *.tar.gz | cut -d "_" -f 3 | cut -d "." -f 1 &gt; sharaf&lt;div&gt;for i in `cat sharaf` ; do /scripts/restorepkg --force $i ; done&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#cat /etc/trueuserdomains | cut -d ":" -f 2 | cut -d " " -f2&lt;/div&gt;&lt;div&gt;#cat /etc/trueuserdomains | cut -d ":" -f 2 | cut -d " " -f2 &gt; cpusers&lt;/div&gt;&lt;div&gt;(#for i in `cat cpusers` ; do /scripts/pkgacct $i ;&lt;/div&gt;&lt;div&gt;#grep -i nuzkistah /etc/userdomains&lt;/div&gt;&lt;div&gt;#&lt;/div&gt;&lt;div&gt;# for i in `cat cpusers` ; do /scripts/pkgacct $i ; scp -P 2121 /home/cpmove-$i.tar.gz IP:/home ; ssh -t -p 2121 -q IP /scripts/restorepkg $i ; done&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-7553432731589336375?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/7553432731589336375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/scripts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/7553432731589336375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/7553432731589336375'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/scripts.html' title='scripts'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-220065999841587605</id><published>2009-11-01T11:19:00.000-08:00</published><updated>2009-11-01T11:20:55.499-08:00</updated><title type='text'>awstats in DA</title><content type='html'>http://www.directadmin.com/features.php?id=894&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-220065999841587605?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/220065999841587605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/awstats-in-da.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/220065999841587605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/220065999841587605'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/awstats-in-da.html' title='awstats in DA'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-407150815517806072</id><published>2009-11-01T11:16:00.000-08:00</published><updated>2009-11-01T11:19:52.846-08:00</updated><title type='text'>Symlink ownership problem</title><content type='html'>ln -s /home/com/public_html/LiveZilla /home/com/public_html/dom.com/LiveZilla&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;cd /home/com/public_html/LiveZilla/&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;chown -h getcom.getcom LiveZilla&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-407150815517806072?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/407150815517806072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/symlink-ownership-problem.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/407150815517806072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/407150815517806072'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/symlink-ownership-problem.html' title='Symlink ownership problem'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-75057725829698063</id><published>2009-11-01T11:15:00.002-08:00</published><updated>2009-11-01T11:16:51.447-08:00</updated><title type='text'>vnc</title><content type='html'>VNCSERVERS="3:root 2:user"&lt;div&gt;VNCSERVERARGS[3]="-geometry 1024x768 -depth 16"&lt;/div&gt;&lt;div&gt;VNCSERVERARGS[2]="-geometry 1024x768 -depth 16"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#!/bin/sh&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Uncomment the following two lines for normal desktop:&lt;/div&gt;&lt;div&gt; unset SESSION_MANAGER&lt;/div&gt;&lt;div&gt; startkde &amp;amp;&lt;/div&gt;&lt;div&gt;#gnome-session&amp;amp;&lt;/div&gt;&lt;div&gt;#startx &amp;amp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;http://codeghar.wordpress.com/2007/11/28/centos-5-post-install-customization/&lt;/div&gt;&lt;div&gt;# yum groupinstall "X Window System" "GNOME Desktop Environment"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-75057725829698063?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/75057725829698063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/vnc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/75057725829698063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/75057725829698063'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/vnc.html' title='vnc'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-2205131113973658080</id><published>2009-11-01T11:15:00.001-08:00</published><updated>2009-11-01T11:15:48.700-08:00</updated><title type='text'>time</title><content type='html'>rdate -s rdate.cpanel.ne&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-2205131113973658080?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/2205131113973658080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/time.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/2205131113973658080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/2205131113973658080'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/time.html' title='time'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-1867229285292481229</id><published>2009-11-01T11:07:00.002-08:00</published><updated>2009-11-01T11:15:08.666-08:00</updated><title type='text'>php.ini</title><content type='html'>php.ini&lt;div&gt;=========&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;max_execution_time = 60&lt;/div&gt;&lt;div&gt;max_input_time = 60&lt;/div&gt;&lt;div&gt;memory_limit = 16M&lt;/div&gt;&lt;div&gt;post_max_size = 16M&lt;/div&gt;&lt;div&gt;upload_max_filesize = 16M&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;.htaccess&lt;/div&gt;&lt;div&gt;=============&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;php_value upload_max_filesize 20M&lt;/div&gt;&lt;div&gt;php_value post_max_size 20M&lt;/div&gt;&lt;div&gt;php_value max_execution_time 200&lt;/div&gt;&lt;div&gt;php_value max_input_time 200&lt;/div&gt;&lt;div&gt;info.php&lt;/div&gt;&lt;div&gt;=========&lt;/div&gt;&lt;div&gt;&lt;?php phpinfo() ?&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-1867229285292481229?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/1867229285292481229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/phpini.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/1867229285292481229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/1867229285292481229'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/phpini.html' title='php.ini'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-3273064154781085962</id><published>2009-11-01T11:07:00.001-08:00</published><updated>2009-11-01T11:07:33.782-08:00</updated><title type='text'>SCRIPT Install FFmpeg + FFmpeg-PHP + Mplayer + Mencoder + flv2tool + LAME MP3</title><content type='html'>mkdir ~/ffmpeg-packages&lt;div&gt;cd ~/ffmpeg-packages&lt;/div&gt;&lt;div&gt;wget http://trulymanaged.com/ffmpeg/ffmpeginstall.tar.gz&lt;/div&gt;&lt;div&gt;tar -xvzf ffmpeginstall.tar.gz&lt;/div&gt;&lt;div&gt;cd ffmpeginstall&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-3273064154781085962?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/3273064154781085962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/script-install-ffmpeg-ffmpeg-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/3273064154781085962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/3273064154781085962'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/script-install-ffmpeg-ffmpeg-php.html' title='SCRIPT Install FFmpeg + FFmpeg-PHP + Mplayer + Mencoder + flv2tool + LAME MP3'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-1763223605684085933</id><published>2009-11-01T11:05:00.000-08:00</published><updated>2009-11-01T11:06:58.852-08:00</updated><title type='text'>Change time zone</title><content type='html'>cd /usr/share/zoneinfo &lt;div&gt;cp GMT /etc/localtime&lt;/div&gt;&lt;div&gt;try to change it for example to UCT&lt;/div&gt;&lt;div&gt;try like cp UCT /etc/localtime&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-1763223605684085933?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/1763223605684085933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/change-time-zone.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/1763223605684085933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/1763223605684085933'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/change-time-zone.html' title='Change time zone'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-4726073894235750070</id><published>2009-11-01T11:02:00.000-08:00</published><updated>2009-11-01T11:04:38.294-08:00</updated><title type='text'>How to disable gzip output for lightspeed</title><content type='html'>php_flag zlib.output_compression Off&lt;div&gt;RewriteEngine On&lt;/div&gt;&lt;div&gt;RewriteRule . - [E=no-gzip:1]&lt;/div&gt;&lt;div&gt;RewriteRule ^(.*)$ $1 [E=no-gzip:1]&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-4726073894235750070?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/4726073894235750070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/how-to-disable-gzip-output-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/4726073894235750070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/4726073894235750070'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/how-to-disable-gzip-output-for.html' title='How to disable gzip output for lightspeed'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-545269249854820803</id><published>2009-11-01T10:58:00.000-08:00</published><updated>2009-11-01T11:02:11.281-08:00</updated><title type='text'>Native SSL support failed to pass the startup test</title><content type='html'>Native SSL support failed to pass the startup test. stunnel was started instead.&lt;div&gt;The exact error was: [linktest=/usr/local/cpanel/bin/linktest-ssl: error while loading shared libraries: /usr/local/cpanel/perl/Net/SSLeay/SSLeay.so: cannot open shared object file: No such file or directory&lt;/div&gt;&lt;div&gt;] [binary=/usr/local/cpanel/cpsrvd-ssl] [cpsrvd=/usr/local/cpanel/cpsrvd-ssl: error while loading shared libraries: /usr/local/cpanel/perl/Net/SSLeay/SSLeay.so: cannot open shared object file: No such file or directory&lt;/div&gt;&lt;div&gt;]&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;blockquote&gt;/usr/local/cpanel/bin/nativessl-install&lt;/blockquote&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-545269249854820803?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/545269249854820803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/native-ssl-support-failed-to-pass.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/545269249854820803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/545269249854820803'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/native-ssl-support-failed-to-pass.html' title='Native SSL support failed to pass the startup test'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-8069572235633945513</id><published>2009-11-01T10:56:00.002-08:00</published><updated>2009-11-01T10:58:04.973-08:00</updated><title type='text'>rvsite builder issue</title><content type='html'>Cannot detect your system information, you have to install ionCube loader manually. Please contact your provider.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;FIRST, login SSH and run&lt;/div&gt;&lt;div&gt;perl /var/cpanel/rvglobalsoft/rvsitebuilder/panelmenus/cpanel/scripts/autofixphpini.pl&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then restart cPanel service:&lt;/div&gt;&lt;div&gt;/usr/local/cpanel/startup&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now the autofixphpini.pl has fixed the post_max_size and upload_max_filesize, BUT it has messed up your ioncube loader setting, so you need to fix that next. To do this, in SSH type or paste:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;pico /usr/local/cpanel/3rdparty/etc/php.ini&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then do CTRL-W to find zend_extension&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Add following line at the end of the zend section, before the line where it says Windows extension:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;zend_extension="/usr/local/cpanel/3rdparty/fantastico/loaders/ioncube_loader_lin_5.2.so"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;CTRL-x to exit, then Y, and Enter to save the file.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then restart cPanel service again:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/usr/local/cpanel/startup&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;REF : http://forums.rvskin.com/index.php?showtopic=2920&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-8069572235633945513?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/8069572235633945513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/rvsite-builder-issue.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/8069572235633945513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/8069572235633945513'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/rvsite-builder-issue.html' title='rvsite builder issue'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-9080172058313664852</id><published>2009-11-01T10:56:00.001-08:00</published><updated>2009-11-01T10:56:40.347-08:00</updated><title type='text'>configure logrotate on cPanel (daily rotation and 7 days retention).</title><content type='html'>vi /etc/logrotate.d/httpd&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/usr/local/apache/logs/*.log {&lt;/div&gt;&lt;div&gt;    daily&lt;/div&gt;&lt;div&gt;    rotate 7&lt;/div&gt;&lt;div&gt;    compress&lt;/div&gt;&lt;div&gt;    missingok&lt;/div&gt;&lt;div&gt;    notifempty&lt;/div&gt;&lt;div&gt;    sharedscripts&lt;/div&gt;&lt;div&gt;    postrotate&lt;/div&gt;&lt;div&gt;        /sbin/service httpd reload &gt; /dev/null 2&gt;/dev/null || true&lt;/div&gt;&lt;div&gt;    endscript&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-9080172058313664852?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/9080172058313664852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/configure-logrotate-on-cpanel-daily.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/9080172058313664852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/9080172058313664852'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/configure-logrotate-on-cpanel-daily.html' title='configure logrotate on cPanel (daily rotation and 7 days retention).'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-106095664131182132</id><published>2009-11-01T10:49:00.002-08:00</published><updated>2009-11-01T10:56:25.153-08:00</updated><title type='text'>backup list</title><content type='html'>ls backup-11.1.2009_0* | cut -d "_" -f 3 | cut -d "." -f 1 &gt; newlist&lt;div&gt;for i in `cat newlist` ; do /scripts/restorepkg $i ; done&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Imagemagic&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/scripts/checkimagemagick&lt;/div&gt;&lt;div&gt;ok&lt;/div&gt;&lt;div&gt;root@cpane [/usr/src]# /scripts/installimagemagick&lt;/div&gt;&lt;div&gt;==================&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Disable IDENT for exim.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;post_max_size = 100M&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;upload_max_filesize = 100M&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-106095664131182132?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/106095664131182132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/backup-list.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/106095664131182132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/106095664131182132'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/backup-list.html' title='backup list'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-3587020779925766503</id><published>2009-11-01T10:49:00.001-08:00</published><updated>2009-11-01T10:49:43.388-08:00</updated><title type='text'>Fantastico installation</title><content type='html'>1. cd /usr/local/cpanel/whostmgr/docroot/cgi&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. wget -N http://files.betaservant.com/files/free/fantastico_whm_admin.tgz&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. tar -xzpf fantastico_whm_admin.tgz&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4. rm -rf fantastico_whm_admin.tgz&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;5. login to WHM as root and&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;6. Under Tweak Settings -&gt; PHP - enable ioncube&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;7. Under Plugins - You will find Fantastico De Luxe WHM Admin&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;8. Click install&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-3587020779925766503?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/3587020779925766503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/fantastico-installation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/3587020779925766503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/3587020779925766503'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/fantastico-installation.html' title='Fantastico installation'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-786490731185778296</id><published>2009-11-01T10:46:00.000-08:00</published><updated>2009-11-01T10:49:17.428-08:00</updated><title type='text'>To find a listening port</title><content type='html'>To find a listening port&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;netstat -tlpn | grep &lt;service&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;eg:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;netstat -tlpn | grep ssh&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;netstat -tlpn | grep telnet&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-786490731185778296?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/786490731185778296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/to-find-listening-port.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/786490731185778296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/786490731185778296'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/to-find-listening-port.html' title='To find a listening port'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-3239014213826927880</id><published>2009-11-01T10:45:00.001-08:00</published><updated>2009-11-01T10:45:57.986-08:00</updated><title type='text'>Creating MySQL Dump</title><content type='html'>cd /var/lib/mysql&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ls -l | grep &lt;user&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;mysqldump |db| &gt; |db|.sql&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;mysqladmin create |newdb|&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;mysql |newdb| &lt; |db|.sql&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;*-------------------------------------------------------------------------------------------------------------------------------------------------*&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Get MySQL version&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;mysql -i;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;or&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;login to mysql and run the following command this returns the servers&lt;/div&gt;&lt;div&gt;version.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;mysql&gt; select version();&lt;/div&gt;&lt;div&gt;+-----------+&lt;/div&gt;&lt;div&gt;| version() |&lt;/div&gt;&lt;div&gt;+-----------+&lt;/div&gt;&lt;div&gt;| 3.23.58 |&lt;/div&gt;&lt;div&gt;+-----------+&lt;/div&gt;&lt;div&gt;1 row in set (0.02 sec)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;*-------------------------------------------------------------------------------------------------------------------------------------------------*&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;MySQL Error Log&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/var/lib/mysql/server.hostname.err&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;*-------------------------------------------------------------------------------------------------------------------------------------------------*&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-3239014213826927880?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/3239014213826927880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/creating-mysql-dump.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/3239014213826927880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/3239014213826927880'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/11/creating-mysql-dump.html' title='Creating MySQL Dump'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-1953937709134121880</id><published>2009-05-01T14:54:00.000-07:00</published><updated>2009-05-01T15:02:10.427-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firewall'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><category scheme='http://www.blogger.com/atom/ns#' term='How to'/><title type='text'>How to Remove APF firewall</title><content type='html'>First stop the apf&lt;br /&gt;&lt;br /&gt;/etc/init.d/apf stop&lt;br /&gt;&lt;br /&gt;Then, flush ip tables and remove all existing apf files even in cron job&lt;br /&gt;&lt;br /&gt;iptables -F&lt;br /&gt;rm -rf /etc/apf&lt;br /&gt;rm -rf /usr/local/sbin/apf&lt;br /&gt;rm -rf /etc/rc.d/init.d/apf&lt;br /&gt;rm -rf /var/log/apf_log&lt;br /&gt;rm -rf /var/log/apfados_log&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/sbin/chkconfig --level 345 apf off&lt;br /&gt;&lt;br /&gt;Now remove this cron job&lt;br /&gt;&lt;br /&gt;vi /etc/cron.daily/fw&lt;br /&gt;&lt;br /&gt;Find and Remove this line:&lt;br /&gt;/etc/rc.d/init.d/apf restart &gt;&gt; /dev/null 2&gt;&amp;amp;1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-1953937709134121880?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/1953937709134121880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/05/how-to-remove-apf-firewall.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/1953937709134121880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/1953937709134121880'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/05/how-to-remove-apf-firewall.html' title='How to Remove APF firewall'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-7127594465551725261</id><published>2009-05-01T14:31:00.000-07:00</published><updated>2009-05-01T14:57:53.577-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firewall'/><category scheme='http://www.blogger.com/atom/ns#' term='howto setup'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><category scheme='http://www.blogger.com/atom/ns#' term='How to'/><title type='text'>How to Install APF (Advanced Policy Firewall)</title><content type='html'>APF is a policy based iptables firewall system designed for ease of use and configuration.When it comes to security, there is no such thing without firewall. when you buy a new dedicated or vps server, atleast make sure you install a firewall to protect your server from various intrusion attacks. Within minutes you can set up your firewall up and running. APF firewall is one of the popular and easy to setup IP tables based firewall for Linux servers. It also has additional features like prevention from DoS attacks.APF is developed and maintained by R-fx Networks: http://www.rfxnetworks.com/apf.php&lt;br /&gt;Be careful on setting up the firewall on what ports to open and what not. If youarent sure, you may lock yourself out.&lt;br /&gt;&lt;p&gt;&lt;span style="font-weight:bold;"&gt;Installation &lt;/span&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;1)Login as root user&lt;p&gt;&lt;br /&gt;2)Download the APF Source&lt;br /&gt;&lt;/p&gt;&lt;p&gt;For downloading apf source code click &lt;a href="http://www.r-fx.ca/downloads/apf-current.tar.gz"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;p&gt;or in command prompt type the following command,&lt;/p&gt;&lt;p&gt;&lt;em&gt;wget http://www.r-fx.ca/downloads/apf-current.tar.gz&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;3)&lt;/em&gt;Extract the tar.gz&lt;/p&gt;&lt;p&gt;&lt;em&gt;tar -xvf apf-current.tar.gz&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;4)Enter the APF directory&lt;br /&gt;&lt;/em&gt;&lt;em&gt;&lt;br /&gt;cd apf-current/&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;5)Run install code&lt;br /&gt;&lt;/em&gt;&lt;em&gt;&lt;br /&gt;./install.sh&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;After installation, you have to manually configure your firewall settings on what ports to open and what to block. You can edit the configuration file located in /etc/apf/conf.apf&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Installed paths:&lt;/strong&gt;&lt;em&gt;&lt;br /&gt;&lt;br /&gt;Configuration File: /etc/apf/conf.apf&lt;br /&gt;Binary: /usr/local/sbin/apf&lt;br /&gt;Start/Stop: /etc/init/d/apf (start|stop|restart)&lt;br /&gt;Log: /var/log/apf_log&lt;br /&gt;Antidos conf file: /etc/apf/ad/config.antidos&lt;br /&gt;&lt;br /&gt;You can also use commands in the command line&lt;br /&gt;&lt;br /&gt;apf -s (start)&lt;br /&gt;apf -r (to restart)&lt;br /&gt;apf -f (to stop)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6)Modify the APF config File&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;vim /etc/apf/conf.apf&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;First look for the line that says&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Leaving this option as “1″ will disable your firewall after 5 minutes, so make  sure to change it to “0″.&lt;br /&gt;So replace 1 eith 0 and it look like this:-&lt;br /&gt;DEVEL_MODE=”0″&lt;br /&gt;&lt;br /&gt;Next, take a look at the allowed inbound ports. You should see something like&lt;br /&gt;&lt;br /&gt;IG_TCP_CPORTS=”22,80,443″&lt;br /&gt;&lt;br /&gt;Notice that port 22, the default SSH port is open. We want to change this to the port we gave SSH earlier. You can leave port 80 (HTTP) and 443 (HTTPS) open if you plan on running a website.&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;If you want to open any port, you have to give an entry in to the above place.&lt;br /&gt;&lt;br /&gt;By default, APF will not filter outbound traffic but if would like to change that look for the following line&lt;br /&gt;&lt;br /&gt;EGF=”0″&lt;br /&gt;&lt;br /&gt;And change this value to “1″. On the line directly below it you should see the allowed outbound ports&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;EG_TCP_CPORTS=”21,25,80,443″&lt;br /&gt;&lt;/em&gt;&lt;em&gt;&lt;br /&gt;Change these if you have enabled outbound filtering and save the firewall config. Now we should add the firewall to start when we reboot our VPS and enable it&lt;br /&gt;&lt;br /&gt;chkconfig --add apf&lt;br /&gt;chkconfig --level 345 apf on&lt;br /&gt;/etc/init.d/apf start&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;APF Firewall for VPS Servers&lt;/strong&gt;:&lt;br /&gt;&lt;br /&gt;If you are running apf firewall in VPS, there is a possibility that you will get "eth0: Device not found". Instead you have to make settings in the configuration file.&lt;br /&gt;&lt;br /&gt;Find the following lines and change the values like below.&lt;br /&gt;&lt;br /&gt;IFACE_IN = "venet0"&lt;br /&gt;IFACE_OUT = "venet0"&lt;br /&gt;DEVEL_MODE="1"&lt;br /&gt;SET_MONOKERN="1"&lt;br /&gt;&lt;br /&gt;&lt;port&gt;&lt;br /&gt;&lt;br /&gt;SET_MONOKERN="1"&lt;br /&gt;(The above line is important to have "1" if you are in VPS server as otherwise you will get unable to load ip tables module")&lt;br /&gt;&lt;/em&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-7127594465551725261?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/7127594465551725261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/05/how-to-install-apf-advanced-policy.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/7127594465551725261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/7127594465551725261'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/05/how-to-install-apf-advanced-policy.html' title='How to Install APF (Advanced Policy Firewall)'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-834091096351241668</id><published>2009-04-29T12:57:00.000-07:00</published><updated>2009-04-29T13:30:02.174-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='howto setup'/><category scheme='http://www.blogger.com/atom/ns#' term='How to'/><title type='text'>How to Install FFmpeg in Linux</title><content type='html'>                    FFmpeg is a very fast video and audio converter. It can also grab from a live audio/video source. FFmpeg is so important if you are planning to run a video website with streaming with conversion of video files to different video formats. This blog is intended for Centos/Redhat versions of Linux where any novice user can install ffmpeg without compiling the source which is a more traditional way of installing the FFmpeg software on linux servers. In this blog i will show you the easy way to install ffmpeg and ffmpeg-php (php extension) with just yum rather than compiling ffmpeg from source files.&lt;p&gt;&lt;strong&gt;Installation&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;First you need to add a file in yum repository directory for dag packages installation. For this edit the following file: &lt;/p&gt;&lt;p&gt;&lt;br /&gt;Vi /etc/yum.repos.d/dag.repo &lt;br /&gt;&lt;/p&gt;&lt;p&gt;add the following contents to the file, &lt;br /&gt;&lt;br /&gt;[dag] &lt;br /&gt;name=Dag RPM Repository for Red Hat Enterprise Linux &lt;br /&gt;baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag &lt;br /&gt;gpgcheck=0 &lt;br /&gt;enabled=1 &lt;br /&gt;&lt;br /&gt;Then enter the command, &lt;br /&gt;&lt;br /&gt;yum install ffmpeg ffmpeg-devel &lt;br /&gt;&lt;br /&gt;To check what audi/video formats are supported &lt;br /&gt;&lt;br /&gt;ffmpeg -formats &gt; ffmpeg-format.txt &lt;br /&gt;&lt;br /&gt;Open the ffmpeg-formats.txt to see the ooutput &lt;br /&gt;&lt;br /&gt;D means decode &lt;br /&gt;E means encode &lt;br /&gt;V means video &lt;br /&gt;A means audio &lt;br /&gt;T = Truncated&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Installation of FFMPEG-PHP Extension&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;  &lt;/strong&gt;FFmpeg-php is a very good extension and wrapper for PHP which can pull useful information about video through API interface. Inorder to install it you will need to download the source file and then compile and install extension in your server. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;For downloading  the source tarball  click &lt;a href="http://sourceforge.net/project/downloading.php?group_id=122353&amp;filename=ffmpeg-php-0.6.0.tbz2&amp;a=55737530"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;or &lt;/p&gt;&lt;p&gt;wget http://sourceforge.net/project/downloading.php?group_id=122353&amp;filename=ffmpeg-php-0.6.0.tbz2&amp;a=55737530 &lt;br /&gt;&lt;/p&gt;&lt;p&gt;Extract the souce tarball.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;tar -xjf ffmpeg-php-0.6.0.tbz2 &lt;br /&gt;&lt;/p&gt;&lt;p&gt;cd ffmpeg-php-0.6.0/&lt;br /&gt;&lt;/p&gt;&lt;p&gt; phpize &lt;br /&gt;&lt;br /&gt;./configure &lt;br /&gt;&lt;/p&gt;&lt;p&gt;make &lt;br /&gt;&lt;/p&gt;&lt;p&gt;make install&lt;strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Editing PHP.INI&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt; &lt;/strong&gt;Once you have done that without any problems then you will see the php extension file /usr/local/lib/php/extensions/no-debug-non-zts-20060613/ffmpeg.so and you will need mention that extension in php.ini file &lt;br /&gt;&lt;br /&gt;vi /usr/local/lib/php.ini &lt;br /&gt;&lt;br /&gt;Put the below two lines at the end of the php.ini file &lt;br /&gt;&lt;br /&gt;[ffmpeg] &lt;br /&gt;extension=ffmpeg.so &lt;br /&gt;&lt;br /&gt;Then restart the server&lt;br /&gt; &lt;br /&gt;service httpd restart &lt;br /&gt;&lt;/p&gt;&lt;p&gt;To check whether ffmpeg enabled with php, point your browser to test.php file. It should show the confirmation of installed ffmpeg php extension &lt;br /&gt;&lt;br /&gt;// #test.php&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;phpinfo();&lt;/p&gt;&lt;p&gt;?&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;              &lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 156px;" src="http://1.bp.blogspot.com/_JGBvwR9Yjgk/Sfi0I9HH2bI/AAAAAAAAAA8/gaJl3Q6gmC8/s400/ffmpeg-php.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5330208224929372594" /&gt;&lt;/p&gt;&lt;p&gt;If any case the ffmpeg does not show in the phpinfo() test make sure that php.ini path to ffmpeg.so is correct. Still the problem occures, the reason could be you might be using older version of ffmpeg-php which is buggy. just download the latest version of ffmpeg-php sourse then  complile it.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Common Errors&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;1. If you get command not found error for phpize, then you will need to do yum install php-devel&lt;br /&gt;&lt;br /&gt;2. If you get error like "ffmpeg headers not found" while configuring the source.&lt;br /&gt;&lt;br /&gt;configure: error: ffmpeg headers not found. Make sure ffmpeg is compiled as shared libraries using the --enable-shared option&lt;br /&gt;&lt;br /&gt;then it means you have not installed ffmpeg-devel packages.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;To Fix:&lt;/strong&gt; Just install ffmpeg-devel using&lt;br /&gt;&lt;br /&gt;yum install ffmpeg-devel&lt;br /&gt;&lt;br /&gt;3. If you get an error like shared libraries not found problem and the program halts in the middle, then you must specify the ffmpeg installed path explicitly to the ./configure.&lt;br /&gt;&lt;br /&gt;configure: error: ffmpeg shared libraries not found. Make sure ffmpeg is compiled as shared libraries using the --enable-shared option&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;To Fix:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1. First find out the ffmpeg path with ffmpeg --help command. The prefix default path should be like /usr/local/cpffmpeg&lt;br /&gt;2. Configure the FFmpeg-php with --with-ffmpeg option&lt;br /&gt;&lt;br /&gt;./configure --with-ffmpeg=/usr/local/cpffmpeg&lt;br /&gt;&lt;br /&gt;That should resolve the problem!&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-834091096351241668?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/834091096351241668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/04/how-to-install-ffmpeg-in-linux_29.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/834091096351241668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/834091096351241668'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/04/how-to-install-ffmpeg-in-linux_29.html' title='How to Install FFmpeg in Linux'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JGBvwR9Yjgk/Sfi0I9HH2bI/AAAAAAAAAA8/gaJl3Q6gmC8/s72-c/ffmpeg-php.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-4094293041207973201</id><published>2009-04-26T00:27:00.000-07:00</published><updated>2009-04-26T00:45:10.513-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='troubleshooting'/><title type='text'>Troubleshooting Nagios</title><content type='html'>There may be a number of potential problems while configuring Nagios. If you see an error like this,&lt;br /&gt;&lt;br /&gt;1)&lt;span style="font-weight: bold;"&gt;Connection refused by host&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;You get the above error, If you don't put the correct IP address in the nrpe.cfg file on the client, or if you do it correctly but forgot to restart NRPE on the client.&lt;br /&gt;&lt;br /&gt;2) &lt;span style="font-weight: bold;"&gt;NRPE: Command 'check_users' not defined&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Indicates that you didn't define the commands you wanted, again on the client, or you didn't restart NRPE on the client after you defined them.&lt;br /&gt;&lt;br /&gt;3)&lt;span style="font-weight: bold;"&gt;NRPE: Unable to read output&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Usually means that the path to the plugin to run is incorrect on the client. If you change it, remember to restart NRPE again.&lt;br /&gt;&lt;br /&gt;4)&lt;span style="font-weight: bold;"&gt;The check_nrpe plugin returns "CHECK_NRPE: Socket timeout after 10 seconds" or"Connection refused or timed out"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This error can indicate several things:&lt;br /&gt;&lt;br /&gt;The command that the NRPE daemon was asked to run took longer than 10 seconds to execute. This is the most likely cause if the error message was "CHECK_NRPE: Socket timeout after 10 seconds". Use the -t command line option to specify a longer timeout for the check_nrpe plugin. The following example will increase the timeout to 30 seconds:&lt;br /&gt;&lt;br /&gt;            /usr/local/nagios/check_nrpe -H localhost -c somecommand -t 30&lt;br /&gt;&lt;br /&gt;The NRPE daemon is not installed or running on the remote host. Verify that the NRPE daemon is running as standalone daemon or under inetd/xinetd with one of the following commands:&lt;br /&gt;&lt;br /&gt;            ps axuw | grep nrpe&lt;br /&gt;            netstat -at | grep nrpe&lt;br /&gt;&lt;br /&gt;   There is a firewall that is blocking the communication between the monitoring host (which runs the check_nrpe plugin) and the remote host (which runs the NRPE daemon). Verify that the firewall rules (e.g. iptables) that are running on the remote host allow for communication and make sure there isn't a physical firewall that is located between the monitoring host and the remote host.&lt;br /&gt;&lt;br /&gt;5)&lt;span style="font-weight: bold;"&gt;The check_nrpe plugin returns "CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for an error message."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;First thing you should do is check the remote server logs for an error message. Seriously. :-) This error could be due to the following problem:&lt;br /&gt;&lt;br /&gt;   The check_nrpe plugin was unable to complete an SSL handshake with the NRPE daemon. An error message in the logs should indicate whether or not this was the case. Check the versions of OpenSSL that are installed on the monitoring host and remote host. If you're running a commercial version of SSL on the remote host, there might be some compatibility problems.&lt;br /&gt;&lt;br /&gt;6)&lt;span style="font-weight: bold;"&gt;The check_nrpe plugin returns "NRPE: Command 'x' not defined"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This error means that you didn't define command x in the NRPE configuration fileon the remote host. On the remote host, add the command definition for x. See the existing command definitions in the NRPE configuration file for more information on doing this. If you're running the NRPE daemon as a standalone daemon (and not under inetd or xinetd), you'll need to restart it in order for the new command to be recognized.&lt;br /&gt;&lt;br /&gt;7)&lt;span style="font-weight: bold;"&gt;The check_nrpe plugin returns "NRPE: Command timed out after x seconds"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This error indicates that the command that was run by the NRPE daemon did not finish executing within the specified time. You can increase the timeout for commands by editing the NRPE configuration file and changing the value of the command_timeout variable. If you're running the NRPE daemon as a standalone daemon (and not under inetd or xinetd), you'll need to restart it in order for the new timeout to be recognized.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-4094293041207973201?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/4094293041207973201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/04/troubleshooting-nagios.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/4094293041207973201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/4094293041207973201'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/04/troubleshooting-nagios.html' title='Troubleshooting Nagios'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-4658992806675540671</id><published>2009-04-25T22:40:00.000-07:00</published><updated>2009-04-25T22:45:53.368-07:00</updated><title type='text'>Adding more services to the Nagios</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Monitoring Host Configuration:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Define the remote host name  in client.cfg&lt;br /&gt;Edit /usr/local/nagios/etc/objects/remotehost.cfg and append the following lines:&lt;br /&gt;&lt;br /&gt;define host{&lt;br /&gt;        use                     linux-box&lt;br /&gt;        host_name               remote_host&lt;br /&gt;        address                 ipaddress of remote_host&lt;br /&gt;        check_command           check-host-alive&lt;br /&gt;        contacts                nagios admin,cliectcontact&lt;br /&gt;        }&lt;br /&gt;Next define contact name and contact goup name inn same file&lt;br /&gt;&lt;br /&gt;define contact{&lt;br /&gt;        contact_name            clientcontact&lt;br /&gt;        host_name               remote_host&lt;br /&gt;        use                     generic-contact&lt;br /&gt;        alias                   Nagios client&lt;br /&gt;        email                   remotehost@gmail.com&lt;br /&gt;        }&lt;br /&gt;define contactgroup{&lt;br /&gt;        contactgroup_name       groupname&lt;br /&gt;        host_name               remote_host&lt;br /&gt;        alias                   Nagios group&lt;br /&gt;        members                 clientcontact,membersof remote_host&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;Next add more services to monitor remote host,for this:&lt;br /&gt;&lt;br /&gt;define service{&lt;br /&gt;        use                     generic-service&lt;br /&gt;        host_name               remote_host&lt;br /&gt;        service_description     CPU Load&lt;br /&gt;        check_command           check_nrpe!check_load&lt;br /&gt;        }&lt;br /&gt;define service{&lt;br /&gt;        use                     generic-service&lt;br /&gt;        host_name               remote_host&lt;br /&gt;        service_description     HyperVM&lt;br /&gt;        check_command           check_nrpe!check_http&lt;br /&gt;        }&lt;br /&gt;define service{&lt;br /&gt;        use                     generic-service&lt;br /&gt;        host_name               remote_host&lt;br /&gt;        service_description     Procs&lt;br /&gt;        check_command           check_nrpe!check_procs&lt;br /&gt;        }&lt;br /&gt;define service{&lt;br /&gt;        use                     generic-service&lt;br /&gt;        host_name               remote_host&lt;br /&gt;        service_description     Zombie Processes&lt;br /&gt;        check_command           check_nrpe!check_zombie_procs&lt;br /&gt;        }&lt;br /&gt;define service{&lt;br /&gt;        use                     generic-service&lt;br /&gt;        host_name               remote_host&lt;br /&gt;        service_description     / Partition&lt;br /&gt;        check_command           check_nrpe!check_disk1&lt;br /&gt;        }&lt;br /&gt;define service{&lt;br /&gt;        use                     generic-service&lt;br /&gt;        host_name               remote_host&lt;br /&gt;        service_description     /storage partition&lt;br /&gt;        check_command           check_nrpe!check_disk2&lt;br /&gt;        }&lt;br /&gt;define service{&lt;br /&gt;        use                     generic-service&lt;br /&gt;        host_name               remote_host&lt;br /&gt;        service_description     Current Users&lt;br /&gt;        check_command           check_nrpe!check_users&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;define service{&lt;br /&gt;        use             generic-service&lt;br /&gt;        host_name       remote_host_name&lt;br /&gt;        service_description controlpanel check&lt;br /&gt;        check_command check_tcp!-H $HOSTADDRESS$ -p 2082&lt;br /&gt;        }&lt;br /&gt;define service{&lt;br /&gt;        use                     generic-service&lt;br /&gt;        host_name               remote_host&lt;br /&gt;        service_description     ssl&lt;br /&gt;        check_command           check_nrpe!check_ssl&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;Restart nagios daemon&lt;br /&gt;&lt;br /&gt;/etc/init.d/nagios restart&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Remote Host Configuration:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Edit the nrpe configuration file and add the folowing lines:&lt;br /&gt;&lt;br /&gt;vi /etc/nrpe.conf&lt;br /&gt;&lt;br /&gt;command[check_pop]=/usr/local/nagios/libexec/check_pop -p 110 -4 -w 10 -c 20&lt;br /&gt;command[check_imap]=/usr/local/nagios/libexec/check_imap -p 143 -4 -w 10 -c 20&lt;br /&gt;command[check_smtp]=/usr/local/nagios/libexec/check_smtp -p 25 -4 -w 10 -c 20&lt;br /&gt;command[check_http]=/usr/local/nagios/libexec/check_http -H 127.0.0.1 -w 5 -c 10&lt;br /&gt;command[check_mysql]=/usr/local/nagios/libexec/check_tcp -p 3306 -w 10 -c 20&lt;br /&gt;command[check_dns]=/usr/local/nagios/libexec/check_dns -H www.eglueweb.com&lt;br /&gt;command[check_ftp]=/usr/local/nagios/libexec/check_ftp -w 10 -c 20&lt;br /&gt;command[check_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200&lt;br /&gt;command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200&lt;br /&gt;command[check_ping]=/usr/local/nagios/libexec/check_ping -H $ARG1$ -w $ARG2$ -c $ARG3$ -p 5&lt;br /&gt;command[check_ssl]=/usr/local/nagios/libexec/check_tcp -H 67.228.194.218 -p 443&lt;br /&gt;command[check_mailq]=/usr/local/nagios/libexec/check_exim -w 10 -c -20&lt;br /&gt;&lt;br /&gt;restart the nrpe damon&lt;br /&gt;&lt;br /&gt;/etc/init.d/nrpe restart&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-4658992806675540671?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/4658992806675540671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/04/adding-more-services-to-nagios.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/4658992806675540671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/4658992806675540671'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/04/adding-more-services-to-nagios.html' title='Adding more services to the Nagios'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-3277604423834886473</id><published>2009-04-24T19:11:00.000-07:00</published><updated>2009-04-25T21:17:46.501-07:00</updated><title type='text'>How to install and configure NRPE in Nagios</title><content type='html'>The NRPE addon is designed to allow you to execute Nagios plugins on remote Linux/Unix machines. The main reason for doing this is to allow Nagios to monitor "local" resources (like CPU load, memory usage, etc.) on remote machines. Since these public resources are not usually exposed to external machines, an agent like NRPE must be installed on the remote Linux/Unix machines.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JGBvwR9Yjgk/SfJx6j9fyDI/AAAAAAAAAAU/EXbhlVLnOOQ/s1600-h/nrpe.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 94px;" src="http://2.bp.blogspot.com/_JGBvwR9Yjgk/SfJx6j9fyDI/AAAAAAAAAAU/EXbhlVLnOOQ/s320/nrpe.png" alt="" id="BLOGGER_PHOTO_ID_5328446560032245810" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The NRPE addon consists of two pieces:&lt;br /&gt;The check_nrpe plugin, which resides on the local monitoring machine&lt;br /&gt;The NRPE daemon, which runs on the remote Linux/Unix machine&lt;br /&gt;&lt;br /&gt;INSTALLATION:&lt;br /&gt;Remote Host Setup:&lt;br /&gt;Create a new nagios user account and give it a password.&lt;br /&gt;/usr/sbin/useradd nagios&lt;br /&gt;passwd nagios&lt;br /&gt;Download nrpe and nagios-plugin.&lt;br /&gt;&lt;br /&gt;wget http://osdn.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.11.tar.gz&lt;br /&gt;&lt;br /&gt;tar xvzf nagios-plugins-1.4.11.tar.gz&lt;br /&gt;&lt;br /&gt;cd nagios-plugins-1.4.11/&lt;br /&gt;&lt;br /&gt;Compile and install the plugins.&lt;br /&gt;./configure --prefix=/usr/local/nagios&lt;br /&gt;make&lt;br /&gt;make install&lt;br /&gt;&lt;br /&gt;The permissions on the plugin directory and the plugins will need to be fixed at this point, so run the following commands.&lt;br /&gt;chown nagios.nagios /usr/local/nagios&lt;br /&gt;chown -R nagios.nagios /usr/local/nagios/libexec&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Install the NRPE daemon&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Download the source code tarball of the NRPE addon (visit http://www.nagios.org/download/ for links to the latest versions) and execute:&lt;br /&gt;&lt;br /&gt;mkdir ~/downloads&lt;br /&gt;cd ~/downloads/&lt;br /&gt;wget http://osdn.dl.sourceforge.net/sourceforge/nagios/nrpe-2.12.tar.gz&lt;br /&gt;tar xzf nrpe-2.12.tar.gz&lt;br /&gt;cd nrpe-2.12/&lt;br /&gt;&lt;br /&gt;Compile the NRPE addon.&lt;br /&gt;&lt;br /&gt;./configure&lt;br /&gt;make all&lt;br /&gt;Install the NRPE plugin (for testing), daemon, and sample daemon config file.&lt;br /&gt;make install-plugin&lt;br /&gt;make install-daemon&lt;br /&gt;make install-daemon-config&lt;br /&gt;&lt;br /&gt;Add the following entry for the NRPE daemon to the/etc/services file.&lt;br /&gt;&lt;br /&gt;nrpe            5666/tcp# NRPE&lt;br /&gt;&lt;br /&gt;Next we have to add init script for nrpe.For this,&lt;br /&gt;&lt;br /&gt;cd nrp-2.12/&lt;br /&gt;cp ./src/nrpe /usr/sbin/&lt;br /&gt;cp ./sample-config/nrpe.cfg /etc /&lt;br /&gt;&lt;p&gt;cat init-script.in &gt; /etc/init.d/nrpe&lt;/p&gt;&lt;p&gt;mod a+x /etc/init.d/nrpe&lt;/p&gt;&lt;p&gt;open  the /etc/init.d/nrpe  file and edit lines:&lt;br /&gt;&lt;/p&gt;NrpeBin=/usr/sbin/nrpe&lt;br /&gt;NrpeCfg=/etc/nrpe.cfg&lt;br /&gt;&lt;br /&gt;Then restart nrpe services&lt;br /&gt;&lt;p&gt;/etc/init.d/nrpe restart&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;Next you have to edit the nrpe configuration file and allow the monitoring of host  ipaddress with:&lt;br /&gt;vi /etc/nrpe.cfg&lt;br /&gt;&lt;br /&gt;allowed_hosts=127.0.0.1,ipaddress of monitoring host&lt;br /&gt;&lt;br /&gt;Then open nrpe port in  the remote server firewall. Here I am using apf firewall.&lt;br /&gt;&lt;br /&gt;vim /etc/apf/conf.apf&lt;br /&gt;edit the follwing section and add port number 5666&lt;br /&gt;&lt;br /&gt;IG_tcp_cports="5666,20...........etc"&lt;br /&gt;&lt;br /&gt;restart the services&lt;br /&gt;&lt;br /&gt;&lt;p&gt;/etc/init.d/apf restart&lt;/p&gt;&lt;p&gt;Make sure the nrpe daemon is running under xinetd.&lt;br /&gt;&lt;/p&gt;netstat -at | grep nrpe&lt;br /&gt;&lt;p&gt;The output of this command should show something like this:&lt;br /&gt;&lt;/p&gt;tcp         0           0 *:nrpe    *:*          LISTEN&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Monitoring Host Setup&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We have to install nrpe plugin to the monitoring host.&lt;br /&gt;&lt;br /&gt;cd ~/downloads&lt;br /&gt;wget http://osdn.dl.sourceforge.net/sourceforge/nagios/nrpe-2.12.tar.gz&lt;br /&gt;tar xzf nrpe-2.12.tar.gz&lt;br /&gt;cd nrpe-2.12/&lt;br /&gt;Compile the NRPE addon.&lt;br /&gt;./configure&lt;br /&gt;make all&lt;br /&gt;Install the NRPE plugin.&lt;br /&gt;make install-plugin&lt;br /&gt;&lt;br /&gt;Create a command definition&lt;br /&gt;&lt;br /&gt;&lt;p&gt;You'll need to create a command definition in one of your Nagios object configuration files in order to use the check_nrpe plugin. Open the sample commands.cfg file for editing...&lt;/p&gt;&lt;p&gt;vi /usr/local/nagios/etc/commands.cfg&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;and add the following definition to the file:&lt;br /&gt;&lt;br /&gt;define command{&lt;br /&gt;       command_name         check_nrpe&lt;br /&gt;       command_line         $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;Now you can add services to your system for monitoring them in the remote system.&lt;br /&gt;You can insert each remote system services in one file.For that you have to edit the configuration file&lt;br /&gt;&lt;br /&gt;vim /usr/local/nagios/etc/nagios.cfg&lt;br /&gt;&lt;br /&gt;and append the following line.&lt;br /&gt;&lt;br /&gt;cfg_file=/usr/local/nagios/etc/objects/remotehost.cfg&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Before adding services, create a new template for each different type of host you'll be monitoring. Let's create a new template for linux boxes.&lt;br /&gt;vi /usr/local/nagios/etc/objects/templates.cfg&lt;br /&gt;add the following lines.&lt;br /&gt;&lt;br /&gt;define host{&lt;br /&gt;            name                                    linux-box                  ; Name of this template&lt;br /&gt;            use                                     generic-host               ; Inherit default values&lt;br /&gt;            check_period                            24x7&lt;br /&gt;            check_interval                          5&lt;br /&gt;            retry_interval                          1&lt;br /&gt;            max_check_attempts                      10&lt;br /&gt;            check_command                           check-host-alive&lt;br /&gt;            notification_period                     24x7&lt;br /&gt;            notification_interval                   30&lt;br /&gt;            notification_options                    d,r&lt;br /&gt;            contact_groups                          admins&lt;br /&gt;            register                                0            ; DONT REGISTER THIS - ITS A TEMPLATE&lt;br /&gt;            }&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Next you have to edit /usr/local/nagios/etc/objects/remotehost.cfg and add the following definitions and services&lt;br /&gt;&lt;/p&gt;Define a new host for the remote Linux/Unix box that references the newly created linux-box host template.&lt;br /&gt;define host{&lt;br /&gt;          use                      linux-box                  ; Inherit default values from a template&lt;br /&gt;          host_name                remotehost                 ; The name we're giving to this server&lt;br /&gt;          alias                    Fedora Core 6              ; A longer name for the server&lt;br /&gt;          address                  192.168.0.1                ; IP address of the server&lt;br /&gt;&lt;p&gt;            }&lt;/p&gt;&lt;p&gt;Then, define a new contact  for the remote Linux/Unix box that references the generic-contact template.&lt;br /&gt;&lt;/p&gt;define contact{&lt;br /&gt;     contact_name            remote&lt;br /&gt;     use                     generic-contact&lt;br /&gt;     alias                   Nagios client&lt;br /&gt;     email                   remotehost@gmail.com&lt;br /&gt;     }&lt;br /&gt;The following service will monitor the CPU load of the remote host. The "check_load" argument that is passed to the check_nrpe command definition tells the NRPE daemon to run the "check_load" command as defined in the&lt;br /&gt;nrpe.cfg file.&lt;br /&gt;define service{&lt;br /&gt;            use                       generic-service&lt;br /&gt;            host_name                 remotehost&lt;br /&gt;            service_description       CPU Load&lt;br /&gt;            check_command             check_nrpe!check_load&lt;br /&gt;            }&lt;br /&gt;The following service will monitor the the number of currently logged in users on the remote host.&lt;br /&gt;define service{&lt;br /&gt;            use                       generic-service&lt;br /&gt;            host_name                 remotehost&lt;br /&gt;            service_description       Current Users&lt;br /&gt;            check_command             check_nrpe!check_users&lt;br /&gt;            }&lt;br /&gt;The following service will monitor the free drive space on /dev/hda1 on the remote host.&lt;br /&gt;define service{&lt;br /&gt;            use                       generic-service&lt;br /&gt;            host_name                 remotehost&lt;br /&gt;            service_description       /dev/hda1 Free Space&lt;br /&gt;            check_command             check_nrpe!check_hda1&lt;br /&gt;            }&lt;br /&gt;The following service will monitor the total number of processes on the remote host.&lt;br /&gt;define service{&lt;br /&gt;          use                        generic-service&lt;br /&gt;          host_name                  remotehost&lt;br /&gt;          service_description        Total Processes&lt;br /&gt;          check_command              check_nrpe!check_total_procs&lt;br /&gt;&lt;p&gt;            }&lt;/p&gt;&lt;p&gt;The following service will monitor the number of zombie processes on the remote host.&lt;br /&gt;&lt;/p&gt;define service{&lt;br /&gt;          use                        generic-service&lt;br /&gt;          host_name                  remotehost&lt;br /&gt;          service_description        Zombie Processes&lt;br /&gt;          check_command              check_nrpe!check_zombie_procs&lt;br /&gt;          }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Remote Host Configuration&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You have to insert the following command definitions in /etc/nrpe.conf&lt;br /&gt;&lt;br /&gt;command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10&lt;br /&gt;command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20&lt;br /&gt;command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1&lt;br /&gt;command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z&lt;br /&gt;&lt;br /&gt;Then restart the nrpe daemon&lt;br /&gt;&lt;br /&gt;/etc/init.d/nrpe restart&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-3277604423834886473?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/3277604423834886473/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/04/how-to-install-and-configure-nrpe-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/3277604423834886473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/3277604423834886473'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/04/how-to-install-and-configure-nrpe-in.html' title='How to install and configure NRPE in Nagios'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JGBvwR9Yjgk/SfJx6j9fyDI/AAAAAAAAAAU/EXbhlVLnOOQ/s72-c/nrpe.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-7635936984948499117</id><published>2009-04-23T15:24:00.000-07:00</published><updated>2009-04-25T04:57:01.497-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='howto setup'/><category scheme='http://www.blogger.com/atom/ns#' term='How to'/><title type='text'>How to setup and configure nagios</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JGBvwR9Yjgk/SfJw9BUHJSI/AAAAAAAAAAM/Qc6XiPMmDjE/s1600-h/nagios.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_JGBvwR9Yjgk/SfJw9BUHJSI/AAAAAAAAAAM/Qc6XiPMmDjE/s320/nagios.jpg" alt="" id="BLOGGER_PHOTO_ID_5328445502759839010" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Nagios&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;    Nagios is a popular open source computer system and network monitoring software application. It watches hosts and services, alerting users when things go wrong and again when they get better.It allows you to gain insight into your network and fix problems before customers know they even exist. It's stable, scalable, supported, and extensible. Most importantly, it works. &lt;/p&gt;&lt;p&gt; It will do the Comprehensive Network Monitoring in the following &lt;/p&gt;&lt;p&gt;    *  Windows&lt;br /&gt;* Linux/Unix&lt;br /&gt;* Routers, Switches, Firewalls&lt;br /&gt;* Printers&lt;br /&gt;* Services&lt;br /&gt;* Applications&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;Installation of Nagios in localhost&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Before installing nagios,you have to install the following packages&lt;br /&gt;* Apache&lt;br /&gt;* GCC compiler&lt;br /&gt;* GD development libraries&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;if you are using rpm based packages,&lt;br /&gt;&lt;/em&gt;&lt;em&gt;&lt;br /&gt;yum install httpd&lt;br /&gt;yum install gcc&lt;br /&gt;yum install glibc glibc-common&lt;br /&gt;yum install gd gd-devel&lt;br /&gt;&lt;br /&gt;If you are using ubuntu,&lt;br /&gt;&lt;br /&gt;sudo apt-get install apache2&lt;br /&gt;sudo apt-get install build-essential&lt;br /&gt;sudo apt-get install libgd2-xpm-dev&lt;br /&gt;&lt;br /&gt;1) Create Account Information&lt;br /&gt;&lt;br /&gt;Create a new nagios user account and give it a password.&lt;br /&gt;&lt;br /&gt;/usr/sbin/useradd -m nagios&lt;br /&gt;passwd nagios&lt;br /&gt;&lt;br /&gt;Create a new nagcmd group for allowing external commands to be submitted through the web interface. Add both the nagios user and the apache user to the group.&lt;br /&gt;&lt;br /&gt;/usr/sbin/groupadd nagcmd&lt;br /&gt;/usr/sbin/usermod -a -G nagcmd nagios&lt;br /&gt;/usr/sbin/usermod -a -G nagcmd apache(or www-data)&lt;br /&gt;&lt;br /&gt;2) Download Nagios and the Plugins&lt;br /&gt;mkdir ~/downloads&lt;br /&gt;cd ~/downloads&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;for downloading Nagios &lt;a href="http://osdn.dl.sourceforge.net/sourceforge/nagios/nagios-3.0.2.tar.gz"&gt;click here&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;or in terminal type the following line&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;wget http://osdn.dl.sourceforge.net/sourceforge/nagios/nagios-3.0.2.tar.gz&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Extract the Nagios source code tarball.&lt;br /&gt;&lt;br /&gt;tar xvzf nagios-3.0.2.tar.gz&lt;br /&gt;&lt;br /&gt;cd nagios-3.0.2&lt;br /&gt;&lt;br /&gt;Run the Nagios configure script, passing the name of the group you created earlier like so:&lt;br /&gt;&lt;br /&gt;./configure --with-command-group=nagcmd&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;3) Compile the Nagios source code.&lt;br /&gt;&lt;br /&gt;make all&lt;br /&gt;&lt;br /&gt;Install binaries, init script, sample config files and set permissions on the external command directory.&lt;br /&gt;&lt;br /&gt;make install&lt;br /&gt;make install-init&lt;br /&gt;make install-config&lt;br /&gt;make install-commandmode&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;4) Configure the Web Interface&lt;br /&gt;&lt;br /&gt;Install the Nagios web config file in the Apache conf.d directory.&lt;br /&gt;&lt;br /&gt;make install-webconf&lt;br /&gt;&lt;br /&gt;Create a nagiosadmin account for logging into the Nagios web interface. Remember the password you assign to this account - you’ll need it later.&lt;br /&gt;&lt;br /&gt;htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin&lt;br /&gt;If you want to add more users then &lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;htpasswd /usr/local/nagios/etc/htpasswd.users username&lt;/em&gt;&lt;/p&gt;Edit the file in /usr/local/apache/conf/includes/pre_virtualhost_global.conf and append the following line in to the virtual host directories&lt;br /&gt;AuthName "Nagios Access"&lt;br /&gt;AuthType Basic&lt;br /&gt;AuthUserFile /usr/local/nagios/etc/htpasswd.users&lt;br /&gt;Require valid-user&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;em&gt;/etc/init.d/apache2 restart(or service httpd restart)&lt;br /&gt;&lt;/em&gt;&lt;em&gt;&lt;br /&gt;5) Download, Compile and Install the Nagios Plugins&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;For downloading Nagios-plugins &lt;a href="http://osdn.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.11.tar.gz"&gt;click here&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;or in terminal we can download using the wget command,its shown below:&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;wget http://osdn.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.11.tar.gz&lt;br /&gt;&lt;/em&gt;&lt;em&gt;&lt;br /&gt;cd ~/downloads&lt;br /&gt;tar xvzf nagios-plugins-1.4.11.tar.gz&lt;br /&gt;cd nagios-plugins-1.4.11/&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Compile and install the plugins.&lt;br /&gt;&lt;br /&gt;./configure --with-nagios-user=nagios --with-nagios-group=nagios&lt;br /&gt;make&lt;br /&gt;make install&lt;br /&gt;&lt;br /&gt;6) Start Nagios&lt;br /&gt;&lt;br /&gt;Configure Nagios to automatically start when the system boots.&lt;br /&gt;&lt;br /&gt;ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios&lt;br /&gt;&lt;br /&gt;Verify the sample Nagios configuration files.&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg&lt;br /&gt;&lt;br /&gt;If there are no errors, start Nagios.&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;/etc/init.d/nagios start (service nagios start)&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Add Nagios to the list of system services and have it automatically start when the system boots.&lt;br /&gt;&lt;/em&gt;&lt;em&gt;&lt;br /&gt;chkconfig --add nagios&lt;br /&gt;chkconfig nagios on&lt;br /&gt;&lt;br /&gt;you can check the Nagios in your browser typing the following url:&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;http://localhost/nagios&lt;/em&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;You should now be able to access the Nagios web interface at the URL below. You'll be prompted for the username (nagiosadmin) and password you specified earlier.&lt;br /&gt;&lt;br /&gt;Installation and configuration of of Nagios with NRPE for both remote hosts and local host will be posted on next session&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/em&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-7635936984948499117?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/7635936984948499117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/04/how-to-setup-and-configure-nagios.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/7635936984948499117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/7635936984948499117'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/04/how-to-setup-and-configure-nagios.html' title='How to setup and configure nagios'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JGBvwR9Yjgk/SfJw9BUHJSI/AAAAAAAAAAM/Qc6XiPMmDjE/s72-c/nagios.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1164734105379592467.post-6446569452237297827</id><published>2009-04-22T13:32:00.001-07:00</published><updated>2009-04-22T16:27:26.152-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>Let's start with Some Tricks &amp; Tips</title><content type='html'>&lt;p&gt;&lt;strong&gt;&lt;em&gt;A cat with Twist&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;We use &lt;/em&gt;&lt;strong&gt;&lt;em&gt;cat&lt;/em&gt;&lt;/strong&gt;&lt;em&gt; command to view a text file from top to bottom.If you want to read a text file from bottom to top you can use &lt;/em&gt;&lt;strong&gt;&lt;em&gt;tac&lt;/em&gt;&lt;/strong&gt;&lt;em&gt; command.&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;How to mount Windows share on Linux&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Most of them needs to frequently access windows from your Linux system.Most of you probably manually mount the  partition every time you require it.You can mount windows partion permenantly  by adding following in &lt;/em&gt;&lt;strong&gt;&lt;em&gt;/etc/fstab&lt;/em&gt;&lt;/strong&gt;&lt;em&gt; file.&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;//server/sharename  /home/mountpoint  smb        userrname=user,password=password   &lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;1 2 &lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Change the variables in the above line to the real values, the way it is in your case.&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;It would work in a home environment, where  you don't mind putting password in a &lt;/em&gt;&lt;strong&gt;&lt;em&gt;/etc/fstab&lt;/em&gt;&lt;/strong&gt;&lt;em&gt; file.If you want to be cautious,have a script ask for your password and mount the stuff using the smbmount command.However,if you would like to do this as the non-root user,specify the mount point option in &lt;/em&gt;&lt;strong&gt;&lt;em&gt;/etc/fstab&lt;/em&gt;&lt;/strong&gt;&lt;em&gt; along with th noauto and user options.&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;  Execute a command at a specific time&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;The &lt;/em&gt;&lt;strong&gt;&lt;em&gt;at&lt;/em&gt;&lt;/strong&gt;&lt;em&gt; command &lt;/em&gt;is used to run a command at a specific time or date.For example,inorder to remove a directory after one minute, issue the following commands:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;#at now+1 min&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;at&gt;rm -rf dirname&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;at&gt;updatedb&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;at&gt;&lt;ctrl-d&gt;&lt;/strong&gt;&lt;p&gt;To remove a directory on a particular day,say on MM/DD/YYYY, use the code below:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;#at MM/DD/YYYY&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;at&gt;rmdir dirname&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;at&gt;updatedb&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;at&gt;&lt;ctrl-d&gt;&lt;ctrl-d&gt;&lt;/strong&gt;&lt;p&gt;&lt;strong&gt;  Play Music in VLC without a GUI&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;In your terminal promp, type the following&lt;strong&gt; &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;vlc -I ncurses /home/kingfisher/filename.mp3&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Where the -I option is, specify the interface-in our case,it's ncurses.It will open a ncurses interface in the termnal,where you can increase or decrease the volume by using&lt;em&gt; A&lt;/em&gt; or &lt;em&gt;Z&lt;/em&gt; keys and press &lt;em&gt;H&lt;/em&gt; for further options.&lt;/p&gt;&lt;p&gt;&lt;strong&gt; &lt;/strong&gt;Also note that /home/kingfisher/filename.mp3 is an example of a music file.You can open any number of files by using a wild card such as *.mp3.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;How to get Server e-mail Alerts on the root login&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Append the following line at the end of your&lt;/em&gt;&lt;strong&gt; ~/.bash_profile&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;echo ‘ALERT - Root Shell Access on:’ `date` `who` | mail -s “Alert: Root Access from `who | awk ‘{print $6}’`” your@email.com&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Replace your@email.com with the actual email account address that you want to the root access alert notification been sent to.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1164734105379592467-6446569452237297827?l=howtodoinlinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtodoinlinux.blogspot.com/feeds/6446569452237297827/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/04/lets-start-with-some-tricks-tips.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/6446569452237297827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1164734105379592467/posts/default/6446569452237297827'/><link rel='alternate' type='text/html' href='http://howtodoinlinux.blogspot.com/2009/04/lets-start-with-some-tricks-tips.html' title='Let&apos;s start with Some Tricks &amp; Tips'/><author><name>Kingfisher</name><uri>http://www.blogger.com/profile/09568913188193263903</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
