<?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>ServerAdminBlog &#187; CentOS</title>
	<atom:link href="http://www.serveradminblog.com/category/centos/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.serveradminblog.com</link>
	<description>Short Circuit...</description>
	<lastBuildDate>Mon, 06 Sep 2010 10:29:08 +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>fsck in CentOS 5.x howto</title>
		<link>http://www.serveradminblog.com/2010/06/fsck-in-centos-5-x-howto/</link>
		<comments>http://www.serveradminblog.com/2010/06/fsck-in-centos-5-x-howto/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 14:06:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.serveradminblog.com/?p=116</guid>
		<description><![CDATA[fsck is used to check and optionally repair one or more Linux file systems. File system can be a device name (e.g. /dev/sda2), a mount point (e.g. /, /usr,&#8230; ), or an ext2 label or UUID specifier. By default, the fsck will try to handle filesystems on different physical disk drives in parallel to reduce [...]]]></description>
			<content:encoded><![CDATA[<p>fsck is used to check and optionally repair one or more Linux file systems. File system can be a device name (e.g. /dev/sda2), a mount point (e.g. /, /usr,&#8230; ), or an ext2 label or UUID specifier. By default, the fsck will try to handle filesystems on different physical disk drives in parallel to reduce the total amount of time needed to check all of the filesystems.</p>
<p><span id="more-116"></span></p>
<p>I hope you won&#8217;t need this instructions but in case you have some problems &#8230;</p>
<p>First, keep in mind that running fsck on a mounted file system can result in data corruption so use this commands at your own risk. I&#8217;m not responsible for any damage you may cause. </p>
<p>To avoid this, you can:</p>
<ul>
<li>Change the running state of the system to single user mode and unmount the file system</li>
<p> (Note: Skip this option if you need to check / part.)</p>
<li>Boot the computer into Rescue Mode using the installation CD</li>
</ul>
<p><strong>1) Single user mode</strong></p>
<p>Change the run level to 1 and unmont the file system with (I suppose the /home was affected with problems)</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># init 1
# umount /home</pre></div></div>

<p>Then run fsck with</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># fsck /dev/sda2</pre></div></div>

<p><strong>2) Rescue mode with install CD</strong></p>
<p>Insert the Installation CD into the drive and reboot your system with</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># reboot</pre></div></div>

<p>Wait a while and after booting from the Installation CD type in command prompt:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># linux rescue nomount</pre></div></div>

<p>Note: nomount directive will skip mounting so you can safely run fsck on your filesystem</p>
<p>Then enter</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># fsck -yvf /dev/sda2</pre></div></div>

<p>where /dev/sda2 is problematic partition.<br />
Note: -yvf means<br />
-y attempt to fix any detected filesystem corruption automatically (answer all questions with &#8220;yes&#8221;)<br />
-f force a check even if reported in a clean state<br />
-v verbose output, including all file system-specific commands that are executed (you will see all errors and recovery process)</p>
<p><strong>LVM Partitions</strong><br />
Situation with LVM partitions is a little different. To run fsck on lvm partitions first you need to find the pv’s, vg’s, lv’s and then to activate them.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># lvm pvscan
# lvm vgscan
# lvm lvchange -ay VolGroup00
# lvm lvscan
&nbsp;
# fsck -yfv /dev/VolGroup00/LogVol00</pre></div></div>

<p>fsck can be scheduled on boot with</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># shutdown -Fr now</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.serveradminblog.com/2010/06/fsck-in-centos-5-x-howto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Releasing a message from a quarantine with amavisd-relase</title>
		<link>http://www.serveradminblog.com/2010/05/releasing-a-message-from-a-quarantine-with-amavisd-relase/</link>
		<comments>http://www.serveradminblog.com/2010/05/releasing-a-message-from-a-quarantine-with-amavisd-relase/#comments</comments>
		<pubDate>Mon, 10 May 2010 09:45:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Amavisd-new]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.serveradminblog.com/?p=92</guid>
		<description><![CDATA[amavisd-new is a high-performance and reliable interface between mailer (MTA) and one or more content checkers: virus scanners, and/or Mail::SpamAssassin Perl module. It is written in Perl, ensuring high reliability, portability and maintainability. It talks to MTA via (E)SMTP or LMTP protocols, or by using helper programs. No timing gaps exist in the design, which [...]]]></description>
			<content:encoded><![CDATA[<p>amavisd-new is a high-performance and reliable interface between mailer (MTA) and one or more content checkers: virus scanners, and/or Mail::SpamAssassin Perl module. It is written in Perl, ensuring high reliability, portability and maintainability. It talks to MTA via (E)SMTP or LMTP protocols, or by using helper programs. No timing gaps exist in the design, which could cause a mail loss. </p>
<p>In other words, amavisd-new will help you to fight against spam. In this post, I won&#8217;t write about installation (coming soon in you theaters)</p>
<p>This post is just a small trick which will help you to release specific message from quarantine (false positive or you simple want to read spam messages)</p>
<p>Fist you need to find message inside the messages log file (usually /var/log/messages)</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">May 10 10:06:56 ns1 amavis[12774]: (12774-13) Blocked SPAM, [207.46.22.35] [207.46.22.35] &lt;cnfrmpro@microsoft.com&gt; -&gt; &lt;mymail@domain.tld&gt;, quarantine: spam-1lvc624m6MVB.gz, Message-ID: &lt;BY2MSFTVSMTP03Dfn8e0003d305@by2msftvsmtp03.phx.gbl&gt;, mail_id: 1lvc624m6MVB, Hits: 7.743, size: 3013, 4325 ms</pre></div></div>

<p>As you can see above, it is <em>spam-1lvc624m6MVB.gz</em></p>
<p>Now you can release specific message with</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@s1 ~]# amavisd-release spam-1lvc624m6MVB.gz</pre></div></div>

<p>And you will see something like</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">250 2.0.0 Ok, id=rel-1lvc624m6MVB, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 403206AF07CE</pre></div></div>

<p>Now you just need to check your inbox and you should see the message. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.serveradminblog.com/2010/05/releasing-a-message-from-a-quarantine-with-amavisd-relase/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Config mta &#8211; howto</title>
		<link>http://www.serveradminblog.com/2010/04/config-mta-howto/</link>
		<comments>http://www.serveradminblog.com/2010/04/config-mta-howto/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 07:09:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.serveradminblog.com/?p=79</guid>
		<description><![CDATA[Centos has a neat application for switching between alternative software packages, called alternatives. Few days ago I noticed that one server doesn&#8217;t send logwatch email. I wanted to see what was the reason and here are the few tips you can check before you dig inside logwatch settings. First, check /etc/aliases and root email inside [...]]]></description>
			<content:encoded><![CDATA[<p>Centos has a neat application for switching between alternative software packages, called <em>alternatives</em>.</p>
<p>Few days ago I noticed that one server doesn&#8217;t send logwatch email. I wanted to see what was the reason and here are the few tips you can check before you dig inside logwatch settings. </p>
<p>First, check /etc/aliases and root email inside</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># nano /etc/aliases</pre></div></div>

<p>at the end, check next lines:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># Person who should get root's mail
root:           blabla@domain.tld</pre></div></div>

<p>After you save aliases, enter command</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># newaliases</pre></div></div>

<p>This command rebuilds the random access data base for the mail aliases file /etc/aliases. It must be run each time this file is changed in order for the change to take effect. This would be enough to receive all email directed to root, but in case you still don&#8217;t get root emails, check mta with:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># alternatives --display mta</pre></div></div>

<p>This will show you something like</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@s1 ~]# alternatives --display mta
mta - status is manual.
 link currently points to /usr/sbin/sendmail.sendmail
/usr/sbin/sendmail.sendmail - priority 90
 slave mta-pam: /etc/pam.d/smtp.sendmail
 slave mta-mailq: /usr/bin/mailq.sendmail
 slave mta-newaliases: /usr/bin/newaliases.sendmail
 slave mta-rmail: /usr/bin/rmail.sendmail
 slave mta-sendmail: /usr/lib/sendmail.sendmail
 slave mta-mailqman: /usr/share/man/man1/mailq.sendmail.1.gz
 slave mta-newaliasesman: /usr/share/man/man1/newaliases.sendmail.1.gz
 slave mta-aliasesman: /usr/share/man/man5/aliases.sendmail.5.gz
 slave mta-sendmailman: /usr/share/man/man8/sendmail.sendmail.8.gz
/usr/sbin/sendmail.postfix - priority 30
 slave mta-pam: /etc/pam.d/smtp.postfix
 slave mta-mailq: /usr/bin/mailq.postfix
 slave mta-newaliases: /usr/bin/newaliases.postfix
 slave mta-rmail: /usr/bin/rmail.postfix
 slave mta-sendmail: /usr/lib/sendmail.postfix
 slave mta-mailqman: /usr/share/man/man1/mailq.postfix.1.gz
 slave mta-newaliasesman: /usr/share/man/man1/newaliases.postfix.1.gz
 slave mta-aliasesman: /usr/share/man/man5/aliases.postfix.5.gz
 slave mta-sendmailman: /usr/share/man/man1/sendmail.postfix.1.gz
Current `best' version is /usr/sbin/sendmail.sendmail.</pre></div></div>

<p>We use postfix so we should change this with</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@s1 ~]# alternatives --config mta
&nbsp;
There are 2 programs which provide 'mta'.
&nbsp;
  Selection    Command
-----------------------------------------------
*+ 1           /usr/sbin/sendmail.sendmail
   2           /usr/sbin/sendmail.postfix
&nbsp;
Enter to keep the current selection[+], or type selection number:</pre></div></div>

<p>Enter 2 and press <em>Enter</em>. Then check your mta with</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@s1 ~]# alternatives --display mta
mta - status is manual.
 link currently points to /usr/sbin/sendmail.postfix</pre></div></div>

<p>That&#8217;s it&#8230; Now if your logwatch is configured properly you should receive root emails&#8230; </p>
]]></content:encoded>
			<wfw:commentRss>http://www.serveradminblog.com/2010/04/config-mta-howto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RPMforge howto</title>
		<link>http://www.serveradminblog.com/2010/03/rpmforge-howto/</link>
		<comments>http://www.serveradminblog.com/2010/03/rpmforge-howto/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 18:12:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.serveradminblog.com/?p=71</guid>
		<description><![CDATA[The RPMforge project is an open source project that provides RPM packages for various distributions (RH, CentOS, Fedora, &#8230;). To enable RPMforge you can install the rpmforge-release package for your distribution. For RHEL5 / CentOS-5: i386 # wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm # rpm -Uvh rpmforge-release-0.5.1-1.el5.rf.i386.rpm x86_64 # wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm # rpm -Uvh rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm For older releases (RHEL [...]]]></description>
			<content:encoded><![CDATA[<p>The RPMforge project is an open source project that provides RPM packages for various distributions (RH, CentOS, Fedora, &#8230;). To enable RPMforge you can install the rpmforge-release package for your distribution. </p>
<p>For RHEL5 / CentOS-5:<br />
i386</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
# rpm -Uvh rpmforge-release-0.5.1-1.el5.rf.i386.rpm</pre></div></div>

<p>x86_64</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
# rpm -Uvh rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm</pre></div></div>

<p>For older releases (RHEL 4 / CentOS 4) please follow the instructions available on <a href="http://rpmrepo.org/RPMforge/Using" target="_blank">RPMrepo Wiki</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serveradminblog.com/2010/03/rpmforge-howto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How do I check what version of Centos/Fedora/RH my server is running?</title>
		<link>http://www.serveradminblog.com/2009/05/how-do-i-check-what-version-of-centosfedorarh-my-server-is-running/</link>
		<comments>http://www.serveradminblog.com/2009/05/how-do-i-check-what-version-of-centosfedorarh-my-server-is-running/#comments</comments>
		<pubDate>Sat, 30 May 2009 10:49:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.serveradminblog.com/?p=35</guid>
		<description><![CDATA[You can run the command below at a command prompt to see what version of Centos/Fedora/RH your server is running. [root@hydra:~]# cat /etc/redhat-release CentOS release 5.2 (Final) Fedora sample: [root@s2 ~]# cat /etc/redhat-release Fedora release 7 (Moonshine)]]></description>
			<content:encoded><![CDATA[<p>You can run the command below at a command prompt to see what version of Centos/Fedora/RH your server is running.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@hydra:~]# cat /etc/redhat-release
CentOS release 5.2 (Final)</pre></div></div>

<p>Fedora sample:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@s2 ~]# cat /etc/redhat-release
Fedora release 7 (Moonshine)</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.serveradminblog.com/2009/05/how-do-i-check-what-version-of-centosfedorarh-my-server-is-running/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading to PHP 5.2.5 on RHEL and CentOS</title>
		<link>http://www.serveradminblog.com/2009/04/upgrading-to-php-525-on-rhel-and-centos/</link>
		<comments>http://www.serveradminblog.com/2009/04/upgrading-to-php-525-on-rhel-and-centos/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 23:12:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.serveradminblog.com/?p=23</guid>
		<description><![CDATA[As you probably know, the latest CentOS and RHEL distros are available only with PHP 5.1.6 and if you want to upgrade PHP, you need to install it manually (or to find someone to do it for you ). The 5.2.5 release brings several security enhancements, more than 60 bug fixes, and improved performance for [...]]]></description>
			<content:encoded><![CDATA[<p>As you probably know, the latest CentOS and RHEL distros are available only with PHP 5.1.6 and if you want to upgrade PHP, you need to install it manually (or to find someone to do it for you <img src='http://www.serveradminblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ).  The 5.2.5 release brings several security enhancements, more than 60 bug fixes, and improved performance for those of you that like arrays (and really, who doesn&#8217;t?). I wanted to install latest RoundCube webmail application and it won&#8217;t work if you don&#8217;t have PHP> 5.2. Also, latest Vivvo won&#8217;t work without 5.2.x</p>
<p>So, if you don&#8217;t want to build rpms or to go through ./configure, make, make install nightmare, you can enable Jason Litka yum repository to your RHEL or CentOS system. To do this please follow next few steps.</p>
<p>First you need to validate that the packages came from Jason Litka and you&#8217;ll do it with next command:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">#rpm --import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka</pre></div></div>

<p>After you added his public GPG key, you&#8217;ll need to adjust yum so he can search at his repo. To do this, please follow next steps:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">#nano -w /etc/yum.repos.d/utterramblings.repo</pre></div></div>

<p>Now copy next lines inside this file and save those changes.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka</pre></div></div>

<p>Now you can upgrade your PHP installation with simple:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">#yum update php</pre></div></div>

<p>More information about this can be found <a href="http://www.jasonlitka.com/yum-repository/" target="_blank">HERE</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">#php -v</pre></div></div>

<p>should return</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@ns1 ~]# php -v
PHP 5.2.6 (cli) (built: May  5 2008 10:32:59)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
[root@ns1 ~]#</pre></div></div>

<p>I forget to say that you should restart httpd after upgrade.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.serveradminblog.com/2009/04/upgrading-to-php-525-on-rhel-and-centos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
