<?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>Pario TechnoBlob &#187; CentOS</title>
	<atom:link href="http://pario.no/tag/centos/feed/" rel="self" type="application/rss+xml" />
	<link>http://pario.no</link>
	<description>A cronological documentation test project, nothing serious, really!</description>
	<lastBuildDate>Thu, 26 Apr 2012 08:18:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Using Lsyncd to perform &#8220;live&#8221; syncronization of a local directory to a remote directory</title>
		<link>http://pario.no/2012/01/13/using-lsyncd-to-perform-live-syncronization-of-a-local-directory-to-a-remote-directory/</link>
		<comments>http://pario.no/2012/01/13/using-lsyncd-to-perform-live-syncronization-of-a-local-directory-to-a-remote-directory/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 18:14:20 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[lsyncd]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ssh-keygen]]></category>

		<guid isPermaLink="false">http://pario.no/?p=1672</guid>
		<description><![CDATA[This post is a short HOWTO and describes how you can install and run lsyncd to perform a rsync syncronization from local to a remote server using SSH. Lsyncd is a daemon to continuously synchronize directory trees and relies on inotify. If you need real live syncronization DRBD might be a better alternative since it [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a short HOWTO and describes how you can install and run <a href="http://code.google.com/p/lsyncd/">lsyncd</a> to perform a rsync syncronization from local to a remote server using SSH.<br />
Lsyncd is a daemon to continuously synchronize directory trees and relies on inotify. If you need real live syncronization DRBD might be a better alternative since it is a block level syncronization. </p>
<p><strong>Installing Lsyncd 2.0 from source on CentOS 6</strong><br />
Lsyncd is not included as a package in CentOS 6, so you need to download the source file from <a href="http://code.google.com/p/lsyncd/downloads/list">http://code.google.com/p/lsyncd/downloads/list</a>.<br />
You should have rsync, GCC and lua-devel installed on your system before you continue installing Lsyncd.</p>
<pre>
# yum install rsync lua-devel</pre>
<p>Unpack the lsyncd source file and run the following commands from the unpacked file</p>
<pre>
# configure
# make
# make install</pre>
<p>make install copies the compiled files and install them to the right directories in your system.</p>
<p>I need to configure a non password SSH communication between the two servers with a shared SSH key.<br />
On the source server run the following command to generate a SSH key, if you have not done this already.<br />
Remember to do this as the user you are going to perform the sync with.</p>
<pre>
# ssh-keygen</pre>
<p>Secure copy the generated SSH key from the source server to your target server</p>
<pre>
# scp ~/.ssh/id_rsa.pub root@remoteserver:/tmp</pre>
<p>On the target server you need to add the copied SSH key to your existing authorized keys file.<br />
Also remember to do this with the user you are going to connect with from the source server.</p>
<pre>
# cat /tmp/id_rsa.pub >> ~/.ssh/authorized_keys</pre>
<p>If you do not have this file, just create it using the touch command described below</p>
<pre>
# touch ~/.ssh/authorized_keys</pre>
<p>Test if you can ssh without a password from your source server to the target server.</p>
<p>I have made a config file, <strong>/root/scripts/lsyncd.conf</strong> that tells Lsyncd where to put the log- and statusfile. That it should be running as a daemon in the background, and a sync should occur after 900 seconds (15 minutes) if there have not been any filesystem changes and there should not be more than 6 parallell Lsyncd processes.</p>
<pre>
settings = {
   logfile      = "/tmp/lsyncd.log",
   statusFile   = "/tmp/lsyncd.status",
   nodaemon     = false,
   maxDelays    = 900,
   maxProcesses = 6,
}

sync{default.rsyncssh, source="/path/on/source/", host="hostnam.target.server.tld", targetdir="/path/on/target/"}</pre>
<p>To start lsyncd you run the command</p>
<pre>
# lsyncd /root/scripts/lsyncd.conf</pre>
<p>You should now see a Lsyncd process running as a daemon on your system. It performs a sync when you start and then waits for any filesystem changes or sync after 900 seconds.</p>
<p>If you would like Lsyncd to start at boot, just add the following line to the bottom of file <strong>/etc/rc.local</strong></p>
<pre>
lsyncd /root/scripts/lsyncd.conf</pre>
<p>You do now have a working secure rsync syncronization between two servers.</p>
<p><strong>What directories you are syncing</strong></p>
<pre>
# tail -f /tmp/lsyncd.status</pre>
<p><strong>What is happening now</strong></p>
<pre>
# tail -f /tmp/lsyncd.log</pre>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/code.google.com\/p\/lsyncd\/","http:\/\/code.google.com\/p\/lsyncd\/downloads\/list"];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMTIvMDEvMTMvdXNpbmctbHN5bmNkLXRvLXBlcmZvcm0tbGl2ZS1zeW5jcm9uaXphdGlvbi1vZi1hLWxvY2FsLWRpcmVjdG9yeS10by1hLXJlbW90ZS1kaXJlY3RvcnkvPHdwdGI%2BVXNpbmcgTHN5bmNkIHRvIHBlcmZvcm0gJiM4MjIwO2xpdmUmIzgyMjE7IHN5bmNyb25pemF0aW9uIG9mIGEgbG9jYWwgZGlyZWN0b3J5IHRvIGEgcmVtb3RlIGRpcmVjdG9yeTx3cHRiPmh0dHA6Ly9wYXJpby5ubzx3cHRiPlBhcmlvIFRlY2hub0Jsb2I%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2012/01/13/using-lsyncd-to-perform-live-syncronization-of-a-local-directory-to-a-remote-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switching to a graphical login on RHEL6</title>
		<link>http://pario.no/2011/11/28/switching-to-a-graphical-login-on-rhel6/</link>
		<comments>http://pario.no/2011/11/28/switching-to-a-graphical-login-on-rhel6/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 16:17:17 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[rhel6]]></category>
		<category><![CDATA[X]]></category>
		<category><![CDATA[XFCE]]></category>

		<guid isPermaLink="false">http://pario.no/?p=1646</guid>
		<description><![CDATA[This is a short post on how to install the necessary components to get X Server running on a bare bone RedHat 6 Enterprise Server (CentOS6) installation. The following commands should be run from a console window as the root user. Install barebone X support # yum groupinstall "X Window System" Install X and the [...]]]></description>
			<content:encoded><![CDATA[<p>This is a short post on how to install the necessary components to get X Server running on a bare bone RedHat 6 Enterprise Server (CentOS6) installation.<br />
The following commands should be run from a console window as the root user.</p>
<p>Install barebone X support</p>
<pre>
# yum groupinstall "X Window System"</pre>
<p>Install X and the Gnome Environment</p>
<pre>
# yum groupinstall "X Window System" "GNOME Desktop Environment"</pre>
<p>Install X and the KDE Window System</p>
<pre>
# yum groupinstall "X Window System" KDE</pre>
<p>Install the XFCE desktop environment</p>
<pre>
# yum groupinstall "X Window System" XFCE</pre>
<p>When you have chosen your desired desktop environment, make the final change to make the Gnome Display Manager show you a logon screen.<br />
Edit the file <strong>/etc/inittab</strong> and change the line<br />
from</p>
<pre>
id:3:initdefault:</pre>
<p>to </p>
<pre>
id:5:initdefault:</pre>
<p>You will be greeted with a graphical logon screen the next time you have rebooted your server.</p>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMTEvMTEvMjgvc3dpdGNoaW5nLXRvLWEtZ3JhcGhpY2FsLWxvZ2luLW9uLXJoZWw2Lzx3cHRiPlN3aXRjaGluZyB0byBhIGdyYXBoaWNhbCBsb2dpbiBvbiBSSEVMNjx3cHRiPmh0dHA6Ly9wYXJpby5ubzx3cHRiPlBhcmlvIFRlY2hub0Jsb2I%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2011/11/28/switching-to-a-graphical-login-on-rhel6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List rpm package content</title>
		<link>http://pario.no/2008/02/26/list-rpm-package-content/</link>
		<comments>http://pario.no/2008/02/26/list-rpm-package-content/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 08:04:48 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[RedHat]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://pario.no/2008/02/26/list-rpm-package-content/</guid>
		<description><![CDATA[To list the contents of a package just run the command # rpm -ql packagename Example # rpm -ql nmap /usr/bin/nmap /usr/share/doc/nmap-3.70 /usr/share/doc/nmap-3.70/COPYING /usr/share/doc/nmap-3.70/COPYING.OpenSSL /usr/share/doc/nmap-3.70/README /usr/share/doc/nmap-3.70/nmap-fingerprinting-article.txt /usr/share/doc/nmap-3.70/nmap.deprecated.txt /usr/share/doc/nmap-3.70/nmap.usage.txt /usr/share/doc/nmap-3.70/nmap_doc.html /usr/share/doc/nmap-3.70/nmap_manpage.html /usr/share/man/man1/nmap.1.gz /usr/share/nmap /usr/share/nmap/nmap-mac-prefixes /usr/share/nmap/nmap-os-fingerprints /usr/share/nmap/nmap-protocols /usr/share/nmap/nmap-rpc /usr/share/nmap/nmap-service-probes /usr/share/nmap/nmap-services]]></description>
			<content:encoded><![CDATA[<p>To list the contents of a package just run the command</p>
<pre>
# rpm -ql packagename</pre>
<p>Example</p>
<pre>
# rpm -ql nmap

/usr/bin/nmap
/usr/share/doc/nmap-3.70
/usr/share/doc/nmap-3.70/COPYING
/usr/share/doc/nmap-3.70/COPYING.OpenSSL
/usr/share/doc/nmap-3.70/README
/usr/share/doc/nmap-3.70/nmap-fingerprinting-article.txt
/usr/share/doc/nmap-3.70/nmap.deprecated.txt
/usr/share/doc/nmap-3.70/nmap.usage.txt
/usr/share/doc/nmap-3.70/nmap_doc.html
/usr/share/doc/nmap-3.70/nmap_manpage.html
/usr/share/man/man1/nmap.1.gz
/usr/share/nmap
/usr/share/nmap/nmap-mac-prefixes
/usr/share/nmap/nmap-os-fingerprints
/usr/share/nmap/nmap-protocols
/usr/share/nmap/nmap-rpc
/usr/share/nmap/nmap-service-probes
/usr/share/nmap/nmap-services</pre>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDgvMDIvMjYvbGlzdC1ycG0tcGFja2FnZS1jb250ZW50Lzx3cHRiPkxpc3QgcnBtIHBhY2thZ2UgY29udGVudDx3cHRiPmh0dHA6Ly9wYXJpby5ubzx3cHRiPlBhcmlvIFRlY2hub0Jsb2I%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2008/02/26/list-rpm-package-content/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enabling Remote Access to the Installation System</title>
		<link>http://pario.no/2007/10/17/enabling-remote-access-to-the-installation-system/</link>
		<comments>http://pario.no/2007/10/17/enabling-remote-access-to-the-installation-system/#comments</comments>
		<pubDate>Wed, 17 Oct 2007 06:41:22 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[RedHat]]></category>
		<category><![CDATA[remote access]]></category>
		<category><![CDATA[vnc]]></category>

		<guid isPermaLink="false">http://pario.no/2007/10/17/enabling-remote-access-to-the-installation-system/</guid>
		<description><![CDATA[You may access either graphical or text interfaces for the Redhat installation system from any other system. Access to a text mode display requires telnet, which is installed by default on Fedora systems. To remotely access the graphical display of an installation system, use client software that supports the VNC (Virtual Network Computing) display protocol. [...]]]></description>
			<content:encoded><![CDATA[<p>You may access either graphical or text interfaces for the Redhat installation system from any other system. Access to a text mode display requires <code class="command">telnet</code>, which is installed by default on Fedora systems. To remotely access the graphical display of an installation system, use client software that supports the <a title="id2534126" class="indexterm" name="id2534126"></a> VNC (Virtual Network Computing) display protocol. A number of       providers offer VNC clients for Microsoft Windows and Mac OS, as       well as UNIX-based systems.</p>
<p>The installation system supports two methods of establishing a VNC       connection. You may start the installation, and manually login to       the graphical display with a VNC client on another system.       Alternatively, you may configure the installation system to       automatically connect to a VNC client on the network that is       running in <em class="firstterm">listening mode</em>.</p>
<p><strong>Enabling Remote Access with VNC</strong><br />
To enable remote graphical access to the installation system, enter two options at the prompt:</p>
<pre>
linux vnc vncpassword=astrongpassword</pre>
<p>The vnc option enables the VNC service. The vncpassword option sets a password for remote access. The example shown above sets the password as astrongpassword. The VNC password must be at least six characters long.</p>
<p>Specify the language, keyboard layout and network settings for the installation system with the screens that follow. You may then access the graphical interface through a VNC client. The installation system displays the correct connection setting for the VNC client:</p>
<pre>
Starting VNC...
The VNC server is now running.
Please connect to computer.mydomain.com:1 to begin the install...
Starting graphical installation...
Press &lt;enter&gt; for a shell</pre>
<p>You may then login to the installation system with a VNC client. Start the VNC client Enter the server and display number in the VNC Server dialog. For the example above, the VNC Server is computer.mydomain.com:1.</p>
<p>This is possible on RedHat, Fedora and probably other distributions derived on these distributions like CentOS.</p>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMTAvMTcvZW5hYmxpbmctcmVtb3RlLWFjY2Vzcy10by10aGUtaW5zdGFsbGF0aW9uLXN5c3RlbS88d3B0Yj5FbmFibGluZyBSZW1vdGUgQWNjZXNzIHRvIHRoZSBJbnN0YWxsYXRpb24gU3lzdGVtPHdwdGI%2BaHR0cDovL3BhcmlvLm5vPHdwdGI%2BUGFyaW8gVGVjaG5vQmxvYg%3D%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/10/17/enabling-remote-access-to-the-installation-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Courier-IMAP to Dovecot Migration Script</title>
		<link>http://pario.no/2007/05/17/courier-imap-to-dovecot-migration-script/</link>
		<comments>http://pario.no/2007/05/17/courier-imap-to-dovecot-migration-script/#comments</comments>
		<pubDate>Thu, 17 May 2007 20:49:59 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Courier-imap]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Dovecot]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[maildir]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[RedHat]]></category>
		<category><![CDATA[SMTP]]></category>
		<category><![CDATA[xargs]]></category>

		<guid isPermaLink="false">http://hhj.no/wordpress/2007/05/17/courier-imap-to-dovecot-migration-script/</guid>
		<description><![CDATA[I’ve just migrated a couple of servers from Courier-IMAP to Dovecot, and am very happy with the latter so far. I thought I’d share the courier2dovecot shell script I whipped together (based on the instructions I found in the migration how-to), for converting Courier-IMAP maildirs to Dovecot format. While the script is rather simple, it [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve just migrated a couple of servers from Courier-IMAP to <a href="http://www.dovecot.org/">Dovecot</a>, and am very happy with the latter so far. I thought I’d share the <strong>courier2dovecot </strong> shell script I whipped together (based on the instructions I found in the <a href="http://wiki.dovecot.org/">migration how-to</a>), for converting Courier-IMAP <a href="http://en.wikipedia.org/wiki/Maildir">maildirs</a> to Dovecot format.</p>
<p>While the script is rather simple, it can save a fair bit of typing when migrating some hundreds of mail accounts, especially since Courier stores some of its own state files recursively in each folder of the maildir hierarchy, making it a real pain to otherwise manually rename or remove all of them.</p>
<p>Here’s a plain-English summary of what the script currently does, when given a Courier maildir path as an argument:</p>
<ul>
<li>Check that the given path is indeed a valid Courier maildir, and exit if not.</li>
<li>Rename the file ‘courierimapsubscribed’ to ‘subscriptions’, and strip the ‘INBOX.’ prefix from its contents.</li>
<li>Recursively rename all of files of the name ‘courierimapuiddb’ to ‘dovecot-uidlist’.</li>
<li>Recursively delete all of files of the name ‘courierimaphieracl’, ‘courierimapacl’ and ‘courierimapkeywords’.</li>
</ul>
<p>The script will also verbosely print out each action it performs, handy for redirecting the output to a log file for a large migration.</p>
<p>Hopefully people about to jump ship from Courier to Dovecot find this useful. If anyone comes up with improvements to the script, please send them my way.</p>
<pre>
#!/bin/sh
#
# courier2dovecot -- Converts a Courier maildir to Dovecot format.
# Copyright (c) 2005 Arto Bendiken. Released under the GNU GPL.
# Newest version available from http://bendiken.net/scripts/
#
# 2005-10-21 initial version for Dovecot 1.0.
#
dir="$1"
if [ -z "$dir" ] || [ "$dir" = "-?" ] || [ "$dir" = "-h" ] || [ "$dir" = "--help" ]; then
  echo "Usage: $0 maildirpath"
  exit 1
fi
if [ ! -d "$dir" ] || [ ! -e "$dir/courierimapsubscribed" ]; then
  echo "$dir is not a path to a Courier maildir"
  exit 1
fi
find $dir -name courierimapsubscribed -print0 | xargs -0r rename -v 's/courierimapsubscribed/subscriptions/'
find $dir -name subscriptions -print0 | xargs -0r sed -i 's/INBOX\.//'
find $dir -name courierimapuiddb -print0 | xargs -0r rename -v 's/courierimapuiddb/dovecot-uidlist/'
find $dir -name courierimaphieracl -print0 | xargs -0r rm -vrf
find $dir -name courierimapacl -print0 | xargs -0r rm -vf
find $dir -name courierimapkeywords -print0 | xargs -0r rm -vrf</pre>
<p><strong>Comment to the script:</strong><br />
Hey Arto &amp; everyone using this script:</p>
<p>Be careful when trying to run this on <strong>Red Hat Enterprise Linux</strong> or <strong>CentOS 4</strong> systems. These operating systems ship with a different rename command than the Debian systems. You can also tell them apart based on the output when running ‘rename’ with no arguments.</p>
<p>This is the perl version which works:<br />
<code>Usage: rename [-v] [-n] [-f] perlexpr [filenames]</code></p>
<p>This is the RHEL/CentOS version that doesn’t:<br />
<code>call: rename.orig from to files…</code></p>
<p>Hope this helps someone out there, and thanks for the script Arto!</p>
<p>Source: <a href="http://bendiken.net/2005/11/03/courier-imap-to-dovecot-migration-script">http://bendiken.net/2005/11/03/courier-imap-to-dovecot-migration-script</a></p>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/www.dovecot.org\/","http:\/\/wiki.dovecot.org\/","http:\/\/en.wikipedia.org\/wiki\/Maildir","http:\/\/bendiken.net\/2005\/11\/03\/courier-imap-to-dovecot-migration-script"];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMDUvMTcvY291cmllci1pbWFwLXRvLWRvdmVjb3QtbWlncmF0aW9uLXNjcmlwdC88d3B0Yj5Db3VyaWVyLUlNQVAgdG8gRG92ZWNvdCBNaWdyYXRpb24gU2NyaXB0PHdwdGI%2BaHR0cDovL3BhcmlvLm5vPHdwdGI%2BUGFyaW8gVGVjaG5vQmxvYg%3D%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/05/17/courier-imap-to-dovecot-migration-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

