<?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>Free Linux Tutorials &#187; Quick Tips &amp; Tricks</title>
	<atom:link href="http://www.freelinuxtutorials.com/category/quick-tips-and-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.freelinuxtutorials.com</link>
	<description>/var/net/sys/admin/blog</description>
	<lastBuildDate>Wed, 09 Nov 2011 13:26:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Configure Postfix to use Gmail in RHEL/CentOS</title>
		<link>http://www.freelinuxtutorials.com/quick-tips-and-tricks/configure-postfix-to-use-gmail-in-rhelcentos/</link>
		<comments>http://www.freelinuxtutorials.com/quick-tips-and-tricks/configure-postfix-to-use-gmail-in-rhelcentos/#comments</comments>
		<pubDate>Mon, 03 May 2010 10:21:53 +0000</pubDate>
		<dc:creator>tux</dc:creator>
				<category><![CDATA[Quick Tips & Tricks]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[starttls]]></category>

		<guid isPermaLink="false">http://www.freelinuxtutorials.com/?p=344</guid>
		<description><![CDATA[Relaying to Gmail via smtp.gmail.com can be accomplished by configuring your Postfix with SASL authentication and TLS encryption. The common errors you will encounter if sending from your postfix mail server failing to gmail.com domain but works in other domains are: @/var/log/maillog -Must issue a STARTTLS command first -certificate verification failed for gmail.com:unable to get [...]]]></description>
			<content:encoded><![CDATA[<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="medium" count="" href="http://www.freelinuxtutorials.com/quick-tips-and-tricks/configure-postfix-to-use-gmail-in-rhelcentos/"></g:plusone></div><p>Relaying to Gmail via smtp.gmail.com can be accomplished by configuring your Postfix with SASL authentication and TLS encryption.</p>
<p>The common errors you will encounter if sending from your postfix mail server failing to gmail.com domain but works in other domains are:</p>
<p>@/var/log/maillog<br />
-Must issue a STARTTLS command first<br />
-certificate verification failed for gmail.com:unable to get local issuer certificate<br />
-Authentication Required. Learn more at 530 5.5.1 http://mail.google.com/support/bin/answer.py?</p>
<p>How to fix?</p>
<p>Assuming you already installed Postfix and everything works fine except sending to gmail smtps, here are the steps to follow:</p>
<p>1. Configure Postfix main configuration</p>
<p>a.vi /etc/postfix/main.cf</p>
<p>b. Add these lines:</p>
<p>smtp_sasl_security_options = noanonymous<br />
relayhost = [smtp.gmail.com]:587<br />
smtp_use_tls = yes<br />
smtp_tls_CAfile = /etc/postfix/cacert.pem<br />
smtp_sasl_auth_enable = yes<br />
smtp_sasl_password_maps = hash:/etc/postfix/sasl/passwd</p>
<p>c. Save and exit</p>
<p>2. Create /etc/postfix/sasl/passwd</p>
<p>a. Create a directory sasl under /etc/postfix and create a file passwd with contents below:</p>
<p>[smtp.gmail.com]:587 username@gmail.com:password</p>
<p>Save and exit</p>
<p>b. Change permission<br />
#chmod 600 /etc/postfix/sasl/passwd</p>
<p>c. Create lookup table via postmap<br />
#postmap /etc/postfix/sasl/passwd</p>
<p>Issuing that command will create passwd.db</p>
<p>3. Generate your own CA certificate</p>
<p>a. Change directory to /etc/pki/tls/certs</p>
<p>#cd /etc/pki/tls/certs</p>
<p>b.Create a key and test certificate in one file</p>
<p>#make hostname.pem</p>
<p>You will something like</p>
<p>[root@FLT certs]# make hostname.pem<br />
umask 77 ; \<br />
PEM1=`/bin/mktemp /tmp/openssl.XXXXXX` ; \<br />
PEM2=`/bin/mktemp /tmp/openssl.XXXXXX` ; \<br />
/usr/bin/openssl req -utf8 -newkey rsa:1024 -keyout $PEM1 -nodes -x509 -days 365 -out $PEM2 -set_serial 0 ; \<br />
cat $PEM1 &gt;  hostname.pem ; \<br />
echo &#8220;&#8221;    &gt;&gt; hostname.pem ; \<br />
cat $PEM2 &gt;&gt; hostname.pem ; \<br />
rm -f $PEM1 $PEM2<br />
Generating a 1024 bit RSA private key<br />
&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.++++++<br />
&#8230;..++++++<br />
writing new private key to &#8216;/tmp/openssl.z12084&#8242;<br />
&#8212;&#8211;<br />
You are about to be asked to enter information that will be incorporated<br />
into your certificate request.<br />
What you are about to enter is what is called a Distinguished Name or a DN.<br />
There are quite a few fields but you can leave some blank<br />
For some fields there will be a default value,<br />
If you enter &#8216;.&#8217;, the field will be left blank.<br />
&#8212;&#8211;<br />
Country Name (2 letter code) [GB]:<br />
State or Province Name (full name) [Berkshire]:<br />
Locality Name (eg, city) [Newbury]:<br />
Organization Name (eg, company) [My Company Ltd]:<br />
Organizational Unit Name (eg, section) []:<br />
Common Name (eg, your name or your server&#8217;s hostname) []:<br />
Email Address []:</p>
<p>c. Fill-up the necessary information and copy the file on /etc/postfix as cacert.pem</p>
<p>#cp /etc/pki/tls/certs/hostname.pem /etc/postfix/cacert.pem</p>
<p>4. Restart the postfix service</p>
<p>#service postfix restart<br />
5. Inspect now your postfix logs to see if it can send out mails now to gmail servers</p>
<p>A successful message states something like<br />
May  3 17:35:00 FLT postfix/smtp[28244]: 0ABB61CE32A: to=&lt;freelinuxtutorials@gmail.com&gt;, relay=smtp.gmail.com[74.125.93.109]:587, delay=5, delays=0.41/0.02/2.7/1.8, dsn=2.0.0, status=sent (250 2.0.0 OK 1272879300 8sm8902550qwj.38)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.freelinuxtutorials.com/quick-tips-and-tricks/configure-postfix-to-use-gmail-in-rhelcentos/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Splitting up Apache Logs for Subdomains</title>
		<link>http://www.freelinuxtutorials.com/quick-tips-and-tricks/splitting-up-apache-logs-for-subdomains/</link>
		<comments>http://www.freelinuxtutorials.com/quick-tips-and-tricks/splitting-up-apache-logs-for-subdomains/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 07:10:30 +0000</pubDate>
		<dc:creator>tux</dc:creator>
				<category><![CDATA[Quick Tips & Tricks]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[log]]></category>

		<guid isPermaLink="false">http://www.freelinuxtutorials.com/?p=326</guid>
		<description><![CDATA[If you have multiple virtual hosts in your server and you specified different log files for each, it is more organized and easy to locate, but the downside is Linux has so called file descriptors or the number of files that it can be handle. Basically , it can be increased but I think it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="medium" count="" href="http://www.freelinuxtutorials.com/quick-tips-and-tricks/splitting-up-apache-logs-for-subdomains/"></g:plusone></div><p>If you have multiple virtual hosts in your server and you specified different log files for each, it is more organized and easy to locate, but the downside is Linux has so called file descriptors or the number of files that it can be handle. Basically , it can be increased but I think it&#8217;s not really recommended just for the sake of it.<br />
Making your apache logs more organized can be done by many ways, one way is via piped logging and use rotatelogs. And based on my tips before named<em> <a title="unlimited subdomains apache" href="../quick-tips-and-tricks/automatic-unlimited-subdomains-via-apache-mod_rewrite/" target="_blank">Automatic unlimited subdomains via Apache mod_rewrite</a></em>, one issue is the log files. But there&#8217;s one method to solve this, and this is by splitting up your log files.</p>
<p>1. Make sure your multiple virtual hosts log to the same log file.<br />
example:<br />
@ your config file</p>
<p>ErrorLog &#8220;|/usr/sbin/rotatelogs -l /var/log/httpd/linuxtutorials/error_log.%Y%m%d 86400&#8243;<br />
CustomLog logs/linuxtutorials//access_log combinedio<br />
CustomLog &#8220;|/usr/sbin/rotatelogs -l /var/log/httpd/linuxtutorials//access_log.%Y%m%d 86400&#8243; combinedio</p>
<p>2. Change your Apache LogFormat<br />
from let say:<br />
#LogFormat &#8220;%h %l %u %t \&#8221;%r\&#8221; %&gt;s %b \&#8221;%{Referer}i\&#8221; \&#8221;%{User-Agent}i\&#8221;" combined</p>
<p>to:<br />
LogFormat &#8220;%V %h %l %u %t \&#8221;%r\&#8221; %&gt;s %b \&#8221;%{Referer}i\&#8221; \&#8221;%{User-Agent}i\&#8221; \&#8221;%{HTTP_X_UP_CALLING_LINE_ID}e\&#8221; \&#8221;%{HTTP_X_WSB_IDENTITY}e\ %I %O&#8221; combinedio</p>
<p>where: (use %V or %v based on your httpd.conf setting)<br />
%V =the server name according to the UseCanonicalName setting<br />
%v=the canonical ServerName  of the server serving the request.</p>
<p>3. Split your log files into its component parts and use the perl script &#8220;split-logfile. This program can be found in the support folder of your Apache distro.</p>
<p>split-logfile &lt; /logs/access_log</p>
<p>You can create script to automate this, e.g.</p>
<p>[root@dc1 log]# cat split.sh<br />
#!/bin/bash</p>
<p>#define<br />
TODAY=`date &#8220;+%Y%m%d&#8221;`<br />
YEST=`date &#8220;+%Y%m%d&#8221; -d&#8221;1 day ago&#8221;`<br />
LOGPATH=&#8221;/var/log/httpd/linuxtutorials&#8221;<br />
ACCESSFILE=&#8221;$LOGPATH/access_log.$YEST&#8221;<br />
CURFOLDER=&#8221;/root/log&#8221;</p>
<p>#split<br />
cd $CURFOLDER<br />
/darwin/log/split-logfile &lt; $ACCESSFILE<br />
echo $ACCESSFILE<br />
#rename<br />
/usr/bin/rename log log.$YEST *log</p>
<p>-&gt; This script basically reads the rotated access log from the log path, and split the log files according to the server name</p>
<p>Sample Results</p>
<p>@original access logs</p>
<p>[root@flt log]# ls -la /var/log/httpd/linuxtutorials/<br />
total 544<br />
drwxr-xr-x 2 root root   4096 Apr 20 16:07 .<br />
drwx&#8212;&#8212; 3 root root   4096 Apr 18 04:02 ..</p>
<p>-rw-r&#8211;r&#8211; 1 root root 103090 Apr 20 16:08 access_log<br />
-rw-r&#8211;r&#8211; 1 root root  53770 Apr 13 18:11 access_log.20100420<br />
-rw-r&#8211;r&#8211; 1 root root  48660 Apr 13 18:11 access_log.20100421<br />
-rw-r&#8211;r&#8211; 1 root root    710 Apr 15 16:33 error_log.20100420<br />
-rw-r&#8211;r&#8211; 1 root root    50 Apr 15 16:33 error_log.20100421</p>
<p>@splitted log files after executing the script</p>
<p>[root@dc1 log]# ls -la /root/log<br />
total 292<br />
drwxr-xr-x 2 root root  4096 Apr 21 01:01 .<br />
drwxr-x&#8212; 8 root root  4096 Apr 13 15:56 ..<br />
-rw-r&#8211;r&#8211; 1 root root  9278 Apr 15 01:01 admin.freelinuxtutorials.com.log.20100420<br />
-rw-r&#8211;r&#8211; 1 root root   436 Apr 15 01:01 www.freelinuxtutorials.com.log.20100420<br />
-rw-r&#8211;r&#8211; 1 root root  1296 Apr 20 01:01 m.freelinuxtutorials.com.log.20100420<br />
-rw-r&#8211;r&#8211; 1 root root  6104 Apr 14 01:01 secure.freelinuxtutorials.com.log.20100420</p>
]]></content:encoded>
			<wfw:commentRss>http://www.freelinuxtutorials.com/quick-tips-and-tricks/splitting-up-apache-logs-for-subdomains/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatic unlimited subdomains via Apache mod_rewrite</title>
		<link>http://www.freelinuxtutorials.com/quick-tips-and-tricks/automatic-unlimited-subdomains-via-apache-mod_rewrite/</link>
		<comments>http://www.freelinuxtutorials.com/quick-tips-and-tricks/automatic-unlimited-subdomains-via-apache-mod_rewrite/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 08:18:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick Tips & Tricks]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[subdomains]]></category>

		<guid isPermaLink="false">http://www.freelinuxtutorials.com/?p=310</guid>
		<description><![CDATA[Wondering how blogger website gives you a subdomain from the blogspot.com domain based on  your username of your choice? Well, the concept for this tutorial is somewhat related with it on setting up unlimited subdomains. I&#8217;m not sure how do they do it because it could be done by any script, hardcoded or not, thru [...]]]></description>
			<content:encoded><![CDATA[<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="medium" count="" href="http://www.freelinuxtutorials.com/quick-tips-and-tricks/automatic-unlimited-subdomains-via-apache-mod_rewrite/"></g:plusone></div><p>Wondering how blogger website gives you a subdomain from the blogspot.com domain based on  your username of your choice? Well, the concept for this tutorial is somewhat related with it on setting up unlimited subdomains. I&#8217;m not sure how do they do it because it could be done by any script, hardcoded or not, thru static or dynamic way via database, many possibilities, and one possible way is thru URL rewriting via Apache&#8217;s mod_rewrite.</p>
<p>Requirements of this setup:</p>
<p>a. Apache 2.x or later<br />
mod_rewrite module should be enable.  To check if it&#8217;s enabled you should see this line on your httpd.conf</p>
<p><em>LoadModule rewrite_module modules/mod_rewrite.so</em></p>
<p>b<em>.</em> BIND 9.x or later<em><br />
</em>-Setting up the DNS Server is not part of this tutorial, it will be discussed on another topic.</p>
<p>Anyway to create automatic subdomains, these are the steps.</p>
<p>1. Configure your DNS server to use the wildcard (*) and points to your IP address.<br />
Assuming you already setup the zone of your domain on named.conf , something like:</p>
<p>&#8212;@named.conf&#8212;</p>
<p>zone &#8220;freelinuxtutorials.com&#8221; {<br />
type master;<br />
file &#8220;/var/named/freelinuxtutorials.com.db&#8221;;<br />
};</p>
<p>&#8212;@/var/named/freelinuxtutorials.com.db&#8212;</p>
<p>$TTL 86400<br />
@   IN  SOA freelinuxtutorials.com. root.freelinuxtutorials.com. (<br />
; dmn [flt.com] timestamp entry BEGIN.<br />
2008092901<br />
; dmn [flt.com] timestamp entry END.<br />
8H<br />
2H<br />
4W<br />
1D )<br />
IN      NS      ns.freelinuxtutorials.com.<br />
IN      NS      ns2.freelinuxtutorials.com.</p>
<p>freelinuxtutorials.com. A   192.168.1.100<br />
ns      IN  A   192.168.1.80<br />
ns2      IN  A   192.168.2.80<br />
<strong>*               IN      A       192.168.1.100</strong><br />
; sub [{SUB_NAME}] entry BEGIN.<br />
; sub [{SUB_NAME}] entry END.</p>
<p>As you can see above, 192.168.1.100 is pointed to *. Meaning if you ping any subdomains (existing or non-existing) of freelinuxtutorials.com, it will all points to the same IP address</p>
<p>2. Configure your Apache<br />
-To not really messed up your existing httpd config, is it better to create a new config and include it. Something like</p>
<p>@httpd.conf</p>
<p>Include conf.d/flt/*.conf</p>
<p>Create your virtualhost for your domain and add this rewrite rules on it.</p>
<p>#vi /etc/httpd/conf.d/flt/flt.conf</p>
<p>&lt;VirtualHost 192.168.1.100:80&gt;<br />
DocumentRoot &#8220;/var/www/html/flt/subdomains&#8221;<br />
ServerName freelinuxtutorials.com<br />
ServerAlias *.freelinuxtutorials.com<br />
&lt;Directory /var/www/html/flt/subdomains&gt;<br />
Options  Includes FollowSymLinks<br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
&lt;/Directory&gt;</p>
<p>#Rewrite Starts*<br />
RewriteEngine on<br />
RewriteCond %{HTTP_HOST} !^(www|m|secure|admin).* [NC]<br />
RewriteCond %{HTTP_HOST} ^([^\.]+)\.freelinuxtutorials\.com<br />
RewriteCond /var/www/html/flt/subdomains/%1 -d<br />
RewriteRule ^(.*) /%1/$1 [L]</p>
<p>&lt;/VirtualHost&gt;</p>
<p>*Explanation (I&#8217;ll try to explain it as easy as I can)</p>
<p>1.RewriteEngine on = tells to enable Rewrite, off to disable it<br />
2. It means only matches URLs that don&#8217;t start with www,m,secure or admin subdomains. This is important so it will not redirect to a particular directory e.g. m.freelinuxtutorials.com to /var/www/html/flt/subdomains/m/<br />
3. ^([^\.]+)\. ==&gt; these are combination of regular expression syntax of mod_rewrite, meaning<br />
^ &#8211; start of syntax<br />
. any single character<br />
(&#8230;) group section<br />
+ is added to make sure there is at least one char that matches<br />
To sum up, it denotes anything that does not have a period, example is &#8220;subdomain&#8221;<br />
4.the -d is added to checked if that directory does not actually exist<br />
5.  ^(.*) /%1/$1 ==&gt; it will take the requested path and put into a backreference, rewrite it to point to that  directory</p>
<p>%1 = subdomain<br />
$1 = path backreference, based on the Rewrite condition above<br />
L = Last Rule</p>
<p>3. Restart or Reload Apache service (depends on your distro)<br />
something like<br />
#service httpd restart<br />
or #/etc/init.d/apache2 restart</p>
<p>4. Testing<br />
Create a subdirectory named &#8220;darwin&#8221; under /var/www/html/flt/subdomains</p>
<p>#mkdir -p /var/www/html/flt/subdomains/darwin<br />
#cd /var/www/html/flt/subdomains/darwin</p>
<p>Create a sample php file<br />
#vi index.php</p>
<p>&lt;?php<br />
echo $_SERVER['SCRIPT_FILENAME'];<br />
?&gt;</p>
<p>Save and Exit</p>
<p>Access on your browser http://darwin.freelinuxtutorials.com, this should appear:</p>
<p><em>/var/www/html/flt/subdomains/darwin/index.php</em></p>
<p>That&#8217;s it. The subfolder name created on that directory will be your subdomain and will point it to that directory path.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.freelinuxtutorials.com/quick-tips-and-tricks/automatic-unlimited-subdomains-via-apache-mod_rewrite/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Repairing Mysql replication</title>
		<link>http://www.freelinuxtutorials.com/quick-tips-and-tricks/repairing-mysql-replication/</link>
		<comments>http://www.freelinuxtutorials.com/quick-tips-and-tricks/repairing-mysql-replication/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 15:45:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick Tips & Tricks]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[replication]]></category>

		<guid isPermaLink="false">http://www.freelinuxtutorials.com/?p=298</guid>
		<description><![CDATA[One of the most important procedure in setting up master-slave replication on Mysql database successfully is to have a consistent dump or backup of database(s) from the master server by locking all tables during mysqldump so write access is not possible. master log file and log position will be taken from the master and configure [...]]]></description>
			<content:encoded><![CDATA[<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="medium" count="" href="http://www.freelinuxtutorials.com/quick-tips-and-tricks/repairing-mysql-replication/"></g:plusone></div><p>One of the most important procedure in setting up master-slave replication on Mysql database successfully is to have a consistent dump or backup of database(s) from the master server by locking all tables during mysqldump so write access is not possible.</p>
<p>master log file and log position will be taken from the master and configure it on the slave server. But it&#8217;s not always good times. There are some bad times too. And one of it is sudden stop of your slave and no longer synching with the master database.</p>
<p>I&#8217;ll give you a scenario. Before the replication starts, my slave server has an existing database named &#8220;flt&#8221;. Then you setup your replication without any problems and all goes well. Then one time, somebody created a database server named &#8220;flt&#8221; on the master server with a different tables or structure. Then that might confuse now the mysql process. You can see errors like cannot create database etc..</p>
<p>Another common problem also are duplicate entries caused by inconsistent backups that was restored on the slave server.</p>
<p>To check, inspect your mysqld.logs for errors, something like</p>
<p>#less /var/log/mysqld.log</p>
<p>100318  5:34:46 [ERROR] Slave: Error &#8216;Duplicate entry &#8216;flt-2010-01-30&#8242; for key 1&#8242; on query. Default database: &#8216;fltdb&#8217;. Query: &#8216;INSERT INTO flt_tracking(keyword,requested_date,request_count,flt_id) VALUES (&#8216;flt&#8217;,&#8217;2010-01-30&#8221;)&#8217;, Error_code: 1062</p>
<p>On mysql prompt ,try to check the status of the slave by:</p>
<p>#mysql -u root -p<br />
mysql&gt; show slave status \G;</p>
<p>Slave_IO_Running: Yes<br />
Slave_SQL_Running: No</p>
<p>You will see from that the Slave_SQL_Running is set to No, indicating that the replication is broken.</p>
<p>To repair the replication, here are the steps that you can try:</p>
<p>mysql&gt; SLAVE STOP;<br />
mysql&gt;SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;<br />
mysql&gt;SLAVE START;<br />
mysql&gt;SHOW SLAVE STATUS \G</p>
<p>mysql&gt; show slave status \G<br />
*************************** 1. row ***************************<br />
Slave_IO_State: Waiting for master to send event<br />
Master_Host: 10.10.10.10<br />
Master_User: slaveuser<br />
Master_Port: 3306<br />
Connect_Retry: 60<br />
Master_Log_File: FLT-bin.000058<br />
Read_Master_Log_Pos: 470394670<br />
Relay_Log_File: mysqld-relay-bin.000004<br />
Relay_Log_Pos: 123918387<br />
Relay_Master_Log_File:FLT-bin.000058<br />
Slave_IO_Running: Yes<br />
Slave_SQL_Running: Yes<br />
Replicate_Do_DB:<br />
Replicate_Ignore_DB:<br />
Replicate_Do_Table:<br />
Replicate_Ignore_Table:<br />
Replicate_Wild_Do_Table:<br />
Replicate_Wild_Ignore_Table:<br />
Last_Errno: 0<br />
Last_Error:<br />
Skip_Counter: 0<br />
Exec_Master_Log_Pos: 123918248<br />
Relay_Log_Space: 5839136723<br />
Until_Condition: None<br />
Until_Log_File:<br />
Until_Log_Pos: 0<br />
Master_SSL_Allowed: No<br />
Master_SSL_CA_File:<br />
Master_SSL_CA_Path:<br />
Master_SSL_Cert:<br />
Master_SSL_Cipher:<br />
Master_SSL_Key:<br />
Seconds_Behind_Master:0<br />
1 row in set (0.00 sec)</p>
<p>As appeared above, Slave_IO_Running is Yes and Slave_SQL_Running is now set to Yes. Slave State is waiting for master to send Event.</p>
<p>From the mysqld log file, a similar output such as this will appear</p>
<p>100318 23:15:45 [Note] Slave SQL thread initialized, starting replication in log &#8216;FLT-bin.000058&#8242; at position 603115919, relay log &#8216;./mysqld-relay-bin.000001&#8242; position: 4<br />
100318 23:15:45 [Note] Slave I/O thread: connected to master &#8216;slaveuser@10.10.10.10:3306&#8242;,  replication started in log &#8216;FLT-bin.000051&#8242; at position 603115919</p>
<p>If you still have duplicate entries, just rerun the process. But how if are too many and doing all over again is quite stupid already. Then you have an option to put the skip errors to mysql configuration</p>
<p>on /etc/my.cnf</p>
<p>add this line under [mysqld]:</p>
<p>slave-skip-errors=1062</p>
<p>Then restart mysql.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.freelinuxtutorials.com/quick-tips-and-tricks/repairing-mysql-replication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>no wifi,looping sound,no audio,slow audio playback on ubuntu?</title>
		<link>http://www.freelinuxtutorials.com/quick-tips-and-tricks/looping-soundno-audioslow-audio-playback-on-ubuntu/</link>
		<comments>http://www.freelinuxtutorials.com/quick-tips-and-tricks/looping-soundno-audioslow-audio-playback-on-ubuntu/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 19:40:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick Tips & Tricks]]></category>
		<category><![CDATA[opensuse]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wifi]]></category>

		<guid isPermaLink="false">http://www.freelinuxtutorials.com/?p=264</guid>
		<description><![CDATA[I&#8217;ve been working with the servers most of the time, and few days ago, i had free time to test ubuntu on one of my laptop, it&#8217;s not new but not too old either, it&#8217;s dual core MSI VR320 and guess what it&#8217;s kinda frustrating to have issues on this laptop upon installing ubuntu 8.04 [...]]]></description>
			<content:encoded><![CDATA[<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="medium" count="" href="http://www.freelinuxtutorials.com/quick-tips-and-tricks/looping-soundno-audioslow-audio-playback-on-ubuntu/"></g:plusone></div><p>I&#8217;ve been working with the servers most of the time, and few days ago, i had free time to test ubuntu on one of my laptop, it&#8217;s not new but not too old either, it&#8217;s dual core MSI VR320 and guess what it&#8217;s kinda frustrating to have issues on this laptop upon installing ubuntu 8.04 and 9.04.</p>
<p>with 8.04, wifi (using WPA-PSK at home) is not working and sound is looping<br />
with 9.04, wifi is ok but audio playback is damn too slow.</p>
<p>8.04 or known as hardy heron, I have no wifi. I tried to use ndiswrapper to use my windows drivers but no avail. I have an Ralink RT61 chipset and tried installing it&#8217;s linux drivers but failed. Here&#8217;s what I did:<br />
a. download driver from ralinktech.com<br />
b. uncompress the tarball file &#8220;2005_1230_RT61_Linux_STA_Drv1.0.3.0.tar.gz&#8221;  and follow the readme for installing</p>
<pre class="alt2" style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 100px; text-align: left;" dir="ltr">$ sudo cp Makefile.6 Makefile
$ sudo make all
$ sudo mkdir /etc/Wireless/RT61STA/
$ sudo cp *.bin /etc/Wireless/RT61STA/.
$ sudo cp rt61sta.dat /etc/Wireless/RT61STA/.</pre>
<p>c. edit /etc/Wireless/RT61STA/rt61sta.dat</p>
<pre class="alt2" style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 40px; text-align: left;" dir="ltr">$ cd /etc/Wireless/RT61STA
$ sudo vi -b rt61sta.dat</pre>
<p>d. copy the rt61.ko driver file to the modules folder, after that load it</p>
<pre class="alt2" style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 60px; text-align: left;" dir="ltr">$ sudo cp rt61.ko /lib/modules/`uname -r`/kernel/drivers/net/.
$ sudo depmod
$ sudo modprobe rt61</pre>
<p>e. check if driver loaded</p>
<pre class="alt2" style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 20px; text-align: left;" dir="ltr">$iwconfig</pre>
<p>I can connect thru unsecured wifi, but for WPA it cannot. Tried wpa_supplicant but again failed</p>
<p>RESULT: FAILED</p>
<p>Looping sound issue- did not bother to troubleshoot it</p>
<p>For 9.04 or Jaunty Jackalope, i can connect to my WPA without problems but audio playback is very slow, my mp3s are messed. It&#8217;s never a performance issue.</p>
<p>I thought it&#8217;s my Realtek HD audio driver, so it&#8217;s time to test to upgrade my alsa driver. I downloaded the latest version which is 1.0.21 and compile it</p>
<p>Here&#8217;s what I did:</p>
<pre class="alt2" style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 220px; text-align: left;" dir="ltr">sudo rm /lib/modules/`uname -r`/ubuntu/media/snd-hda-intel/snd-hda-intel.ko
sudo aptitude install build-essential linux-headers-$(uname -r) libncurses5-dev libncursesw5-dev
sudo cd /usr/src
sudo mkdir alsa
sudo cd alsa
sudo wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.21.tar.bz2
sudo tar -xf alsa-driver-1.0.15.tar.bz2
sudo cd alsa-driver-1.0.15.tar.bz2
sudo ./configure --with-cards=hda-intel
sudo make
sudo make install</pre>
<p>RESULT: FAILED</p>
<p>SOLUTION: More GOOGLE</p>
<p>There I got the idea to use i386 kernel instead of the default generic linux. I thought an apt-get update and upgrade will do the trick, but later thought just a waste of bandwidth</p>
<p>I fire the command:</p>
<pre class="alt2" style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 20px; text-align: left;" dir="ltr">$<strong>sudo apt-get install linux-headers-386 linux-image-386 linux-386</strong></pre>
<p>Reboot and then select that on grub to boot</p>
<p>Then alas, all problems were gone</p>
<p>RESULT: SUCCESS</p>
<p>Well, I guess it&#8217;s not really an ubuntu issue, it&#8217;s more on the hardware part.</p>
<p>Anyway, stressing but good experience in the end</p>
<p>Conclusion: Google is still my best friend.</p>
<p>BTW, I just tried Opensuse this morning, and wifi WPA and sound card issue as well. my laptop really for i386 kernel only.</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 16px; width: 1px; height: 1px;">http://www.ralinktech.com/drivers/Linux/2005_1230_RT61_Linux_STA_Drv1.0.3.0.tar.gz</div>
]]></content:encoded>
			<wfw:commentRss>http://www.freelinuxtutorials.com/quick-tips-and-tricks/looping-soundno-audioslow-audio-playback-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configure Sendmail for SMTP Authentication</title>
		<link>http://www.freelinuxtutorials.com/quick-tips-and-tricks/configure-sendmail-for-smtp-authentication/</link>
		<comments>http://www.freelinuxtutorials.com/quick-tips-and-tricks/configure-sendmail-for-smtp-authentication/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 14:33:42 +0000</pubDate>
		<dc:creator>tux</dc:creator>
				<category><![CDATA[Quick Tips & Tricks]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[sendmail]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://www.freelinuxtutorials.com/?p=229</guid>
		<description><![CDATA[1. Wonder why you can&#8217;t send email from your linux server? 2. Is your mail server or 3rd party email hosting provider requires authentication for your outgoing server to send out emails successfully? 3. Are you using a default sendmail email client on your linux box and wonder why your getting maillog errors such as [...]]]></description>
			<content:encoded><![CDATA[<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="medium" count="" href="http://www.freelinuxtutorials.com/quick-tips-and-tricks/configure-sendmail-for-smtp-authentication/"></g:plusone></div><p>1. Wonder why you can&#8217;t send email from your linux server?</p>
<p>2. Is your mail server or 3rd party email hosting provider requires authentication for your outgoing server to send out emails successfully?</p>
<p>3. Are you using a default sendmail email client on your linux box and wonder why your getting maillog errors such as this:</p>
<p>&#8212;&#8212;-sample sendmail maillog error from my nagios server&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Oct  2 17:03:54 nms sendmail[25657]: n9293qiw025655: to=&lt;nagios@freelinuxtutorials.com&gt;,</p>
<p>ctladdr=&lt;root@nms.freelinuxtutorials.com&gt; (0/0), dela0928, relay=smtp.freelinuxtutorials.com.</p>
<p>[216.200.145.17], dsn=5.1.1, stat=User unknown<br />
Oct  2 17:03:54 nms sendmail[25657]: n9293qiw025655: n9293siw025657: DSN: User unknown<br />
Oct  2 17:03:54 nms sendmail[25657]: n9293siw025657: to=&lt;root@nms.freelinuxtutorials.com&gt;,</p>
<p>delay=00:00:00, xdelay=00:00:00, mailer=local<br />
Oct  2 17:07:24 nms sendmail[25953]: n9297NHS025953: from=root, size=0,, nrcpts=0,</p>
<p>relay=root@localhost<br />
Oct  2 17:08:22 nms sendmail[26153]: n9298Ml4026153: from=nagios, size=462,, nrcpts=1,</p>
<p>msgid=&lt;200910020908.n9298Ml4026153@<br />
Oct  2 17:08:22 nms sendmail[26154]: n9298Me6026154: from=&lt;nagios@nms.freelinuxtutorials.com&gt;, size=720,</p>
<p>class=0, nrcpts=1, msgid=&lt;20091oto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1] (may be forged)</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>4. Is your Sendmail as your default MTA cannot send out emails to a mail server authenticated SMTP?</p>
<p>If you have these four(4) issues, then you need to set your Sendmail as SMTP AUTH client</p>
<p>Here&#8217;s how to do it:</p>
<p>1. On a RPM based distro such as Fedora, CentOS or RHEL, the default locations of sendmail configuration</p>
<p>files are in /etc/mail.</p>
<p>Important config files as follow:<br />
a. sendmail.cf<br />
b. sendmail.mc<br />
c. access<br />
d. authinfo<br />
e. trusted users<br />
f. mailertable<br />
g. virtusertable</p>
<p>Issue the command :</p>
<p>[root@nms mail]# sendmail -d0.1 -bv<br />
Version 8.14.3<br />
Compiled with: DNSMAP HESIOD HES_GETMAILHOST LDAPMAP LOG MAP_REGEX<br />
MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETINET6<br />
NETUNIX NEWDB NIS PIPELINING SASLv2 SCANF SOCKETMAP STARTTLS<br />
TCPWRAPPERS USERDB USE_LDAP_INIT</p>
<p>============ SYSTEM IDENTITY (after readcf) ============<br />
(short domain name) $w = nms<br />
(canonical domain name) $j = nms.freelinuxtutorials.com<br />
(subdomain name) $m = freelinuxtutorials.com<br />
(node name) $k = nms.freelinuxtutorials.com<br />
========================================================</p>
<p>Recipient names must be specified</p>
<p>As you can see above, your sendmail have SASL and STARTTLS, which are requirement for client usage</p>
<p>2. Add an MX record lookup on your sendmail.mc config for the smart host<br />
Ex:</p>
<p>define(`SMART_HOST&#8217;, `smtp.freelinuxtutorials.com&#8217;)</p>
<p>This is to define specifically the SMTP server you want your server to communicate with</p>
<p>3. Configure sendmail.mc for &#8220;authinfo&#8221;.</p>
<p>FEATURE(`authinfo&#8217;,`hash /etc/mail/authinfo.db&#8217;)</p>
<p>4. Configure lines in the sendmail.mc if there&#8217;s certificate related entries (Optional). You can just<br />
take out the  &#8220;dn1&#8243; prefix to uncomment</p>
<p>dnl define(`confCACERT_PATH&#8217;, `/etc/pki/tls/certs&#8217;)dnl<br />
dnl define(`confCACERT&#8217;, `/etc/pki/tls/certs/ca-bundle.crt&#8217;)dnl<br />
dnl define(`confSERVER_CERT&#8217;, `/etc/pki/tls/certs/sendmail.pem&#8217;)dnl<br />
dnl define(`confSERVER_KEY&#8217;, `/etc/pki/tls/certs/sendmail.pem&#8217;)dnl</p>
<p>5. You can leave this as default if it is not required<br />
dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN&#8217;)dnl<br />
dnl define(`confAUTH_MECHANISMS&#8217;, `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN&#8217;)dnl</p>
<p>6. Configure an &#8220;authinfo&#8221;, the credentials to login should be define here.<br />
Let say you have an email address<br />
darwin@freelinuxtutorials.com with password &#8220;iwashere&#8221;, then line should look like this</p>
<p>AuthInfo:smtp.freelinuxtutorials.com &#8220;U:nagios&#8221; &#8220;I:darwin@freelinuxtutorials.com&#8221; &#8220;P:iwashere&#8221; &#8220;M:LOGIN</p>
<p>PLAIN&#8221;</p>
<p>7. Make the authinfo.db by invoking this command</p>
<p>makemap hash /etc/mail/authinfo &lt; /etc/mail/authinfo</p>
<p>8. the command &#8220;m4&#8243; should be use to create sendmail.cf from a modified sendmail.mc config, such as this</p>
<p>m4 sendmail.mc &gt; sendmail.cf</p>
<p>9. Restart sendmail service</p>
<p>service sendmail restart</p>
<p>or</p>
<p>/etc/init.d/sendmail restart</p>
<p>10. Check your logs (/etc/maillog) or (/var/log/maillog) to see for errors or warnings. You can use tail command to see the output</p>
<p>#tail -f /var/log/maillog</p>
<p>Testing:</p>
<p>1. Run a map test to verify that the authinfo db is correctly setup and being address to sendmail config</p>
<p>[root@nms mail]# echo &#8216;/map authinfo AuthInfo:smtp.freelinuxtutorials.com&#8217; | /usr/sbin/sendmail -bt<br />
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)<br />
Enter &lt;ruleset&gt; &lt;address&gt;<br />
&gt; map_lookup: authinfo (AuthInfo:smtp.freelinuxtutorials.com) returns &#8220;U:nagios&#8221;</p>
<p>&#8220;I:darwin@freelinuxtutorials.com&#8221; &#8220;P:iwashere&#8221; &#8220;M:LOGIN PLAIN&#8221; (0) &gt;</p>
<p>2. Send a test mail and check the logs.</p>
<p>A successful log as follows:</p>
<p>Oct  2 17:10:02 nms sendmail[26348]: n929A23w026348: to=nagios@freelinuxtutorials.com, ctladdr=nagios</p>
<p>(502/502), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30477, relay=[127.0.0.1] [127.0.0.1],</p>
<p>dsn=2.0.0, stat=Sent (n929A2BT026349 Message accepted for delivery)</p>
<p>Extra tip: You can set your SMTP log level to 20 for debugging purposes<br />
in sendmail.mc:</p>
<p>define(`confLOG_LEVEL&#8217;, `20&#8242;)dnl</p>
<p>A sample log will give something like this:</p>
<p>11:17:21 totsp sendmail[27587]: n1338jTQ388214: MAIL From: SIZE=29 AUTH=root@nms.freelinuxtutorials.com</p>
<p>Just drop a comment if you have clarifications. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.freelinuxtutorials.com/quick-tips-and-tricks/configure-sendmail-for-smtp-authentication/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Quick Tip: How to Install phpMyAdmin</title>
		<link>http://www.freelinuxtutorials.com/quick-tips-and-tricks/quick-tip-how-to-install-phpmyadmin/</link>
		<comments>http://www.freelinuxtutorials.com/quick-tips-and-tricks/quick-tip-how-to-install-phpmyadmin/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 13:50:17 +0000</pubDate>
		<dc:creator>tux</dc:creator>
				<category><![CDATA[Quick Tips & Tricks]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.freelinuxtutorials.com/?p=208</guid>
		<description><![CDATA[Assuming you already have mysql server installed on your machine, the reason you are installing phpmyadmin is to ease  your administration of  your MySQL like database creation and deletion, create/alter/drop/view tables and execute any SQL statements, privilege and trigger management, stored procedures, and backup/ maintenance phyMyAdmin is a tool built in PHP to manage and [...]]]></description>
			<content:encoded><![CDATA[<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="medium" count="" href="http://www.freelinuxtutorials.com/quick-tips-and-tricks/quick-tip-how-to-install-phpmyadmin/"></g:plusone></div><p>Assuming you already have mysql server installed on your machine, the reason you are<br />
installing phpmyadmin is to ease  your administration of  your MySQL like database creation and deletion, create/alter/drop/view tables and execute any SQL statements, privilege and trigger management, stored procedures, and backup/ maintenance</p>
<p>phyMyAdmin is a tool built in PHP to manage and administer your MySQL servers via your browser.</p>
<p>Requirements:</p>
<p>1.PHP<br />
2.MySQL<br />
3.php-mysql<br />
4.gd/gd-devel<br />
5. Apache</p>
<p>1. Install the necessary requirements<br />
ex:<br />
[root@freelinuxtutorials src]# yum install php-mysql<br />
Loaded plugins: fastestmirror<br />
Loading mirror speeds from cached hostfile<br />
* base: mirror.primusdatacentre.com.au<br />
* updates: mirror.primusdatacentre.com.au<br />
* addons: mirror.primusdatacentre.com.au<br />
* extras: mirror.primusdatacentre.com.au<br />
Setting up Install Process<br />
Parsing package install arguments<br />
Resolving Dependencies<br />
&#8211;&gt; Running transaction check<br />
&#8212;&gt; Package php-mysql.i386 0:5.1.6-23.2.el5_3 set to be updated<br />
&#8211;&gt; Processing Dependency: php-pdo for package: php-mysql<br />
&#8211;&gt; Running transaction check<br />
&#8212;&gt; Package php-pdo.i386 0:5.1.6-23.2.el5_3 set to be updated<br />
&#8211;&gt; Finished Dependency Resolution</p>
<p>Dependencies Resolved</p>
<p>================================================================================<br />
Package           Arch         Version                   Repository       Size<br />
================================================================================<br />
Installing:<br />
php-mysql         i386         5.1.6-23.2.el5_3          updates          85 k<br />
Installing for dependencies:<br />
php-pdo           i386         5.1.6-23.2.el5_3          updates          64 k</p>
<p>Transaction Summary<br />
================================================================================<br />
Install      2 Package(s)<br />
Update       0 Package(s)<br />
Remove       0 Package(s)</p>
<p>Total download size: 148 k<br />
Is this ok [y/N]: y</p>
<p>2. Download and uncompress the distro kit from phpmyadmin.net download page</p>
<p>3.If you have PHP 5.2+ version. phpmyadmin version 3X is advised. You can download it in</p>
<p>http://www.phpmyadmin.net/home_page/downloads.php</p>
<p>sample:<br />
[root@freelinuxtutorials src]#cd /usr/local/src<br />
[root@freelinuxtutorials src]#wget</p>
<p>http://nchc.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/3.2.2/phpMyAdmin-3.2.2-all-languages.tar.bz2</p>
<p>[root@freelinuxtutorials src]# bunzip2 phpMyAdmin-3.2.2-all-languages.tar.bz2<br />
[root@freelinuxtutorials src]# tar xvf phpMyAdmin-3.2.2-all-languages.tar</p>
<p>*for PHP 5.2 below,<br />
[root@freelinuxtutorials src]#cd /usr/local/src<br />
[root@freelinuxtutorials src]#wget</p>
<p>http://nchc.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/2.11.9.5/phpMyAdmin-2.11.9.5-all-languages-utf-8-only.tar.gz</p>
<p>[root@freelinuxtutorials src]#tar zxvf phpMyAdmin-2.11.9.5-all-languages-utf-8-only.tar.gz</p>
<p>4. Move and rename the extracted folder to your web server&#8217;s document root usually in</p>
<p>/var/www/html</p>
<p>sample:<br />
[root@freelinuxtutorials src]# mv phpMyAdmin-2.11.9.5-all-languages-utf-8-only phpmyadmin<br />
[root@freelinuxtutorials src]#cp -R phpmyadmin /var/www/html</p>
<p>5. Configure phpmyadmin</p>
<p>There are two ways to configure:</p>
<p>A. Manual Configuration</p>
<p>-Create a file called config.inc.php on sthe phpmyadmin main directory or you can copy the</p>
<p>config.sample.inc.php</p>
<p>[root@freelinuxtutorials src]#cp config.sample.inc.php config.inc.php</p>
<p>- Edit blowfish secret</p>
<p>// use any value here for blowfish_secret, max of 46 chars.<br />
$cfg['blowfish_secret'] = &#8216;adf3fad107d65002&#8242;; /* YOU MUST FILL IN THIS FOR COOKI<br />
E AUTH! */</p>
<p>// auth type can be &#8220;cookie&#8221; or &#8220;http&#8221;, you can put cookie in it esp. for testing and to</p>
<p>see some error messages if any<br />
$cfg['Servers'][$i]['auth_type'] = &#8216;cookie&#8217;;</p>
<p>/* Select mysqli if your server has it */<br />
$cfg['Servers'][$i]['extension'] = &#8216;mysql&#8217;;</p>
<p>//If you want password for &#8220;root&#8221;</p>
<p>To manually create the file, simply use your text editor to create the file config.inc.php</p>
<p>(you can copy config.sample.inc.php to get minimal configuration file) in the main</p>
<p>(top-level) phpMyAdmin directory (the one that contains index.php). phpMyAdmin first loads</p>
<p>libraries/config.default.php and then overrides those values with anything found in</p>
<p>config.inc.php. If the default value is okay for a particular setting, there is no need to</p>
<p>include it in config.inc.php. You&#8217;ll need a few directives to get going, a simple</p>
<p>configuration may look like this:</p>
<p>&lt;?php<br />
$cfg['blowfish_secret'] = &#8216;ba17c1ec07d65003&#8242;;  // use here a value of your choice</p>
<p>$i=0;<br />
$i++;<br />
$cfg['Servers'][$i]['auth_type']     = &#8216;cookie&#8217;;<br />
?&gt;</p>
<p>B. Via Setup Script</p>
<p>- Create a folder &#8220;config&#8221; in the phpmyadmin directory and set permissions</p>
<p>[root@freelinuxtutorials src]#cd /var/www/html/phpmyadmin<br />
[root@freelinuxtutorials src]#mkdir config<br />
[root@freelinuxtutorials src]#chmod o+rw config</p>
<p>- Edit config.inc.php<br />
[root@freelinuxtutorials src]#cp config.inc.sample.php config.inc.php<br />
[root@freelinuxtutorials src]#cp config.inc.php config/<br />
[root@freelinuxtutorials src]#chmod o+w config/config.inc.php</p>
<p>- Now open setup thru your favorite browser, open http://machineIPaddress/phpmyadmin/setup</p>
<p>- Save changes under the configuration area.</p>
<p>- Once finished saving, move file to phpmyadmin directory and revert back the permission</p>
<p>for security purposes</p>
<p>[root@freelinuxtutorials src]#mv config/config.inc.php .<br />
[root@freelinuxtutorials src]#chmod o-rw config.inc.php</p>
<p>6. Access now the phpmyadmin and use your mysql access to login</p>
<p>http://i.p.address/phpmyadmin</p>
<p>Note: You can setup an .htaccess in that folder for added security</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.freelinuxtutorials.com/quick-tips-and-tricks/quick-tip-how-to-install-phpmyadmin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sync MySQL tables via ruby gem TableSyncer</title>
		<link>http://www.freelinuxtutorials.com/quick-tips-and-tricks/sync-mysql-tables-via-ruby-gem-tablesyncer/</link>
		<comments>http://www.freelinuxtutorials.com/quick-tips-and-tricks/sync-mysql-tables-via-ruby-gem-tablesyncer/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 15:43:07 +0000</pubDate>
		<dc:creator>tux</dc:creator>
				<category><![CDATA[Quick Tips & Tricks]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby gem]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.freelinuxtutorials.com/?p=194</guid>
		<description><![CDATA[There are ways to sync two MySQL tables in a non-GUI method such as mysql triggers or by Maatkit&#8217;s MySQL Table Sync, but it&#8217;s not that user-friendly. Of course, if  you want the GUI-type, there&#8217;s always the ever dependable phpMyAdmin or the NaviCat program. On this tutorial, I will be implementing the &#8220;TableSyncer&#8221; tool, a [...]]]></description>
			<content:encoded><![CDATA[<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="medium" count="" href="http://www.freelinuxtutorials.com/quick-tips-and-tricks/sync-mysql-tables-via-ruby-gem-tablesyncer/"></g:plusone></div><p>There are ways to sync two MySQL tables in a non-GUI method such as mysql triggers or by Maatkit&#8217;s MySQL Table Sync, but it&#8217;s not that user-friendly.</p>
<p>Of course, if  you want the GUI-type, there&#8217;s always the ever dependable phpMyAdmin or the NaviCat program.</p>
<p>On this tutorial, I will be implementing the &#8220;TableSyncer&#8221; tool, a ruby gem built that was originally detailed on <a title="TableSyncer" href="http://code.google.com/p/ruby-roger-useful-functions/wiki/TableSyncer" target="_blank">http://code.google.com/p/ruby-roger-useful-functions/wiki/TableSyncer</a></p>
<p>This was tested on CentOS 5.3 32-bit running in Pentium4@3.0GHz 1G machine.</p>
<p>Here are the step-by-step procedure:</p>
<p>1. Download rubygem by &#8220;yum&#8221; or by source. This is how I built the rubygem<br />
#wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz<br />
tar zxvf rubygems-1.3.5.tgz</p>
<p>2. Run ruby setup.rb<br />
#ruby setup.rb<br />
[root@freelinuxtutorials rubygems-1.3.5]# ruby setup.rb</p>
<p>3. If you encounter error such as this, you need to install ruby-related packages<br />
RubyGems 1.3.5 installed</p>
<p>sample error:<br />
./lib/rubygems/custom_require.rb:31:in `gem_original_require&#8217;: no such file to load &#8211;<br />
rdoc/rdoc (LoadError)<br />
from ./lib/rubygems/custom_require.rb:31:in `require&#8217;<br />
from ./lib/rubygems/commands/setup_command.rb:352:in `run_rdoc&#8217;<br />
from ./lib/rubygems/commands/setup_command.rb:247:in `install_rdoc&#8217;<br />
from ./lib/rubygems/commands/setup_command.rb:120:in `execute&#8217;<br />
from ./lib/rubygems/command.rb:257:in `invoke&#8217;<br />
from ./lib/rubygems/command_manager.rb:132:in `process_args&#8217;<br />
from ./lib/rubygems/command_manager.rb:102:in `run&#8217;<br />
from ./lib/rubygems/gem_runner.rb:58:in `run&#8217;<br />
from setup.rb:35</p>
<p>4. Install ruby packages</p>
<p>#[root@freelinuxtutorials rubygems-1.3.5]# yum install ruby*</p>
<p>5. If successful, here&#8217;s sample output:</p>
<p>[root@freelinuxtutorials rubygems-1.3.5]# ruby setup.rb<br />
RubyGems 1.3.5 installed</p>
<p>ï»¿=== 1.3.5 / 2009-07-21</p>
<p>Bug fixes:</p>
<p>* Fix use of prerelease gems.<br />
* Gem.bin_path no longer escapes path with spaces. Bug #25935 and #26458.</p>
<p>Deprecation Notices:</p>
<p>* Bulk index update is no longer supported (the code currently remains, but not<br />
the tests)<br />
* Gem::manage_gems was removed in 1.3.3.<br />
* Time::today was removed in 1.3.3.</p>
<p>RubyGems installed the following executables:<br />
/usr/bin/gem</p>
<p>6. Now install table_syncher via &#8220;gem&#8221; command</p>
<p>#[root@freelinuxtutorials rubygems-1.3.5]# gem install table_syncher<br />
ERROR:  could not find gem table_syncher locally or in a repository</p>
<p>* If error, then you need to download the gem and run the gem command<br />
#wget http://rubyforge.org/frs/download.php/48927/table_syncer-0.3.1.gem</p>
<p>7. Install table_syncer</p>
<p>#[root@freelinuxtutorials src]# gem install table_syncer-0.3.1.gem<br />
Welcome to the wonderful world of table syncer:</p>
<p>For more information on table_syncer, see http://table_syncer.rubyforge.org<br />
run table_syncer &#8211;help for more info</p>
<p>comments/feedback/suggestions rogerpack2005@gmail.com<br />
Successfully installed table_syncer-0.3.1<br />
1 gem installed<br />
Installing ri documentation for table_syncer-0.3.1&#8230;<br />
Installing RDoc documentation for table_syncer-0.3.1&#8230;</p>
<p>6. run<br />
[root@freelinuxtutorials src]# table_syncer &#8211;help<br />
[root@freelinuxtutorials src]# find / -name &#8220;table_syncer.rb&#8221; -print<br />
/usr/lib/ruby/gems/1.8/gems/table_syncer-0.3.1/lib/table_syncer.rb</p>
<p>8. Find the table_syncer.rb</p>
<p>#[root@freelinuxtutorials src]find / -name &#8220;table_syncer.rb&#8221; -print</p>
<p>9. Edit table_syncer.rb based on your settings, a backup of orig file is recommended:</p>
<p>#[root@freelinuxtutorials src]# cd /usr/lib/ruby/gems/1.8/gems/table_syncer-0.3.1/lib/<br />
[root@freelinuxtutorials lib]# ls<br />
table_syncer  table_syncer.rb<br />
[root@freelinuxtutorials lib]# cp table_syncer.rb table_syncer.rb.orig</p>
<p>#[root@freelinuxtutorials lib]vi /usr/lib/ruby/gems/1.8/gems/table_syncer-0.3.1/lib/table_syncer.rb</p>
<p>local_db = {:host =&gt; &#8217;127.0.0.1&#8242;, :user =&gt; &#8216;root&#8217;, :password =&gt; &#8216;dbpass&#8217;, :db =&gt;</p>
<p>&#8216;dbname&#8217;}<br />
local_db2 = {:host =&gt; &#8217;127.0.0.1&#8242;, :user =&gt; &#8216;root&#8217;, :password =&gt; &#8216;dbpass&#8221;, :db =&gt;</p>
<p>&#8216;dbname2&#8221;}</p>
<p>*This setting denotes that your defining dbname1 to dbname2 on your local MySQL</p>
<p>10. You need to install the mysql gem module in able to connect to your database</p>
<p>#[root@freelinuxtutorials]# gem install mysql<br />
ERROR:  Error installing mysql:<br />
mysql requires Ruby version &gt;= 1.8.6</p>
<p>If you get an error same as above, you need to upgrade your ruby to 1.8.6</p>
<p>HOW TO UPGRADE RUBY:</p>
<p>You need to create a ruby repository on /etc/yum.repos.d containg the 1.8.6 rpms</p>
<p>a. #[root@freelinuxtutorials rubygems-1.3.5]# vi /etc/yum.repos.d/ruby.repo</p>
<p>Add these lines:</p>
<p>[ruby]<br />
name=ruby<br />
baseurl=http://repo.premiumhelp.eu/ruby/<br />
gpgcheck=0<br />
enabled=0</p>
<p>b.  To include it in your repository,you need to use the parameter -enablerepo=ruby</p>
<p>#[root@freelinuxtutorials rubygems-1.3.5]# yum &#8211;enablerepo=ruby list *RUBY*<br />
Loaded plugins: fastestmirror<br />
Loading mirror speeds from cached hostfile<br />
* base: mirror-fpt-telecom.fpt.net<br />
* updates: mirror-fpt-telecom.fpt.net<br />
* addons: mirror-fpt-telecom.fpt.net<br />
* extras: mirror-fpt-telecom.fpt.net<br />
ruby</p>
<p>|  951 B     00:00</p>
<p>primary.xml.gz<br />
| 6.1 kB     00:00<br />
ruby                                                           18/18<br />
Installed Packages<br />
ruby.i386                                               1.8.5-5.el5_3.7<br />
installed<br />
ruby-devel.i386                                         1.8.5-5.el5_3.7<br />
installed<br />
ruby-docs.i386                                          1.8.5-5.el5_3.7<br />
installed<br />
ruby-irb.i386                                           1.8.5-5.el5_3.7<br />
installed<br />
ruby-libs.i386                                          1.8.5-5.el5_3.7<br />
installed<br />
ruby-mode.i386                                          1.8.5-5.el5_3.7<br />
installed<br />
ruby-rdoc.i386                                          1.8.5-5.el5_3.7<br />
installed<br />
ruby-ri.i386                                            1.8.5-5.el5_3.7<br />
installed<br />
ruby-tcltk.i386                                         1.8.5-5.el5_3.7<br />
installed<br />
Available Packages<br />
eruby.i386                                              1.0.5-6.1<br />
base<br />
eruby-devel.i386                                        1.0.5-6.1<br />
base<br />
eruby-libs.i386                                         1.0.5-6.1<br />
base<br />
ruby.i686                                               1.8.6.111-1<br />
ruby<br />
ruby-devel.i686                                         1.8.6.111-1<br />
ruby<br />
ruby-docs.i686                                          1.8.6.111-1<br />
ruby<br />
ruby-irb.i686                                           1.8.6.111-1<br />
ruby<br />
ruby-libs.i686                                          1.8.6.111-1<br />
ruby<br />
ruby-mode.i686                                          1.8.6.111-1<br />
ruby<br />
ruby-mysql.i686                                         2.7.4-1<br />
ruby<br />
ruby-postgres.i686                                      0.7.1-6<br />
ruby<br />
ruby-rdoc.i686                                          1.8.6.111-1<br />
ruby<br />
ruby-ri.i686                                            1.8.6.111-1<br />
ruby<br />
ruby-tcltk.i686                                         1.8.6.111-1<br />
ruby<br />
rubygems.noarch                                         0.9.4-2<br />
ruby<br />
subversion-ruby.i386                                    1.4.2-4.el5_3.1<br />
updates</p>
<p>c. Default package of ruby on CentOS 5.3 is ver. 1.8.5 , so to  upgrade, execute command like:<br />
#yum &#8211;enablerepo=ruby upgrade</p>
<p>d. Now to check if it&#8217;s already upgrade to 1.8.6X<br />
#[root@freelinuxtutorials rubygems-1.3.5]# rpm -qa |grep ruby</p>
<p>11. Install now the mysql gem</p>
<p>[root@freelinuxtutorials rubygems-1.3.5]# gem install mysql<br />
This is a successful install output:</p>
<p>Building native extensions.  This could take a while&#8230;<br />
Successfully installed mysql-2.8.1<br />
1 gem installed<br />
Installing ri documentation for mysql-2.8.1..</p>
<p>12. Now table_syncer is now installed on  your machine, to verify</p>
<p>[root@freelinuxtutorials rubygems-1.3.5]# which table_syncer<br />
/usr/bin/table_syncer</p>
<p>13. table_syncer now ready for action</p>
<p>#[root@freelinuxtutorials rubygems-1.3.5]# table_syncer &#8211;from=local_db &#8211;to=local_db2</p>
<p>&#8211;tables=darwin<br />
from db: local_db<br />
to db: local_db2<br />
db1 =&gt; db2</p>
<p>14. You need to preview to check for errors before committing</p>
<p>previewing (no changes made) run</p>
<p>127.0.0.1:db1 ["table1"]<br />
=&gt; 127.0.0.1:db2 ["table1"]<br />
connecting to to DB&#8230;db2connected<br />
now connecting to from DB db1connected<br />
start previewing (no changes made) table table1********************</p>
<p>&#8212;&#8212;&#8212;&#8212;ERROR==</p>
<p>Empty the &#8220;to&#8221; database and retry<br />
ERROR detected a duplicated id (or the lack of id at all) in cat_locale &#8212; aborting</p>
<p>[consider clearing [DELETE FROM<br />
cat_locale in the 'to' database and trying again, if in a pinch</p>
<p>To fix that error, sometimes you need to empty the target table via truncate then try again.</p>
<p>Succesful Output:</p>
<p>----------------------------------</p>
<p>[root@freelinuxtutorials rubygems-1.3.5]# table_syncer &#8211;from=local_db &#8211;to=local_db2 &#8211;tables=table1 &#8211;commit<br />
from db: local_db<br />
to db1: local_db2<br />
db =&gt; db2</p>
<p>&#8212;COMMITTING&#8212;- run</p>
<p>127.0.0.1:db1 ["table1"]<br />
=&gt; 127.0.0.1:db2 ["table1"]<br />
Continue (y/n)?y</p>
<p>done &#8212;COMMITTING&#8212;- table1 &#8212; updated 0, created 891, deleted 0</p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<br />
&#8211;summary&#8211;<br />
table1 &#8212; updated 0, created 891, deleted 0<br />
total transfer time 0.594881</p>
]]></content:encoded>
			<wfw:commentRss>http://www.freelinuxtutorials.com/quick-tips-and-tricks/sync-mysql-tables-via-ruby-gem-tablesyncer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backup Server files and MySQL database via FTP</title>
		<link>http://www.freelinuxtutorials.com/quick-tips-and-tricks/backup-web-server-files-and-mysql-database-via-ftp-automatically/</link>
		<comments>http://www.freelinuxtutorials.com/quick-tips-and-tricks/backup-web-server-files-and-mysql-database-via-ftp-automatically/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 19:31:34 +0000</pubDate>
		<dc:creator>tux</dc:creator>
				<category><![CDATA[Quick Tips & Tricks]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.freelinuxtutorials.com/?p=179</guid>
		<description><![CDATA[I had the chance to work as a systems administrator in an e-commerce company and they have Linux dedicated servers leased/purchase from a hosting provider. Dedicated servers compared to a shared hosting is you have full control of the box. You can do whatever you want with the box, implement services and of course a [...]]]></description>
			<content:encoded><![CDATA[<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="medium" count="" href="http://www.freelinuxtutorials.com/quick-tips-and-tricks/backup-web-server-files-and-mysql-database-via-ftp-automatically/"></g:plusone></div><p>I had the chance to work as a systems administrator in an e-commerce company and they have Linux dedicated servers leased/purchase from a hosting provider.<br />
Dedicated servers compared to a shared hosting is you have full control of the box. You can do whatever you want with the box, implement services and of course a full root access with the machine.</p>
<p>With this company, we are hosting about 200+ websites and some of them are hosted in our  boxes run in Redhat Enterprise Linux. As part of administering the box is to have a full and incremental backup of our dynamic website files and database. Scheduled shell scripts are set on this machine and luckily, I was able to find one of the useful backup solution script that can be found in this site:<br />
<a title="Backup Web Server files and DB" href=" http://www.cyberciti.biz/tips/how-to-backup-mysql-databases-web-server-files-to-a-ftp-server-automatically.html" target="_blank"></p>
<p>http://www.cyberciti.biz/tips/how-to-backup-mysql-databases-web-server-files-to-a-ftp-server-automatically.html</a></p>
<p>The backup solution that was presented on the script meets basically what I needed</p>
<p>What do you need here:</p>
<p>1.FTP client<br />
The built-in ftp client in linux seems can&#8217;t do the job.</p>
<p>Download and Install NcFTP client from http://www.ncftp.com/<br />
<em>#wget ftp://ftp.ncftp.com/ncftp/ncftp-3.2.3-src.tar.gz<br />
#./configure<br />
#make<br />
#make install</em></p>
<p>2. mysqldump<br />
This binary file will be included once you install the mysql and mysql-server package</p>
<p>3. tar command<br />
tar will be the one to compressed or archived your files so that size will be smaller when you upload it to your destination machine</p>
<p>What to do:</p>
<p>1. You need to define what directory you want to backup<br />
-for web files, default is /var/www/html. It really depends how you setup your httpd.conf for the document root<br />
This will be put as a variable in the DIRS</p>
<p>2. Define a temporary folder to your &#8220;BACKUP&#8221;<br />
3. Define a timestamp.<br />
NOW=$(date +&#8221;%d-%m-%Y&#8221;)<br />
4. Input the INCFILE and DAY</p>
<p>5. Create a file for your shell script</p>
<p>#vi /home/flt/backup.sh</p>
<p>Then paste the the script found in <a title="Backup Web Server files and DB" href="http://www.cyberciti.biz/tips/how-to-backup-mysql-databases-web-server-files-to-a-ftp-server-automatically.html" target="_blank">http://www.cyberciti.biz/tips/how-to-backup-mysql-databases-web-server-files-to-a-ftp-server-automatically.html<br />
</a><br />
<em>Due to copyright issue, just refer to the site below to get his script and modify for your own specifications and needs<br />
</em><strong><strong><em>Copyright (c) 2005-2006 nixCraft</em> ,created by vivek of cyberciti.biz</strong> </strong></p>
<p><strong> </strong><br />
6. Set a scheduler via cron, let say script will run every 12:01AM daily<br />
1 0 * * * /home/flt/backup.sh &gt; /home/flt/log/backup.log</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>If you want a generated script, the author of the script provided a link to generate an ftp backup script,</p>
<p><a title="Generate FTP Backup Script" href="http://bash.cyberciti.biz/backup/wizard-ftp-script.php" target="_blank">http://bash.cyberciti.biz/backup/wizard-ftp-script.php</a></p>
<p>If you want to more, or clarifications you can find author&#8217;s whole post @<br />
<a title="Backup Web Server files and DB" href="http://www.cyberciti.biz/tips/how-to-backup-mysql-databases-web-server-files-to-a-ftp-server-automatically.html" target="_blank">http://www.cyberciti.biz/tips/how-to-backup-mysql-databases-web-server-files-to-a-ftp-server-automatically.html</a></p>
<p>Kudos to him and I have backup script running on my 5 linux boxes patterned on his script.</p>
<p>Note:</p>
<p>Backing up files will consume a lot of bandwidth of your internet. If you don&#8217;t have dedicated lines for your data traffic, you can try to:</p>
<p>a. Either set a QOS to limit ftp traffic<br />
b. Set an download limit from your FTP server (backup server)</p>
<p>I am fan of the site and I posted on this site since it&#8217;s very useful if you want an alternative on doing such job. Of course, there are lots of ways to do it and several 3rd party programs,in GUI or by web interface on backing up files and database in Linux.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.freelinuxtutorials.com/quick-tips-and-tricks/backup-web-server-files-and-mysql-database-via-ftp-automatically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Tip: Cloning Ubuntu Desktop via G4U</title>
		<link>http://www.freelinuxtutorials.com/quick-tips-and-tricks/quick-tip-cloning-ubuntu-desktop-via-g4u/</link>
		<comments>http://www.freelinuxtutorials.com/quick-tips-and-tricks/quick-tip-cloning-ubuntu-desktop-via-g4u/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 12:44:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick Tips & Tricks]]></category>
		<category><![CDATA[fdisk]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[g4u]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.freelinuxtutorials.com/?p=122</guid>
		<description><![CDATA[In this tutorial, we will be cloning PC desktop machines using an opensource tool called &#8220;G4U&#8221;. g4u (&#8220;ghosting for unix&#8221;) is a NetBSD-based bootfloppy/CD-ROM that allows easy cloning of PC harddisks to deploy a common setup on a number of PCs using FTP. The floppy/CD offers two functions. more details on &#8211;&#62;   http://www.feyrer.de/g4u/ Here [...]]]></description>
			<content:encoded><![CDATA[<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="medium" count="" href="http://www.freelinuxtutorials.com/quick-tips-and-tricks/quick-tip-cloning-ubuntu-desktop-via-g4u/"></g:plusone></div><p>In this tutorial, we will be cloning PC desktop machines using an opensource tool called &#8220;G4U&#8221;.</p>
<p>g4u (&#8220;ghosting for unix&#8221;) is a NetBSD-based bootfloppy/CD-ROM that allows easy cloning of PC harddisks to deploy a common setup on a number of PCs using FTP. The floppy/CD offers two functions. more details on &#8211;&gt;   <a title="G4u" href="http://www.feyrer.de/g4u/" target="_blank">http://www.feyrer.de/g4u/</a></p>
<p>Here are the step by step procedure:<br />
1.    Install hard disk to be cloned in the spare IDE port of the host Ubuntu PC.<br />
2.    From host PC’s command terminal, log in as super user /administrator.<br />
3.    When logged in, write fdisk/dev/hdc  &#8211; to access or edit the hard disk to be cloned.<br />
(#fdisk/dev/hdc)<br />
4.    You can check if the hard disk to be cloned has an existing partition by writing “p”<br />
5.    If there is an existing partition that you want to delete, you can write “d”<br />
6.    To create partition write “n”<br />
7.    Then select “Primary” for partition 1<br />
8.    Select partition number .(1)<br />
9.     Input range (1-4916).<br />
10.    To create a secondary partition write “n” again.<br />
11.    Then select “Extension”<br />
12.    Select the partition number (2)<br />
13.    Input range (4917-5005).<br />
14.    To check if partitions are correct, write “p”<br />
15.    Write “w” to save your settings.<br />
16.    Write “q” to go back to the root/admin prompt.<br />
17.    Insert Ubuntu cd installer to the host PC.<br />
18.    Set the host PC to reboot in CD ROM.<br />
19.    Reboot PC.<br />
20.    Upon reboot. Wait for the g4U&gt; prompt.<br />
21.    From the g4U&gt; prompt write copydisk wd0 wd01 (g4U&gt;copdisk wd0 wd1)<br />
22.    Upon copying the file. You can now shutdown the PC and test the cloned hard disk if Ubuntu will run.</p>
<p>Happy cloning <img src='http://www.freelinuxtutorials.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.freelinuxtutorials.com/quick-tips-and-tricks/quick-tip-cloning-ubuntu-desktop-via-g4u/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

