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

<channel>
	<title>Vicky's server guides &#187; General linux admin</title>
	<atom:link href="http://www.vickysguide.com/category/general-linux-admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vickysguide.com</link>
	<description>Linux server administration tips and tricks</description>
	<lastBuildDate>Sun, 28 Mar 2010 18:30:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>My nginx installation procedure</title>
		<link>http://www.vickysguide.com/my-nginx-installation-procedure/</link>
		<comments>http://www.vickysguide.com/my-nginx-installation-procedure/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 16:47:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General linux admin]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://www.vickysguide.com/?p=72</guid>
		<description><![CDATA[I really started to like nginx web server, and here is my procedure step by step how to install this server on CentOS 5.4 yum install gcc pcre-devel openssl-devel wget http://nginx.org/download/nginx-0.7.65.tar.gz &#38;&#38; tar xvfz nginx-0.7.65.tar.gz ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_gzip_static_module make make install ln -s /usr/local/nginx/conf /etc/nginx ln -s /usr/local/nginx/logs /var/log/nginx ln -s /usr/local/nginx/sbin/nginx /usr/sbin/nginx Then grab [...]]]></description>
			<content:encoded><![CDATA[<p>I really started to like nginx web server, and here is my procedure step by step how to install this server on CentOS 5.4</p>
<p><code>yum install gcc pcre-devel openssl-devel<br />
wget http://nginx.org/download/nginx-0.7.65.tar.gz &amp;&amp; tar xvfz nginx-0.7.65.tar.gz<br />
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_gzip_static_module<code><br />
make<br />
make install<br />
ln -s /usr/local/nginx/conf  /etc/nginx<br />
ln -s /usr/local/nginx/logs  /var/log/nginx<br />
ln -s /usr/local/nginx/sbin/nginx /usr/sbin/nginx</code></code></p>
<p>Then grab this init script for red hat from http://wiki.nginx.org/RedHatNginxInitScript and put it in /etc/init.d/nginx file. Chmod 755 the file and you are ready.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vickysguide.com/my-nginx-installation-procedure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Audit still logging even when stoped</title>
		<link>http://www.vickysguide.com/audit-still-logging-even-when-stoped/</link>
		<comments>http://www.vickysguide.com/audit-still-logging-even-when-stoped/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 17:36:08 +0000</pubDate>
		<dc:creator>vicky</dc:creator>
				<category><![CDATA[General linux admin]]></category>
		<category><![CDATA[auditd]]></category>
		<category><![CDATA[logging]]></category>

		<guid isPermaLink="false">http://www.vickysguide.com/?p=61</guid>
		<description><![CDATA[I had strange problem on one of my CentOS 5.4 servers. I stoped auditd service and disables SElinux, the server, however, was still logging all those annoying things like Nov 10 18:27:01 server kernel: type=1105 audit(1257874021.909:87975): user pid=27986 uid=0 auid=0 msg=&#8217;PAM: session open acct=&#8221;root&#8221; : exe=&#8221;/usr/sbin/crond&#8221; (hostname=?, addr=?, terminal=cron res=success)&#8217; Nov 10 18:27:02 server kernel: [...]]]></description>
			<content:encoded><![CDATA[<p>I had strange problem on one of my CentOS 5.4 servers. I stoped auditd service and disables SElinux, the server, however, was still logging all those annoying things like</p>
<p>Nov 10 18:27:01 server kernel: type=1105 audit(1257874021.909:87975): user pid=27986 uid=0 auid=0 msg=&#8217;PAM: session open acct=&#8221;root&#8221; : exe=&#8221;/usr/sbin/crond&#8221; (hostname=?, addr=?, terminal=cron res=success)&#8217;<br />
Nov 10 18:27:02 server kernel: type=1104 audit(1257874022.828:87976): user pid=27986 uid=0 auid=0 msg=&#8217;PAM: setcred acct=&#8221;root&#8221; : exe=&#8221;/usr/sbin/crond&#8221; (hostname=?, addr=?, terminal=cron res=success)&#8217;</p>
<p>into /var/log/messages log, filling it up with garbage.</p>
<p>After some time spent investigating I  fixed it. I edited /etc/audit/audit.rules  and replaced line</p>
<blockquote><p>-D</p></blockquote>
<p>with this line</p>
<blockquote><p>-e 0</p></blockquote>
<p>After that I started auditd service, stopped it and no more logs in /var/log/messages</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vickysguide.com/audit-still-logging-even-when-stoped/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Show line numbers in vi or vim</title>
		<link>http://www.vickysguide.com/show-line-numbers-in-vi-or-vim/</link>
		<comments>http://www.vickysguide.com/show-line-numbers-in-vi-or-vim/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 14:19:00 +0000</pubDate>
		<dc:creator>vicky</dc:creator>
				<category><![CDATA[General linux admin]]></category>
		<category><![CDATA[show line numbers]]></category>
		<category><![CDATA[vi/vim]]></category>

		<guid isPermaLink="false">http://www.vickysguide.com/?p=58</guid>
		<description><![CDATA[Have you ever wondered how to show line numbers in vi or vim while editing file? I do that always when I patch some software or install MODs that come with &#8220;go to line xxx and rewrite this&#8230;&#8221;. And the solution is really simple. In vi/vim type :set number to show line numbers and :set [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wondered how to show line numbers in vi or vim while editing file? I do that always when I patch some software or install MODs that come with &#8220;go to line xxx and rewrite this&#8230;&#8221;. And the solution is really simple.</p>
<p>In vi/vim type <strong>:set number</strong> to show line numbers and <strong>:set nonumber</strong> to hide line numbers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vickysguide.com/show-line-numbers-in-vi-or-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>proftpd show hidden files</title>
		<link>http://www.vickysguide.com/proftpd-show-hidden-files/</link>
		<comments>http://www.vickysguide.com/proftpd-show-hidden-files/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 19:04:38 +0000</pubDate>
		<dc:creator>vicky</dc:creator>
				<category><![CDATA[General linux admin]]></category>

		<guid isPermaLink="false">http://www.vickysguide.com/?p=41</guid>
		<description><![CDATA[Not seeing hidden linux files ( dot beginning files) in your ftp you can enable this option in your ftp client. (show linux hidden files). It it does not work you can force your linux ftp server to show them via this command in /etc/proftpd.conf ListOptions -a Put it into the conf file and restart [...]]]></description>
			<content:encoded><![CDATA[<div class="entry">
<p>Not seeing hidden linux files ( dot beginning files) in your ftp you can enable this option in your ftp client. (show linux hidden files). It it does not work you can force your linux ftp server to show them via this command in /etc/proftpd.conf</p>
<p><code>ListOptions -a</code></p>
<p>Put it into the conf file and restart proftpd service.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.vickysguide.com/proftpd-show-hidden-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turn on syntax highlighting in vi/vim</title>
		<link>http://www.vickysguide.com/turn-on-syntax-highlighting-in-vivim/</link>
		<comments>http://www.vickysguide.com/turn-on-syntax-highlighting-in-vivim/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 23:27:34 +0000</pubDate>
		<dc:creator>vicky</dc:creator>
				<category><![CDATA[General linux admin]]></category>
		<category><![CDATA[colors in vi]]></category>

		<guid isPermaLink="false">http://www.vickysguide.com/?p=39</guid>
		<description><![CDATA[I recently got to administer a few linux boxes and wondered why vi does not show colors when I edit files. Some servers did it, some did not. It was differently set up by datacenter images and I really did not have time to investigate. Now it just annoyed me because I could not find [...]]]></description>
			<content:encoded><![CDATA[<p>I recently got to administer a few linux boxes and wondered why vi does not show colors when I edit files. Some servers did it, some did not. It was differently set up by datacenter images and I really did not have time to investigate.</p>
<p>Now it just annoyed me because I could not find few syntax errors on one server and here is the solution.</p>
<p>Open up some file in vi or vim and hit ESC, then type &#8220;:syntax on&#8221;  and the magic happens&#8230; let there be color <img src='http://www.vickysguide.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>If you do like it without color, type &#8220;:syntax off&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vickysguide.com/turn-on-syntax-highlighting-in-vivim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speeding up apache by mod_deflate and mod_expires</title>
		<link>http://www.vickysguide.com/speeding-up-apache-by-mod_deflate-and-mod_expires/</link>
		<comments>http://www.vickysguide.com/speeding-up-apache-by-mod_deflate-and-mod_expires/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 11:40:24 +0000</pubDate>
		<dc:creator>vicky</dc:creator>
				<category><![CDATA[General linux admin]]></category>
		<category><![CDATA[apache speed up]]></category>
		<category><![CDATA[apache tunning]]></category>
		<category><![CDATA[mod_deflate]]></category>
		<category><![CDATA[mod_expires]]></category>

		<guid isPermaLink="false">http://www.vickysguide.com/?p=31</guid>
		<description><![CDATA[Here is how I speed up apache by compressing pages with mod_deflate module and setting higher cache expiration times in mod_expires module. Here is how&#8230; put this in your apache config: &#60;IfModule mod_deflate.c&#62; # compress html, plain text, css and javascript AddOutputFilterByType DEFLATE text/html text/plain text/css text/javascript application/x-javascript # avoid problems in known-to-be-problematic browsers BrowserMatch [...]]]></description>
			<content:encoded><![CDATA[<p>Here is how I speed up apache by compressing pages with mod_deflate module and setting higher cache expiration times in mod_expires module. Here is how&#8230;<span id="more-31"></span></p>
<p>put this in your apache config:</p>
<p>&lt;IfModule mod_deflate.c&gt;<br />
# compress html, plain text, css and javascript<br />
AddOutputFilterByType DEFLATE text/html text/plain text/css text/javascript application/x-javascript<br />
# avoid problems in known-to-be-problematic browsers<br />
BrowserMatch ^Mozilla/4 gzip-only-text/html<br />
BrowserMatch ^Mozilla/4\.0[678] no-gzip<br />
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html<br />
&lt;/IfModule&gt;</p>
<p>&lt;IfModule mod_expires.c&gt;<br />
ExpiresActive On<br />
ExpiresDefault A300<br />
ExpiresByType image/x-icon A2592000<br />
ExpiresByType application/x-javascript A3600<br />
ExpiresByType text/css A3600<br />
ExpiresByType image/gif A604800<br />
ExpiresByType image/png A604800<br />
ExpiresByType image/jpeg A604800<br />
ExpiresByType text/plain A300<br />
ExpiresByType application/x-shockwave-flash A604800<br />
ExpiresByType video/x-flv A2592000<br />
ExpiresByType application/pdf A300<br />
ExpiresByType text/html A300<br />
&lt;/IfModule&gt;</p>
<p>Times are in seconds. There are many variations how to set the time, read apache manual for further info.</p>
<p>Hope it helps to speed up your sites and save some bandwidth.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vickysguide.com/speeding-up-apache-by-mod_deflate-and-mod_expires/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable cron email alert</title>
		<link>http://www.vickysguide.com/disable-cron-email-alert/</link>
		<comments>http://www.vickysguide.com/disable-cron-email-alert/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 14:12:35 +0000</pubDate>
		<dc:creator>vicky</dc:creator>
				<category><![CDATA[General linux admin]]></category>

		<guid isPermaLink="false">http://www.vickysguide.com/?p=23</guid>
		<description><![CDATA[Ever wondered how to disable the email alert sent when cron is executed? Easy help, there are various ways to achieve this, so feel free to use the one you like the best. They all work, though. However, there are two principles &#8211; one to send the email to /dev/null and other one disable it [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wondered how to disable the email alert sent when cron is executed? Easy help, there are various ways to achieve this, so feel free to use the one you like the best. <img src='http://www.vickysguide.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  They all work, though.<span id="more-23"></span></p>
<p>However, there are two principles &#8211; one to send the email to /dev/null and other one disable it by cron EMAILTO directive.</p>
<p>Redirect to /dev/null is used in these ways:</p>
<blockquote><p><strong>&gt;/dev/null 2&gt;&amp;1.</strong><br />
or<br />
<strong>&amp;&gt; /dev/null</strong></p></blockquote>
<p>Those need to be added at the end of your crontab entry, like this:</p>
<p><code>0 1 * * * /path/yourscript.sh &gt;/dev/null 2&gt;&amp;1</code></p>
<p><strong>Or,</strong> as I said using <code>EMAILTO would look in your crontab file like this:</code></p>
<blockquote><p><code>EMAILTO=""</code></p></blockquote>
<p>It should be placed on top of either /etc/crontab or you can define cron entries by executing: crontab -e</p>
<p>I hope this was helpfull&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vickysguide.com/disable-cron-email-alert/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Daily sendmail stats on Linux server</title>
		<link>http://www.vickysguide.com/daily-sendmail-stats-on-linux-server/</link>
		<comments>http://www.vickysguide.com/daily-sendmail-stats-on-linux-server/#comments</comments>
		<pubDate>Mon, 20 Aug 2007 12:29:27 +0000</pubDate>
		<dc:creator>vicky</dc:creator>
				<category><![CDATA[General linux admin]]></category>

		<guid isPermaLink="false">http://www.vickysguide.com/daily-sendmail-stats-on-linux-server/</guid>
		<description><![CDATA[I always wanted to see mail stats on my server, who receives and sends the most mails, what are the busiest hours, etc.. to better track mail problems, catch spammers and to satisfy my admin&#8217;s ego . I found this little script that goes through senmail&#8217;s log and produces output. In my case I will [...]]]></description>
			<content:encoded><![CDATA[<p>I always wanted to see mail stats on my server, who receives and sends the most mails, what are the busiest hours, etc.. to better track mail problems, catch spammers and to satisfy my admin&#8217;s ego <img src='http://www.vickysguide.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  . I found this little script that goes through senmail&#8217;s log and produces output. In my case I will send the output to root via email.</p>
<p>Here are the features that I receive from this little script:</p>
<p><strong>SendmailStats reports:</strong></p>
<ul>
<li>Time/date of log beginning and end</li>
<li>Total bytes transferred and total MB transferred</li>
<li>Total bytes in and total MB in (locally delivered)</li>
<li>Number of messages sent out</li>
<li>Number of messages coming in</li>
<li>Messages per hour graph</li>
<li>Top 20 remote sending hosts</li>
<li>Total number of sending hosts and number of their attempted messages</li>
<li>Top 20 destination hosts</li>
<li>Total number of destination hosts and number of messages sent to them</li>
<li>Top 20 local deliveries</li>
<li>Total number of local accounts that received mail</li>
<li>Total number of messages delivered locally</li>
<li>Top 20 senders</li>
<li>Total number of senders and total number of messages sent<span id="more-13"></span></li>
</ul>
<p><strong>These are the steps that need to be done to make it work:</strong></p>
<p><code><em>wget </em><a href="http://www.reedmedia.net/software/sendmail_stats/sendmail_stats-0.9.txt"><em>http://www.reedmedia.net/software/sendmail_stats/sendmail_stats-0.9.txt</em></a><a href="http://www.reedmedia.net/software/sendmail_stats/sendmail_stats.0.07.txt"></a><br />
<em>mv sendmail_stats-0.9.txt /root/sendmailstats<br />
chmod 755 /root/sendmailstats<br />
vi /root/sendmailstats   </em></code></p>
<p>edit dit the &#8220;$default_hostname = &#8216;EDIT-THIS-default-domain.net&#8217;;&#8221; line matching your hostname</p>
<p><em>vi /etc/cron.daily/smailstats</em></p>
<p>into the file paste this line:</p>
<p><em>/root/sendmailstats &lt; /var/log/maillog | less | mail -s &#8220;sendmail stats&#8221; root</em></p>
<p>Save the file &amp; close it.</p>
<p><em>chmod 755 /etc/cron.daily/smailstats</em></p>
<p>And you are finished. The script will run every day when is your daily cron set and you receive email with the stats.</p>
<p>Die spam! <img src='http://www.vickysguide.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<pre></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.vickysguide.com/daily-sendmail-stats-on-linux-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove FTP Login Delay With Proftpd</title>
		<link>http://www.vickysguide.com/remove-ftp-login-delay-with-proftpd/</link>
		<comments>http://www.vickysguide.com/remove-ftp-login-delay-with-proftpd/#comments</comments>
		<pubDate>Thu, 16 Aug 2007 13:33:25 +0000</pubDate>
		<dc:creator>vicky</dc:creator>
				<category><![CDATA[General linux admin]]></category>

		<guid isPermaLink="false">http://www.vickysguide.com/remove-ftp-login-delay-with-proftpd/</guid>
		<description><![CDATA[I have been noticing a very annoying delay when trying to log in via FTP on servers where I use proftpd. Everything works, but when I try to connect, 5 &#8211; 10 seconds pass by before I&#8217;m prompted for my login credentials. After long hour of searching on the internet I found a solution.  All you need [...]]]></description>
			<content:encoded><![CDATA[<p>I have been noticing a very annoying delay when trying to log in via FTP on servers where I use proftpd. Everything works, but when I try to connect, 5 &#8211; 10 seconds pass by before I&#8217;m prompted for my login credentials. After long hour of searching on the internet I found a solution.</p>
<p> All you need to do is edit the config file which should be <em>/etc/proftpd/proftpd.conf</em>  and place this line within &lt;global&gt; section:</p>
<p><em><strong> IdentLookups Off</strong></em></p>
<p> That should remove the delay and your ftp connection will be initialized very quickly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vickysguide.com/remove-ftp-login-delay-with-proftpd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Set date and time on a server</title>
		<link>http://www.vickysguide.com/set-date-and-time-on-a-server/</link>
		<comments>http://www.vickysguide.com/set-date-and-time-on-a-server/#comments</comments>
		<pubDate>Sun, 25 Mar 2007 16:31:44 +0000</pubDate>
		<dc:creator>vicky</dc:creator>
				<category><![CDATA[General linux admin]]></category>

		<guid isPermaLink="false">http://www.vickysguide.com/set-date-and-time-on-a-server/</guid>
		<description><![CDATA[I will show you here how to set correct date and time on your server. All steps need to be done as root (which I assume you know). To set correct time issue this command /usr/bin/rdate -s time.nist.gov It will connect to time server and synchs your time and date. After that command execute /sbin/hwclock [...]]]></description>
			<content:encoded><![CDATA[<p>I will show you here how to set correct date and time on your server. All steps need to be done as root (which I assume you know).</p>
<p>To set correct time issue this command</p>
<p><code>/usr/bin/rdate -s time.nist.gov</code></p>
<p><code></code></p>
<p>It will connect to time server and synchs your time and date. After that command execute</p>
<p><code>/sbin/hwclock --systohc</code></p>
<p><code></code></p>
<p>which sets &#8216;permanent&#8217; clock from the system time so that the time will be correct next time you reboot.</p>
<p>You can do this via a NTP daemon but it is too complicated for such an easy task as setting the date and time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vickysguide.com/set-date-and-time-on-a-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
