<?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>Linux for Fun</title>
	<atom:link href="http://linuxforfun.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxforfun.net</link>
	<description>Just for Fun</description>
	<lastBuildDate>Tue, 15 Sep 2009 00:12:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Firefox flash plugin: no sound</title>
		<link>http://linuxforfun.net/2008/08/04/firefox-flash-no-sound/</link>
		<comments>http://linuxforfun.net/2008/08/04/firefox-flash-no-sound/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 07:36:03 +0000</pubDate>
		<dc:creator>sandajian</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://linuxforfun.net/?p=17</guid>
		<description><![CDATA[If you can not hear any sound when playing flash video in Firefox, It&#8217;s probably because that you hasn&#8217;t installed the package &#8216;libflashsupport&#8217;.  To solve it, just install that package and restart Firefox.
For Fedora, you may use the command
# yum install libflashsupport
]]></description>
			<content:encoded><![CDATA[<p>If you can not hear any sound when playing flash video in Firefox, It&#8217;s probably because that you hasn&#8217;t installed the package &#8216;libflashsupport&#8217;.  To solve it, just install that package and restart Firefox.</p>
<p>For Fedora, you may use the command</p>
<blockquote><p># yum install libflashsupport</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://linuxforfun.net/2008/08/04/firefox-flash-no-sound/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using `cvsd&#8217; to setup cvs pserver</title>
		<link>http://linuxforfun.net/2008/04/27/cvsd-setup-cvs-pserver/</link>
		<comments>http://linuxforfun.net/2008/04/27/cvsd-setup-cvs-pserver/#comments</comments>
		<pubDate>Sun, 27 Apr 2008 12:00:52 +0000</pubDate>
		<dc:creator>sandajian</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[cvs]]></category>
		<category><![CDATA[cvsd]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://linuxforfun.net/?p=16</guid>
		<description><![CDATA[CVS was designed to use `xinetd&#8217; to startup service.  But now most Linux distributions do not install xinetd by default, and configuration of CVS is somewhat complicated. `cvsd&#8216; is a wrapper program for CVS in pserver mode, it can startup CVS as a standalone daemon, under a special uid/gid in a chroot jail.  [...]]]></description>
			<content:encoded><![CDATA[<p>CVS was designed to use `xinetd&#8217; to startup service.  But now most Linux distributions do not install xinetd by default, and configuration of CVS is somewhat complicated. `<a href="http://ch.tudelft.nl/~arthur/cvsd/">cvsd</a>&#8216; is a wrapper program for CVS in pserver mode, it can startup CVS as a standalone daemon, under a special uid/gid in a chroot jail.  It is relatively easy to use cvsd and its configuration file to setup CVS repositories.</p>
<p>In this article, I will describe how to setup a cvs pserver step by step.</p>
<p><strong>1. Installation of cvsd package</strong></p>
<p>For RPM-based distributions, you may download precompiled RPMS from this site:</p>
<blockquote><p><a href="http://linuxforfun.net/misc/cvsd-1.0.14-1.i386.rpm">cvsd-1.0.14-1.i386.rpm</a><br />
<a href="http://linuxforfun.net/misc/cvsd-1.0.14-1.src.rpm">cvsd-1.0.14-1.src.rpm</a> (source)</p></blockquote>
<p>For other distributions, you may download source tarball <a href="http://ch.tudelft.nl/~arthur/cvsd/downloads.html">here</a>, compile and install it yourself.</p>
<p><span id="more-16"></span></p>
<p><strong>2. Configuration file /etc/cvsd/cvsd.conf</strong></p>
<p>Check cvsd&#8217;s configuration file /etc/cvsd/cvsd.conf.   Something should be mentioned:</p>
<ul>
<li>RootJail: the location of the chroot jail cvs should be run in.  The default value should like<br />
<blockquote><p><code>RootJail /var/lib/cvsd</code></p></blockquote>
<p>For RPM-based installation, the installation process should have initialized this directory for you, by the command</p>
<blockquote><p><code># cvsd-buildroot /var/lib/cvsd</code></p></blockquote>
<p>If the directory is not initialized yet, or you change `RootJail&#8217; to another directory, you need to use the command `cvsd-buildroot&#8217; to initialize it by hand.</li>
<li>Uid and Gid: the user and group cvsd should be run as.  The default values:<br />
<blockquote><p><code>Uid cvsd<br />
Gid cvsd</code></p></blockquote>
<p>For non-RPM based installation, you need to create them by hand.</li>
<li>Repos: paths to repositories, one repository per line. Every path is relative to RootJail and begins with a `/&#8217;.  For example:<br />
<blockquote><p><code>Repos /coolsoft<br />
Repos /hotsoft</code></p></blockquote>
</li>
</ul>
<p><strong>3. Creation of repositories</strong></p>
<p>To create a repository, for example, `coolsoft&#8217;, use the command:</p>
<blockquote><p><code># cvs -d /var/lib/cvsd/coolsoft init</code></p></blockquote>
<p>The command will create a directory /var/lib/cvsd/coolsoft and a CVSROOT tree in it.</p>
<p>If you allow users to create top level directories in this repository:</p>
<blockquote><p><code># chown cvsd:cvsd /var/lib/cvsd/coolsoft</code></p></blockquote>
<p>Edit the file <code>/var/lib/cvsd/coolsoft/CVSROOT/config</code> and modify the `LockDir&#8217; option:</p>
<blockquote><p><code>LockDir /tmp/coolsoft</code></p></blockquote>
<p>The directory is relative to `RootJail&#8217;, /var/lib/cvsd. Create the directory:</p>
<blockquote><p><code># mkdir /var/lib/cvsd/tmp/coolsoft<br />
# chown cvsd:cvsd /var/lib/cvsd/tmp/coolsoft</code></p></blockquote>
<p>Now create users that can access this repository and set the passwords:</p>
<blockquote><p><code># cvsd-passwd /var/lib/cvsd/coolsoft jack</code></p></blockquote>
<p>If you want anonymous access to your repository, create a user named `anonymous&#8217; or `anoncvs&#8217;, and leave the password blank:</p>
<blockquote><p><code># cvsd-passwd /var/lib/cvsd/coolsoft anoncvs</code></p></blockquote>
<p>Create a new file <code>/var/lib/cvsd/coolsoft/CVSROOT/writers</code>:</p>
<blockquote><p><code># touch /var/lib/cvsd/coolsoft/CVSROOT/writers</code></p></blockquote>
<p>to protect write access to the repository.  Without this file, all users have write access!  Add users you want write access to this file, one user per line.</p>
<p>Optional, create top level directories in your repository that will hold files committed:</p>
<blockquote><p><code># cd /var/lib/cvsd/coolsoft<br />
# mkdir client server<br />
# chown cvsd:cvsd client server</code></p></blockquote>
<p><strong>4. Startup cvsd and test your repositories</strong></p>
<p>To startup cvsd, use the command</p>
<blockquote><p><code># /etc/init.d/cvsd start</code></p></blockquote>
<p>To test the new repository:</p>
<blockquote><p><code># cvs -d :pserver:jack@myhost.at.office/coolsoft login<br />
# cvs -d :pserver:jack@myhost.at.office/coolsoft co client</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://linuxforfun.net/2008/04/27/cvsd-setup-cvs-pserver/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Setup of VSFTPD &#8211; another approach</title>
		<link>http://linuxforfun.net/2008/04/15/vsftpd-virtual-users-another-approach/</link>
		<comments>http://linuxforfun.net/2008/04/15/vsftpd-virtual-users-another-approach/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 15:35:51 +0000</pubDate>
		<dc:creator>sandajian</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[virtual users]]></category>
		<category><![CDATA[vsftpd]]></category>

		<guid isPermaLink="false">http://linuxforfun.net/?p=15</guid>
		<description><![CDATA[If you are hosting several web sites, for security reason, you may want the webmasters to access their own files only.  One of the good way is to give them FTP access by setup of VSFTPD virtual users and directories.
In my last article, I described how to setup VSFTPD virtual users.  In this [...]]]></description>
			<content:encoded><![CDATA[<p>If you are hosting several web sites, for security reason, you may want the webmasters to access their own files only.  One of the good way is to give them FTP access by setup of VSFTPD virtual users and directories.</p>
<p>In my <a href="http://linuxforfun/2008/04/05/vsftpd-virtual-users/" target="_blank">last article</a>, I described how to setup VSFTPD virtual users.  In this article, I will describe another approach to setup VSFTPD, it needs real users on the system.</p>
<p><strong>1. Installation of VSFTPD</strong></p>
<p>For Red Hat, CentOS and Fedora, you may install VSFTPD by the command</p>
<blockquote><p><code># yum install vsftpd</code></p></blockquote>
<p>For Debian and Ubuntu,</p>
<blockquote><p><code># apt-get install vsftpd</code></p></blockquote>
<p><span id="more-15"></span><strong>2. Virtual users and authentication</strong></p>
<p>We may create a real user account for each webmaster.  We will only give them FTP access to our server.</p>
<p>First, use `useradd&#8217; command to create user accounts.  Something to be specified are:</p>
<ul>
<li><strong>group</strong>: we may specify the group of users to the group HTTP server runs as.  In most cases, it is `apache&#8217; for Apache HTTP Server, it is `lighttpd&#8217; for lighttpd.</li>
<li><strong>home directory</strong>: we should also specify users&#8217; home directories to their virtual hosts&#8217; DocumentRoot.  We should also make these directories writable by HTTP server.</li>
<li><strong>login shell</strong>: in order to disallow normal login for these FTP users, we should specify their login shell to `/sbin/nologin&#8217;.</li>
</ul>
<p>For example:</p>
<blockquote><p><code># useradd -g apache -d /var/www/vhosts/mike -s /sbin/nologin mike<br />
# chmod g+w /var/www/vhosts/mike<br />
# passwd mike<br />
Changing password for user mike.<br />
New UNIX password:<br />
Retype new UNIX password:<br />
passwd: all authentication tokens updated successfully.</code></p></blockquote>
<p><strong>3. Configuration of VSFTPD</strong></p>
<p>Create a configuration file /etc/vsftpd/vsftpd-virtual.conf,</p>
<blockquote><p><code># disables anonymous FTP<br />
anonymous_enable=NO<br />
# enables non-anonymous FTP<br />
local_enable=YES<br />
# enables uploads and new directories<br />
write_enable=YES<br />
# authentication of virtual uses<br />
pam_service_name=login<br />
# the virtual user is restricted to the virtual FTP area<br />
chroot_local_user=YES<br />
# runs vsftpd in standalone mode<br />
listen=YES<br />
# listens on this port for incoming FTP connections<br />
listen_port=60021<br />
# the minimum port to allocate for PASV style data connections<br />
pasv_min_port=62222<br />
# the maximum port to allocate for PASV style data connections<br />
pasv_max_port=63333<br />
# controls whether PORT style data connections use port 20 (ftp-data)<br />
connect_from_port_20=YES<br />
# the umask for file creation<br />
local_umask=022</code></p></blockquote>
<p><strong>4. Start VSFTPD and test</strong><br />
Now we can start VSFTPD by the command:</p>
<blockquote><p><code># /usr/sbin/vsftpd /etc/vsftpd/vsftpd-virtual.conf</code></p></blockquote>
<p>and test the FTP access of a virtual user:</p>
<blockquote><p><code># lftp -u mike -p 60021 192.168.1.101</code></p></blockquote>
<p>The virtual user should have full access to his directory.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxforfun.net/2008/04/15/vsftpd-virtual-users-another-approach/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Be Linux &#8211; Penguins Linux Ad on YouTube</title>
		<link>http://linuxforfun.net/2008/04/15/be-linux-penguins-linux-ad-on-youtube/</link>
		<comments>http://linuxforfun.net/2008/04/15/be-linux-penguins-linux-ad-on-youtube/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 03:13:03 +0000</pubDate>
		<dc:creator>sandajian</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://linuxforfun.net/?p=14</guid>
		<description><![CDATA[Be Linux.
From: kroperx
Added: April 02, 2008
A little Ad i made editing a well known video from the B B C.
Song:
Joe Bongiorno &#8211; Chasing the Wind
from Destined
(The video is adapted from http://www.youtube.com/watch?v=nrxmpihCjqw)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://linuxforfun.net/2008/04/15/be-linux-penguins-linux-ad-on-youtube/"><em>Click here to view the embedded video.</em></a></p>
<p><strong>Be Linux.</strong><br />
From: kroperx</p>
<p>Added: April 02, 2008<br />
A little Ad i made editing a well known video from the B B C.</p>
<p>Song:<br />
Joe Bongiorno &#8211; Chasing the Wind<br />
from Destined</p>
<p>(The video is adapted from http://www.youtube.com/watch?v=nrxmpihCjqw)</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxforfun.net/2008/04/15/be-linux-penguins-linux-ad-on-youtube/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup of VSFTPD virtual users</title>
		<link>http://linuxforfun.net/2008/04/05/vsftpd-virtual-users/</link>
		<comments>http://linuxforfun.net/2008/04/05/vsftpd-virtual-users/#comments</comments>
		<pubDate>Sat, 05 Apr 2008 08:12:53 +0000</pubDate>
		<dc:creator>sandajian</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[virtual users]]></category>
		<category><![CDATA[vsftpd]]></category>

		<guid isPermaLink="false">http://linuxforfun.net/2008/04/05/vsftpd-virtual-users/</guid>
		<description><![CDATA[If you are hosting several web sites, for security reason, you may want the webmasters to access their own files only.  One of the good way is to give them FTP access by setup of VSFTPD virtual users and directories.  This article describes how you can do that easily.
(See also: Setup of VSFTPD [...]]]></description>
			<content:encoded><![CDATA[<p>If you are hosting several web sites, for security reason, you may want the webmasters to access their own files only.  One of the good way is to give them FTP access by setup of VSFTPD virtual users and directories.  This article describes how you can do that easily.<br />
(See also: <a href="http://linuxforfun.net/2008/04/15/vsftpd-virtual-users-another-approach/">Setup of VSFTPD virtual users &#8211; another approach</a>)</p>
<p><strong>1. Installation of VSFTPD</strong></p>
<p>For Red Hat, CentOS and Fedora, you may install VSFTPD by the command</p>
<blockquote><p><code># yum install vsftpd</code></p></blockquote>
<p>For Debian and Ubuntu,</p>
<blockquote><p><code># apt-get install vsftpd</code></p></blockquote>
<p><span id="more-13"></span><strong>2. Virtual users and authentication</strong></p>
<p>We are going to use pam_userdb to authenticate the virtual users. This needs a username / password file in `db&#8217; format &#8211; a common database format.   We need `db_load&#8217; program.   For CentOS, Fedora, you may install the package `db4-utils&#8217;:</p>
<blockquote><p><code># yum install db4-utils</code></p></blockquote>
<p>For Ubuntu,</p>
<blockquote><p><code># apt-get install db4.2-util</code></p></blockquote>
<p>To create a `db&#8217; format file, first create a plain text file `virtual-users.txt&#8217; with the usernames and passwords on alternating lines:</p>
<blockquote><p><code>mary<br />
123456<br />
jack<br />
654321</code></p></blockquote>
<p>Then execute the following command to create the actual database:</p>
<blockquote><p><code># db_load -T -t hash -f virtual-users.txt /etc/vsftpd/virtual-users.db</code></p></blockquote>
<p>Now, create a PAM file /etc/pam.d/vsftpd-virtual which uses your database:</p>
<blockquote><p><code>auth required pam_userdb.so db=/etc/vsftpd/virtual-users<br />
account required pam_userdb.so db=/etc/vsftpd/virtual-users</code></p></blockquote>
<p><strong>3. Configuration of VSFTPD</strong></p>
<p>Create a configuration file /etc/vsftpd/vsftpd-virtual.conf,</p>
<blockquote><p><code># disables anonymous FTP<br />
anonymous_enable=NO<br />
# enables non-anonymous FTP<br />
local_enable=YES<br />
# activates virtual users<br />
guest_enable=YES<br />
# virtual users to use local privs, not anon privs<br />
virtual_use_local_privs=YES<br />
# enables uploads and new directories<br />
write_enable=YES<br />
# the PAM file used by authentication of virtual uses<br />
pam_service_name=vsftpd-virtual<br />
# in conjunction with 'local_root',<br />
# specifies a home directory for each virtual user<br />
user_sub_token=$USER<br />
local_root=/var/www/virtual/$USER<br />
# the virtual user is restricted to the virtual FTP area<br />
chroot_local_user=YES<br />
# hides the FTP server user IDs and just display "ftp" in directory listings<br />
hide_ids=YES<br />
# runs vsftpd in standalone mode<br />
listen=YES<br />
# listens on this port for incoming FTP connections<br />
listen_port=60021<br />
# the minimum port to allocate for PASV style data connections<br />
pasv_min_port=62222<br />
# the maximum port to allocate for PASV style data connections<br />
pasv_max_port=63333<br />
# controls whether PORT style data connections use port 20 (ftp-data)<br />
connect_from_port_20=YES<br />
# the umask for file creation<br />
local_umask=022</code></p></blockquote>
<p><strong>4. Creation of home directories</strong></p>
<p>Create each user&#8217;s home directory in /var/www/virtual, and change the owner of the directory to the user `ftp&#8217;:</p>
<blockquote><p><code># mkdir /var/www/virtual/mary<br />
# chown ftp:ftp /var/www/virtual/mary</code></p></blockquote>
<p><strong>5. Startup of VSFTPD and test</strong><br />
Now we can start VSFTPD by the command:</p>
<blockquote><p><code># /usr/sbin/vsftpd /etc/vsftpd/vsftpd-virtual.conf</code></p></blockquote>
<p>and test the FTP access of a virtual user:</p>
<blockquote><p><code># lftp -u mary -p 60021 192.168.1.101</code></p></blockquote>
<p>The virtual user should have full access to his directory.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxforfun.net/2008/04/05/vsftpd-virtual-users/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Method to solve `Downloading bookmarks &#8230;&#8217; problem</title>
		<link>http://linuxforfun.net/2008/03/15/google-toolbar-bookmarks/</link>
		<comments>http://linuxforfun.net/2008/03/15/google-toolbar-bookmarks/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 09:07:28 +0000</pubDate>
		<dc:creator>sandajian</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[bookmarks]]></category>
		<category><![CDATA[toolbar]]></category>

		<guid isPermaLink="false">http://linuxforfun.net/2008/03/15/google-toolbar-bookmarks/</guid>
		<description><![CDATA[I am migrating to `Google bookmarks&#8217;, but the button on Google Toolbar always says `Downloading bookmarks &#8230;&#8217;.  But in Windows, Google Toolbar in Firefox can import, download, add bookmarks normally.  What&#8217;s different in Linux?
After googling for some time, I realize that it is due to lack of the library `libstdc++.so.5&#8242;.  This is [...]]]></description>
			<content:encoded><![CDATA[<p>I am migrating to `Google bookmarks&#8217;, but the button on Google Toolbar always says `Downloading bookmarks &#8230;&#8217;.  But in Windows, Google Toolbar in Firefox can import, download, add bookmarks normally.  What&#8217;s different in Linux?</p>
<p>After googling for some time, I realize that it is due to lack of the library `libstdc++.so.5&#8242;.  This is one of the old versions of C++ libraries, most of current Linux distributions do not install this library by default.  The method to solve &#8216;Downloading bookmarks&#8217; problem is:</p>
<p>1. Install the package that contains libstdc++.so.5.   For Fedora 8:</p>
<blockquote><p><code># yum install compat-libstdc++-33</code></p></blockquote>
<p>For Ubuntu:</p>
<blockquote><p><code># sudo apt-get install libstdc++5</code></p></blockquote>
<p>For other distributions, you should install the corresponding packages.</p>
<p>2. Exit Firefox, restart Firefox, <strong>re-install Google Toolbar</strong>.  This is very important, or else the problem will not be solved!</p>
<p>3. Restart Firefox.  Now you can see all your bookmarks in your Google toolbar!</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxforfun.net/2008/03/15/google-toolbar-bookmarks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installation of CentOS on a server with a SmartRAID V controller</title>
		<link>http://linuxforfun.net/2008/03/04/smartraid-centos/</link>
		<comments>http://linuxforfun.net/2008/03/04/smartraid-centos/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 06:37:31 +0000</pubDate>
		<dc:creator>sandajian</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[drivers]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[SmartRAID V]]></category>

		<guid isPermaLink="false">http://linuxforfun.net/2008/03/04/installation-of-centos-51-on-an-old-machine-with-a-smartraid-v-controller/</guid>
		<description><![CDATA[We are going to reinstall Linux on an old server with a SmartRAID V controller.  Since CentOS can be updated easily using &#8216;yum&#8217;, we decide to use CentOS 5.1.  There are some difficulties in installation, but we can bypass them and accomplish it successfully.
The basic parameters of the old server:

2 x Intel(R) Xeon(TM) [...]]]></description>
			<content:encoded><![CDATA[<p>We are going to reinstall Linux on an old server with a SmartRAID V controller.  Since CentOS can be updated easily using &#8216;yum&#8217;, we decide to use CentOS 5.1.  There are some difficulties in installation, but we can bypass them and accomplish it successfully.</p>
<p>The basic parameters of the old server:</p>
<ul>
<li>2 x Intel(R) Xeon(TM) CPU 2.40GHz</li>
<li>4G Memory</li>
<li>Adaptec (formerly DPT) SmartRAID V Controller</li>
<li>6x 36704 MB SCSI disks</li>
<li>Intel Corporation 82545EM Gigabit Ethernet Controller</li>
<li>ATAPI 52X CD-ROM drive</li>
</ul>
<p>The main points of installation are described below:</p>
<p><span id="more-11"></span><strong>0. Make a RAID5 array </strong></p>
<p>Before installation, we use SmartRAID Storage Manager to make a RAID5 array using 5 SCSI disks, and leave 1 SCSI disk as HotSpare.</p>
<p><strong>1. Choose installation media</strong></p>
<p>We have downloaded a Centos 5.1 DVD ISO.  But the machine has no DVD-ROM.  We make a USB boot disk using images/diskboot.img, but the server can&#8217;t boot.  We have to burn a bootable CD-ROM using images/boot.iso.  On the other Linux machine, we mount CentOS 5.1 DVD ISO under a directory of the Apache HTTP server.  We will boot the machine by the bootable CD-ROM and choose HTTP installation media.</p>
<p><strong>2. Boot, load RAID drivers</strong></p>
<p>Boot the machine, choose HTTP installation media, configure network parameters and HTTP server addresses.  The installation process now enters the graphical interface.  But if we click &#8216;Next&#8217; on the screen now, the installation process will not recognize any hard disks.  This is because: <strong>CentOS does not put SmartRAID V drivers into the kernel used in installation process.</strong></p>
<p>The method to solve this problem is: on the other Linux machine, unpack CentOS/kernel-2.6.18-53.el5.i686.rpm, copy the following two drivers</p>
<blockquote><p><code>/lib/modules/2.6.18-53.el5/kernel/drivers/message/i2o/i2o_block.ko<br />
/lib/modules/2.6.18-53.el5/kernel/drivers/message/i2o/i2o_scsi.ko</code></p></blockquote>
<p>to some directory of the Apache HTTP server so that the machine can see them through HTTP.</p>
<p>Then, in the graphical interface of installation, press Ctrl-Alt-F2 to switch to command line, use &#8216;wget&#8217; to get the above two drivers, execute the commands:</p>
<blockquote><p><code># insmod i2o_block.ko<br />
# insmod i2o_scsi.ko</code></p></blockquote>
<p>It may cause some minutes when loading i2o_scsi.ko.</p>
<p>After that, press Ctrl-Alt-F6 to switch back to the graphical interface, click &#8216;Next&#8217; to proceed.  A popup may appear, which says something like:</p>
<blockquote><p>Error opening /dev/sda: No such device or address</p></blockquote>
<p>Don&#8217;t care, click &#8216;Cancel&#8217; to ignore it.  At this time, the installation process will recognize the RAID5 array as /dev/i2o/hda successfully.  We can follow normal steps to install the OS itself.</p>
<p>(In the partitioning step, using LVM may cause trouble &#8211; after installation, the boot process of the new system will be extremely slow, almost dead.  We don&#8217;t know the reason yet.  After times of failure, we choose to create custom layout, do not use LVM, the boot process afterwards goes smoothly.)</p>
<p><strong>3. Make initrd</strong></p>
<p>After all packages are installed, do not click &#8216;Reboot&#8217; right now.  Since <strong>&#8216;i2o_block.ko&#8217; and &#8216;i2o_scsi.ko&#8217; are not included in the default kernel&#8217;s initrd file</strong>, the boot prcess will not recognize our RAID5 array.</p>
<p>At the last stage of the graphical interface of installation, press Ctrl-Alt-F2 to switch to command line, execute the commands:</p>
<blockquote><p><code># chroot /mnt/sysimage /bin/bash<br />
# /sbin/mkinitrd -f --preload=i2o_block --preload=i2o_scsi  /boot/initrd-2.6.18-53.el5PAE.img  2.6.18-53.el5PAE<br />
# exit</code></p></blockquote>
<p>Then, press Ctrl-Alt-F6 to switch back to the graphical interface, click &#8216;Reboot&#8217; to reboot the system.</p>
<p>Every time we upgrade the kernel, we should execute the &#8216;mkinitrd&#8217; command to rebuild the initrd file, including &#8216;i2o_block&#8217; and &#8216;i2o_scsi&#8217; modules in it.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxforfun.net/2008/03/04/smartraid-centos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQL live backup using replication</title>
		<link>http://linuxforfun.net/2008/01/07/mysql-live-backup/</link>
		<comments>http://linuxforfun.net/2008/01/07/mysql-live-backup/#comments</comments>
		<pubDate>Mon, 07 Jan 2008 09:09:59 +0000</pubDate>
		<dc:creator>sandajian</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[replication]]></category>

		<guid isPermaLink="false">http://linuxforfun.net/2008/01/07/mysql-live-backup-using-replication/</guid>
		<description><![CDATA[Assume that you have a website using MySQL as its database. You want to make a live backup of your database on another machine, so that if your host machine encounters a hardware failure, you can recover your web service ASAP. MySQL replication provides a simple way to do that.
First, you should prepare your backup [...]]]></description>
			<content:encoded><![CDATA[<p>Assume that you have a website using MySQL as its database. You want to make a live backup of your database on another machine, so that if your host machine encounters a hardware failure, you can recover your web service ASAP. MySQL replication provides a simple way to do that.</p>
<p>First, you should prepare your backup machine:</p>
<ul>
<li>it is &#8216;closed&#8217; to your host machine, in the meaning that data transfer speed is fast between them.</li>
<li>it is installed MySQL, the major version should be the same as MySQL on the host machine, ie, both are MySQL 5.x.x, or both are MySQL 4.x.x.</li>
</ul>
<p>Assume that your host machine&#8217;s IP is 192.168.1.111, your backup machine&#8217;s IP is 192.168.2.222.</p>
<p><span id="more-9"></span><br />
<strong>On the host machine:</strong></p>
<p>add the following lines to &#8216;[mysqld]&#8216; section of your my.cnf:</p>
<blockquote><p>server-id=1<br />
log-bin=mysql-bin<br />
binlog-do-db=myblog</p></blockquote>
<p>If you want the host machine as the replication of the backup machine too, add the following lines in my.cnf:</p>
<blockquote><p>master-host=192.168.2.222<br />
master-user=backup<br />
master-password=backup<br />
master-port=3306<br />
master-connect-retry=10<br />
replicate-do-db=myblog<br />
relay-log=relay-bin</p>
<p># important: in multi-master replication,<br />
# add the following 2 lines to avoid conflicting `AUTO_INCREMENT&#8217; values<br />
auto_increment_increment=2<br />
auto_increment_offset=1</p></blockquote>
<p>Note: &#8216;binlog-do-db&#8217; and &#8216;replicate-do-db&#8217; specify the database you want to replicate. If you want to replicate multiple databases, just write multiple lines, one database per line.</p>
<p>Add an account on your MySQL server:</p>
<blockquote><p>GRANT FILE,REPLICATION SLAVE,REPLICATION CLIENT,SUPER ON *.* TO backup@&#8217;192.168.2.222&#8242; IDENTIFIED by &#8216;backup&#8217;;</p></blockquote>
<p><strong>On the backup machine:</strong></p>
<p>add the following lines to &#8216;[mysqld]&#8216; section of your my.cnf:</p>
<blockquote><p>server-id=2<br />
master-host=192.168.1.111<br />
master-user=backup<br />
master-password=backup<br />
master-port=3306<br />
master-connect-retry=10<br />
replicate-do-db=myblog<br />
relay-log=relay-bin</p></blockquote>
<p>If you want dual-direction backup, add the following lines to my.cnf:</p>
<blockquote><p>log-bin=mysql-bin<br />
binlog-do-db=myblog</p>
<p># important: in multi-master replication,<br />
# add the following 2 lines to avoid conflicting `AUTO_INCREMENT&#8217; values<br />
auto_increment_increment=2<br />
auto_increment_offset=2</p></blockquote>
<p>Add an account on your MySQL server:</p>
<blockquote><p>GRANT FILE,REPLICATION SLAVE,REPLICATION CLIENT,SUPER ON *.* TO backup@&#8217;192.168.1.111&#8242; IDENTIFIED by &#8216;backup&#8217;;</p></blockquote>
<p>Now, shutdown MySQL servers on both machines. Copy all databases you need to replicate from the host machine to the backup machine. Then startup MySQL servers on both machines. Examine your mysqld.log for possible errors. Test the replication using some simple SQLs, for example, create a simple table.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxforfun.net/2008/01/07/mysql-live-backup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gentoo has no newsletters for several weeks</title>
		<link>http://linuxforfun.net/2007/12/08/gentoo-no-newsletters/</link>
		<comments>http://linuxforfun.net/2007/12/08/gentoo-no-newsletters/#comments</comments>
		<pubDate>Sat, 08 Dec 2007 03:14:53 +0000</pubDate>
		<dc:creator>sandajian</dc:creator>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[newsletter]]></category>

		<guid isPermaLink="false">http://linuxforfun.net/wordpress-mu/2007/12/08/gentoo-has-no-newsletters-for-several-weeks/</guid>
		<description><![CDATA[Since the last release of Gentoo Weekly Newsletter (GWN), which is dated October 15, 2007, Gentoo hasn&#8217;t released any newsletters for nearly two months.  It is a strange thing.  What happened to Gentoo?
Gentoo Linux is a distribution I like very much.  It gives me an opportunity to fully control my system.  [...]]]></description>
			<content:encoded><![CDATA[<p>Since the last release of Gentoo Weekly Newsletter (GWN), which is dated October 15, 2007, Gentoo hasn&#8217;t released any newsletters for nearly two months.  It is a strange thing.  What happened to Gentoo?</p>
<p>Gentoo Linux is a distribution I like very much.  It gives me an opportunity to fully control my system.  Wish everything is OK for Gentoo!</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxforfun.net/2007/12/08/gentoo-no-newsletters/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A shell script to convert APE/FLAC to mp3</title>
		<link>http://linuxforfun.net/2007/12/06/ape2mp3/</link>
		<comments>http://linuxforfun.net/2007/12/06/ape2mp3/#comments</comments>
		<pubDate>Thu, 06 Dec 2007 08:46:51 +0000</pubDate>
		<dc:creator>sandajian</dc:creator>
				<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[ape]]></category>
		<category><![CDATA[ape2mp3]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[converter]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[flac]]></category>
		<category><![CDATA[monkey]]></category>
		<category><![CDATA[mp3]]></category>

		<guid isPermaLink="false">http://linuxforfun.net/wordpress-mu/2007/12/06/a-shell-script-to-convert-apeflac-to-mp3/</guid>
		<description><![CDATA[There is a shell script that can convert a big APE/FLAC file to mp3 files easily. The author of the script is not clear, the script just says: Brian&#8217;s Archive CUE/FLAC Splitter v0.1, No sanity checking in place. Be careful.
Download the script &#8216;ape2mp3&#8242;.  The original script has been slightly modified to be used with [...]]]></description>
			<content:encoded><![CDATA[<p>There is a shell script that can convert a big APE/FLAC file to mp3 files easily. The author of the script is not clear, the script just says: <em>Brian&#8217;s Archive CUE/FLAC Splitter v0.1, No sanity checking in place. Be careful.</em></p>
<p><a href="http://linuxforfun.net/misc/ape2mp3" title="download the script 'ape2mp3'">Download the script &#8216;ape2mp3&#8242;</a>.  The original script has been slightly modified to be used with newer versions of the related software.</p>
<p>Use of the script is very simple (of course you need both the CUE file and the APE/FLAC file):</p>
<blockquote><p># ape2mp3 album.cue album.ape</p></blockquote>
<p>It requires several packages installed on your system.  For Fedora, some packages can be found at <a href="http://freshrpms.net">freshrpms.net</a>.  You may first install <a href="http://ftp.freshrpms.net/pub/freshrpms/fedora/linux/8/freshrpms-release/freshrpms-release-1.1-1.fc.noarch.rpm">freshrpms-release</a>, then use &#8216;yum&#8217; to install them.</p>
<p><span id="more-6"></span></p>
<p>1. <strong>mac</strong> &#8211; Monkey&#8217;s Audio Codec (MAC) utility and library</p>
<blockquote><p># yum install mac</p></blockquote>
<p>2. <strong>lame</strong> &#8211; LAME Ain&#8217;t an MP3 Encoder&#8230; but it&#8217;s the best of all</p>
<blockquote><p># yum install lame</p></blockquote>
<p>3. <strong>shorten</strong> &#8211; Low complexity and fast waveform coder</p>
<blockquote><p># rpm -ivh <a href="http://linuxforfun.net/misc/shorten-3.6.0-1.2.i386.rpm">shorten-3.6.0-1.2.i386.rpm</a><br />
(src: <a href="http://linuxforfun.net/misc/shorten-3.6.0-1.2.src.rpm">shorten-3.6.0-1.2.src.rpm</a>)</p></blockquote>
<p>4. <strong>shntool</strong> &#8211; Multi-purpose WAVE data processing and reporting utility</p>
<blockquote><p># rpm -ivh <a href="http://linuxforfun.net/misc/shntool-3.0.6-1.i386.rpm">shntool-3.0.6-1.i386.rpm</a><br />
(src: <a href="http://linuxforfun.net/misc/shntool-3.0.6-1.src.rpm">shntool-3.0.6-1.src.rpm</a>)</p></blockquote>
<p>5. <strong>cuetools</strong> &#8211; Utilities to works with cue and TOC files</p>
<blockquote><p># rpm -ivh <a href="http://linuxforfun.net/misc/cuetools-1.3.1-2.i386.rpm">cuetools-1.3.1-2.i386.rpm</a><br />
(src: <a href="http://linuxforfun.net/misc/cuetools-1.3.1-2.src.rpm">cuetools-1.3.1-2.src.rpm</a>)</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://linuxforfun.net/2007/12/06/ape2mp3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
