<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Free Linux Tutorials</title>
	
	<link>http://www.freelinuxtutorials.com</link>
	<description>/var/net/sys/admin/blog</description>
	<lastBuildDate>Fri, 21 May 2010 04:22:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/freelinuxtutorials/rUCC" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="freelinuxtutorials/rucc" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Linux Mint 9 Released</title>
		<link>http://www.freelinuxtutorials.com/news-and-updates/linux-mint-9-released/</link>
		<comments>http://www.freelinuxtutorials.com/news-and-updates/linux-mint-9-released/#comments</comments>
		<pubDate>Fri, 21 May 2010 04:22:29 +0000</pubDate>
		<dc:creator>tux</dc:creator>
				<category><![CDATA[News and Updates]]></category>
		<category><![CDATA[announcements]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mint]]></category>

		<guid isPermaLink="false">http://www.freelinuxtutorials.com/?p=358</guid>
		<description><![CDATA[
			
				
			
		
As posted on LinuxMint Official website:
The team is proud to announce the release of Linux Mint 9  “Isadora”.  Linux Mint 9 “Isadora” New features at a glance:   New   Software Manager  30,000 packages Review applications straight from the Software Manager APT daemon Visual improvements   New   [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.freelinuxtutorials.com%2Fnews-and-updates%2Flinux-mint-9-released%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.freelinuxtutorials.com%2Fnews-and-updates%2Flinux-mint-9-released%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>As posted on LinuxMint Official website:</p>
<p>The team is proud to announce the release of Linux Mint 9  “Isadora”.  Linux Mint 9 “Isadora” New features at a glance:   New   Software Manager  30,000 packages Review applications straight from the Software Manager APT daemon Visual improvements   New   Backup Tool  Incremental backups, compression, integrity checks Backup/Restoration of the software selection   Menu   improvements  Editable items Transparent menu Always start with favorites “Add to”&#8230;</p>
<p><a title="Linux Mint 9 Released" href="http://www.linuxmint.com/blog/?p=1403" target="_blank">http://www.linuxmint.com/blog/?p=1403</a></p>
<p>personal comment:</p>
<p>I had the chance to try Linux Mint 9 on my virtualbox yesterday after  almost more than an hour of downloading (since I need to limit my  download transfer to prioritize some of my movie downloads =) Anyway,  after installing, I just felt that I&#8217;m just using a combination of  Ubuntu and Opensuse. I like the ease of installation and it&#8217;s network  backup tool, other than that,I find it very Ubuntuish , but still worth a try.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.freelinuxtutorials.com/news-and-updates/linux-mint-9-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing IDS using Snort with OinkMaster, Barnyard and BASE on RHEL/CentOS 64-bit</title>
		<link>http://www.freelinuxtutorials.com/tutorials/installing-ids-using-snort-with-oinkmaster-barnyard-and-base-on-rhelcentos-64-bit/</link>
		<comments>http://www.freelinuxtutorials.com/tutorials/installing-ids-using-snort-with-oinkmaster-barnyard-and-base-on-rhelcentos-64-bit/#comments</comments>
		<pubDate>Thu, 20 May 2010 08:08:37 +0000</pubDate>
		<dc:creator>tux</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[ADODB]]></category>
		<category><![CDATA[Barnyard]]></category>
		<category><![CDATA[BASE]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[IDS]]></category>
		<category><![CDATA[IPS]]></category>
		<category><![CDATA[oinkmaster]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[snort]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://www.freelinuxtutorials.com/?p=350</guid>
		<description><![CDATA[
			
				
			
		
Snort® is an open source network intrusion prevention and detection system (IDS/IPS) developed by Sourcefire.
Other definitions:
- Barnyard is an output system for Snort. Snort creates a special binary output format called unified. Barnyard reads this file, and then resends the data to a database backend. Unlike the database output plug-in, Barnyard manages the sending of [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.freelinuxtutorials.com%2Ftutorials%2Finstalling-ids-using-snort-with-oinkmaster-barnyard-and-base-on-rhelcentos-64-bit%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.freelinuxtutorials.com%2Ftutorials%2Finstalling-ids-using-snort-with-oinkmaster-barnyard-and-base-on-rhelcentos-64-bit%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p align="center">Snort® is an open source network intrusion prevention and detection system (IDS/IPS) developed by Sourcefire.</p>
<p style="text-align: left;">Other definitions:<br />
- Barnyard is an output system for Snort. Snort creates a special binary output format called unified. Barnyard reads this file, and then resends the data to a database backend. Unlike the database output plug-in, Barnyard manages the sending of events to the database and stores them when the database temporarily cannot accept connections.</p>
<p>-<span style="font-size: 10pt; font-family: Verdana;"><span style="font-family: Times New Roman; font-size: small;">BASE is the Basic Analysis and Security Engine.  It is based on the code from the Analysis Console for Intrusion  Databases (ACID) project. This application provides a web front-end to  query and analyze the alerts coming from a SNORT IDS system.<br />
</span></span></p>
<p style="text-align: left;"><span style="font-size: 10pt; font-family: Verdana;"><span style="font-family: Times New Roman; font-size: small;">-</span></span>Oinkmaster is a script that will help you update and manage your Snort  rules.</p>
<p>Pre-requisites Softwares:</p>
<p>Mysql<br />
mysql-bench<br />
mysql-server<br />
mysql-devel<br />
mysqlclient10<br />
php-mysql<br />
httpd<br />
gcc<br />
pcre-devel<br />
php-gd<br />
gd<br />
mod_ssl<br />
glib2-devel<br />
gcc-c++<br />
libpcap-devel<br />
php<br />
php-pear<br />
yum-utils</p>
<p>Assuming you already installed your latest 64-bit CentOS, configured important services like Apache,PHP and your mysql server, make sure your server packages are updated as well by issuing<br />
#yum update<strong> </strong></p>
<p><strong> </strong></p>
<p><strong><br />
I. Installation of Snort</strong></p>
<ol>
<li>Download the lateset Snort source file on Snort’s      official Site @ snort.org. As of this moment, the latest version is 2.8.6.      You can find it at <a href="http://www.snort.org/downloads">http://www.snort.org/downloads</a><br />
#wget  <a href="http://dl.snort.org/snort-current/snort-2.8.6.tar.gz">http://dl.snort.org/snort-current/snort-2.8.6.tar.gz</a></li>
<li>Go to your favorite root install directory (mine is      /usr/local/src) and extract the file<br />
#tar zxvf snort-2.8.6.tar.gz</li>
<li>Compile. If you are using the 32-bit OS, it’s very rare      that you encounter errors. For 64-bit, it’s quite pain In the ass, errors      like libmysqlclient cannot be found since it will look for /lib/mysql instead      of lib64/mysql. In order to solve that issue, you need to add extra      parameters to your configure .</li>
</ol>
<p>#cd snort-2.8.6<br />
#./configure –with-mysql –enable-dynamicplugin &#8211;with-mysql-libraries=/usr/lib64/mysql<br />
#make<br />
#make install</p>
<ol>
<li>Create snort user and group<br />
#groupadd snort<br />
#useradd –g snort snort –s /sbin/nologin</li>
<li>Create snort directory files<br />
#mkdir –p /etc/snort<br />
#mkdir –p /etc/snort/rules<br />
#mkdir /var/log/snort</li>
<li>Copy files on the root installation folder of snort to      /etc/snort<br />
#cd etc/<br />
#cp * /etc/snort</li>
<li>Modify your snort.conf and make these changes, assuming      your network is 192.168.1.0/24</li>
</ol>
<p>var RULE_PATH /etc/snort/rules<br />
var HOME_NET 192.168.1.0/24<br />
var EXTERNAL_NET !$HOME_NET</p>
<p>Uncomment the lines (create if none):</p>
<p>output alert_unified: filename snort.alert, limit 128<br />
output log_unified: filename snort.log, limit 128</p>
<ol>
<li>Download the snort init file for easy management of      snort service<br />
#cd /etc/init.d<br />
#wget <a href="../freefiles/snort">http://www.freelinuxtutorials.com/freefiles/snort</a><br />
#chmod 755 snort<br />
#chkconfig snort on</li>
</ol>
<p><strong>II. Installation and Configuration of OinkMaster</strong></p>
<p>Downloading the snort rules on the snort.org website is a little bit tricky. Even if you can sign up an account, you cannot directly download those rules and you’ll receive a  403 Forbidden error. There are ways to get it, you either get it by paying a subscription or get the registered user  release.</p>
<ol>
<li>Download the OinkMaster source file in SourceForge @      oinkmaster.sourceforge.net<br />
#cd /usr/local/src<br />
# wget <a href="http://nchc.dl.sourceforge.net/project/oinkmaster/oinkmaster/2.0/oinkmaster-2.0.tar.gz">http://nchc.dl.sourceforge.net/project/oinkmaster/oinkmaster/2.0/oinkmaster-2.0.tar.gz</a></li>
<li>Extract the file and read the INSTALL file for details<br />
# tar zxvf oinkmaster-2.0.tar.gz<br />
#cd oinkmaster-2.0<br />
#less INSTALL</li>
<li>Copy oinkmaster.pl,oinkmaster.conf and oinkmaster.1       on your suitable directory<br />
#cp oinkmaster.pl      /usr/local/bin<br />
#cp oinkmaster.conf /etc<br />
#cp oinkmaster.1 /usr/local/man/man1</li>
<li>Edit oinkmaster configuration, change the settings on      the line “ url = &lt;url&gt; “. Download the snort rule same with your      snort version.  Use snort –V to check.[root@FLT oinkmaster-2.0]# snort -V</li>
</ol>
<p>,,_     -*&gt; Snort! &lt;*-<br />
o&#8221;  )~   Version 2.8.6 (Build 38)<br />
&#8221;&#8221;    By Martin Roesch &amp; The Snort Team: http://www.snort.org/snort/snort-team           Copyright (C) 1998-2010 Sourcefire, Inc., et al.<br />
Using PCRE version: 6.6 06-Feb-2006</p>
<p>You will see line similar to:</p>
<p>url = http://www.snort.org/pub-bin/oinkmaster.cgi/&lt;oinkcode&gt;/filename</p>
<p>e.g.</p>
<p>url = <a href="http://www.snort.org/pub-bin/oinkmaster.cgi/f8ff7c46785aac436c9f596059863b145d285abc/snortrules-snapshot-CURRENT.tar.gz">http://www.snort.org/pub-bin/oinkmaster.cgi/f8ff7c46785aac436c9f596059863b145d285abc/snortrules-snapshot-CURRENT.tar.gz</a></p>
<p>Save and exit</p>
<ol>
<li>Assuming your rules directory is /etc/snort/rules.      Update the rules by executing:<br />
# oinkmaster.pl –o /etc/snort/rules</li>
<li>Create a non-root user for schedule run of oinkmaster      daily<br />
#group add oink<br />
#useradd –g oink oink –s /sbin/nologin</li>
<li>Create the crontab<br />
#su – oink<br />
$crontab –e</li>
</ol>
<p>01 4 * * * /usr/local/bin/oinkmaster.pl -C /etc/oinkmaster.conf -C /etc/autodisable.conf -o /etc/snort/rules 2&gt;&amp;1 | mail -s &#8220;oinkmaster&#8221; darwin@freelinuxtutorials.com</p>
<p>This will run the oinkmaster daily @ 4:01AM and send email</p>
<p>You will see an email like this:</p>
<p>Loading /etc/oinkmaster.conf</p>
<p>Loading /etc/autodisable.conf</p>
<p>Downloading file from <a href="http://www.snort.org/pub-bin/oinkmaster.cgi/*oinkcode*/snortrules-snapshot-CURRENT.tar.gz">http://www.snort.org/pub-bin/oinkmaster.cgi/*oinkcode*/snortrules-snapshot-CURRENT.tar.gz</a>&#8230; done.</p>
<p>Archive successfully downloaded, unpacking&#8230; done.</p>
<p>Setting up rules structures&#8230; done.</p>
<p>Processing downloaded rules&#8230; disabled 0, enabled 0, modified 0, total=8464</p>
<p>Setting up rules structures&#8230; done.</p>
<p>Comparing new files to the old ones&#8230; done.</p>
<p>[***] Results from Oinkmaster started 20100518 05:33:38 [***]</p>
<p>[*] Rules modifications: [*]</p>
<p>None.</p>
<p>[*] Non-rule line modifications: [*]</p>
<p>None.</p>
<p>[*] Added files: [*]</p>
<p>None.</p>
<p><strong>III. Set-up database in MySQL</strong></p>
<ol>
<li>This will serve as database for snort to make it easy      to look up on events and it is a requirement of the BASE monitoring tool</li>
</ol>
<p>#mysql –u root –p</p>
<p>Mysql&gt; create database snort;<br />
mysql&gt; GRANT CREATE,INSERT,SELECT,DELETE,UPDATE on snort.* to snort@localhost IDENTIFIED by ‘snortpass’;<br />
mysql&gt;exit</p>
<ol>
<li>Execute the command below to create tables<br />
#mysql –u root –p snort &lt;      /usr/local/src/snort-2.8.6/schemas/create_mysql</li>
</ol>
<p><strong>IV. Install Barnyard</strong></p>
<ol>
<li>Download and extract barnyard#cd /usr/local/src<br />
# wget <a href="http://snort.org/dl/barnyard/barnyard-0.2.0.tar.gz">http://snort.org/dl/barnyard/barnyard-0.2.0.tar.gz</a><br />
#tar zxvf barnyard-0.2.0</li>
<li>Patch and configure for 64-bit. This is another pain in      the ass, coz if you don’t patch the barnyard, you will get an error      something like “ERROR: Invalid packet length:”#cd barnyard-0.2.0<br />
#wget <a href="http://www.snort.org/users/jbrvenik/Site/Code_files/barnyard.64bit.diff">http://www.snort.org/users/jbrvenik/Site/Code_files/barnyard.64bit.diff</a><br />
#patch –p1 &lt; barnyard.64bit.diff<br />
You will something like this:</li>
</ol>
<p>[root@FLT barnyard-0.2.0]# patch -p1 &lt; barnyard.64bit.diff</p>
<p>patching file src/barnyard.h<br />
patching file src/event.h</p>
<p>patching file src/input-plugins/dp_alert.h<br />
patching file src/util.c<br />
patching file src/util.h</p>
<ol>
<li>Edit op_acid_db.c  and the line      “mysql-&gt;reconnect = 1; “ below<br />
#cd /usr/local/src/barnyard-0.2.0/src/output-plugins<br />
#vi  op_acid_db.c<br />
From:<br />
LogMessage(&#8221;Lost connection to MySQL server.       Reconnecting\n&#8221;);<br />
while(mysql_ping(mysql) != 0)</li>
</ol>
<p>To:<br />
LogMessage(&#8221;Lost connection to MySQL server.  Reconnecting\n&#8221;);<br />
mysql-&gt;reconnect = 1;<br />
while(mysql_ping(mysql) != 0)</p>
<ol>
<li>Compile# ./configure &#8211;enable-mysql  &#8211;with-mysql-libraries=/usr/lib64/mysql<br />
#make<br />
#make install</li>
<li>Copy barnyard.conf on /etc/snort<br />
#cp etc/barnyard.conf /etc/snort</li>
<li>Configure barnyard.conf. Change the ffg:<br />
from:<br />
config interface: fxp0<br />
to:<br />
config interface: eth0</p>
<p>Add these lines if not existing, the database details should be same on      the one you configure on your database.</li>
</ol>
<p>output alert_acid_db: mysql, sensor_id 1, database snort, server localhost, user snort, password snortpass<br />
output log_acid_db: mysql, database snort, server localhost, user snort, password snortpass, detail full</p>
<ol>
<li>Create a waldo file for barnyard.a. Execute on the CLI and let it go until on the message “Not Using      PCAP_FRAMES”, run it for few seconds and stop it by pressing Ctrl-c<br />
#snort –c /etc/snort/snort.conf</p>
<p>b. Open another CLI and check your /var/log/snort, you will see files like      :</p>
<p>-rw-r&#8211;r&#8211; 1 root root    400 May 20 15:04      snort.alert.1274330319<br />
-rw-r&#8211;r&#8211; 1 root root   7484 May 20 15:04 snort.log.1274330319</li>
</ol>
<p>c. Create a file barnyard.waldo and put this line<br />
/var/log/snort snort.log 1274330319 0<br />
Save and exit<br />
We used 1274330319 as the 10 digit suffix on snort.log</p>
<p>8.  Copy the barnyard init file same as we did on snort.<br />
#wget <a href="../freefiles/barnyard">http://www.freelinuxtutorials.com/freefiles/barnyard</a><br />
#chmod 755 barnyard<br />
#chkconfig barnyard on</p>
<p>9. Start barnyard service<br />
[root@FLT snort]# service barnyard startStarting Barnyard: Barnyard Version 0.2.0 (Build 32)<br />
31165<br />
[  OK  ]</p>
<p><strong><br />
V.  Install BASE</strong></p>
<ol>
<li>Install first the following packages used for graphing      of BASE<br />
#pear install Image_Graph-alpha Image_Canvas-alpha Image_Color      Numbers_Roman</li>
<li>Download and install ADODB<br />
#wget <a href="http://easynews.dl.sourceforge.net/sourceforge/adodb/adodb480.tgz">http://easynews.dl.sourceforge.net/sourceforge/adodb/adodb480.tgz</a><br />
#cd /var/www/<br />
# tar zxvf /usr/local/src/adodb480.tgz</li>
<li>Download and configure BASE<br />
#wget <a href="http://easynews.dl.sourceforge.net/sourceforge/secureideas/base-1.3.5.tar.gz">http://easynews.dl.sourceforge.net/sourceforge/secureideas/base-1.3.5.tar.gz</a><br />
#cd /var/www/html<br />
#tar –zxvf /usr/local/src/base-1.3.5.tar.gz<br />
# mv base-1.3.5/ base/</li>
<li>Copy base_conf.php.dist to base_conf.php<br />
#cp base_conf.php.dist base_conf.php</li>
<li>Edit base_conf.php and insert/edit the  parameters      below:<br />
$BASE_urlpath = &#8220;/base&#8221;;<br />
$DBlib_path = &#8220;/var/www/adodb/ &#8220;;<br />
$DBtype = &#8220;mysql&#8221;;<br />
$alert_dbname = &#8220;snort&#8221;;<br />
$alert_host = &#8220;localhost&#8221;;<br />
$alert_port = &#8220;&#8221;;<br />
$alert_user = &#8220;snort&#8221;;<br />
$alert_password = &#8220;password on your snort DB&#8221;;</li>
<li>Access the sensor on your browser<br />
<a href="http://192.168.1.x/base">http://192.168.1.x/base</a></li>
<li>You should now see the BASE startup banner, click the      “setup page” link and follow the instructions.</li>
<li>You can create an htaccess to secure the base directory      if you want</li>
</ol>
<p><strong>V1.  Testing Snort</strong></p>
<ol>
<li>Create a simple rule under the /etc/snort/rules and      named it as local.rules. Make sure the line below is  uncommented on      snort.conf to make it work<br />
include $RULE_PATH/local.rules</li>
<li>Create local.rules and insert this line:<br />
alert tcp any any &lt;&gt; any 80 (msg: &#8220;Test web      activity&#8221;;sid:1000001;)</li>
<li>Save and exit. Now restart your Snort and open a web      browser,and go to any websites</li>
<li>You should see number of events with SID 1000001      indicating the your snort is working.  Just check the alert links and      categories to verify your testing. You will see something like this:<a title="http://www.freelinuxtutorials.com/freefiles/base1.PNG" href="http://www.freelinuxtutorials.com/freefiles/base1.PNG" target="_blank"> </a><a title="http://www.freelinuxtutorials.com/freefiles/base1.PNG" href="http://www.freelinuxtutorials.com/freefiles/base1.PNG" target="_blank">http://www.freelinuxtutorials.com/freefiles/base1.PNG</a><br />
<a title="http://www.freelinuxtutorials.com/freefiles/base2.PNG" href="http://www.freelinuxtutorials.com/freefiles/base2.PNG" target="_blank">http://www.freelinuxtutorials.com/freefiles/base2.PNG</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.freelinuxtutorials.com/tutorials/installing-ids-using-snort-with-oinkmaster-barnyard-and-base-on-rhelcentos-64-bit/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<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 local issuer certificate
-Authentication Required. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.freelinuxtutorials.com%2Fquick-tips-and-tricks%2Fconfigure-postfix-to-use-gmail-in-rhelcentos%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.freelinuxtutorials.com%2Fquick-tips-and-tricks%2Fconfigure-postfix-to-use-gmail-in-rhelcentos%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</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>1</slash:comments>
		</item>
		<item>
		<title>Ubuntu 10.04 Lucid Lynx is released</title>
		<link>http://www.freelinuxtutorials.com/news-and-updates/ubuntu-10-04-lucid-lynx-is-released/</link>
		<comments>http://www.freelinuxtutorials.com/news-and-updates/ubuntu-10-04-lucid-lynx-is-released/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 02:06:34 +0000</pubDate>
		<dc:creator>tux</dc:creator>
				<category><![CDATA[News and Updates]]></category>
		<category><![CDATA[announcements]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[lucid lynx]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.freelinuxtutorials.com/?p=342</guid>
		<description><![CDATA[
			
				
			
		
The next big version of Ubuntu Linux OS has now arrived and if offers new exciting features for users like quicker boot speed on almost any machine, along with a social networking-oriented &#8221; Me Menu&#8221;,Ubuntu Software Centre 2.0 for easier access to new software, and a slew of new cloud-based services courtesy of Ubuntu One [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.freelinuxtutorials.com%2Fnews-and-updates%2Fubuntu-10-04-lucid-lynx-is-released%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.freelinuxtutorials.com%2Fnews-and-updates%2Fubuntu-10-04-lucid-lynx-is-released%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>The next big version of Ubuntu Linux OS has now arrived and if offers new exciting features for users like quicker boot speed on almost any machine, along with a social networking-oriented &#8221; Me Menu&#8221;,Ubuntu Software Centre 2.0 for easier access to new software, and a slew of new cloud-based services courtesy of Ubuntu One &#8212; not to mention the Ubuntu One music store.<br />
Ready for the ride. To see the technical overview, read more to <a title="Ubuntu 10.04 Lucid Lynx" href="http://www.ubuntu.com/getubuntu/releasenotes/1004overview" target="_blank">ubuntu.com </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.freelinuxtutorials.com/news-and-updates/ubuntu-10-04-lucid-lynx-is-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting up MySQL Database Replication</title>
		<link>http://www.freelinuxtutorials.com/tutorials/setting-up-mysql-replication/</link>
		<comments>http://www.freelinuxtutorials.com/tutorials/setting-up-mysql-replication/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 03:06:02 +0000</pubDate>
		<dc:creator>tux</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[replication]]></category>

		<guid isPermaLink="false">http://www.freelinuxtutorials.com/?p=334</guid>
		<description><![CDATA[
			
				
			
		
I.Configure Master
1. edit /etc/mysql/my.cnf. We have to enable networking for MySQL,
I.Configure Master
1. edit /etc/mysql/my.cnf. We have to enable networking for MySQL,
#skip-networking
2. Add the following line to the my.cnf
server-id = 1
log-bin=/storage/lun0/db/mysql/FLTVM01-bin
3. restart mysql
#service mysqld restart
4.     log into the MySQL database as root and create a user with replication privileges:
#mysql -u root -p
mysql&#62; GRANT REPLICATION SLAVE [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.freelinuxtutorials.com%2Ftutorials%2Fsetting-up-mysql-replication%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.freelinuxtutorials.com%2Ftutorials%2Fsetting-up-mysql-replication%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I.Configure Master</p>
<p>1. edit /etc/mysql/my.cnf. We have to enable networking for MySQL,</p>
<p>I.Configure Master</p>
<p>1. edit /etc/mysql/my.cnf. We have to enable networking for MySQL,</p>
<p>#skip-networking</p>
<p>2. Add the following line to the my.cnf</p>
<p>server-id = 1<br />
log-bin=/storage/lun0/db/mysql/FLTVM01-bin</p>
<p>3. restart mysql<br />
#service mysqld restart</p>
<p>4.     log into the MySQL database as root and create a user with replication privileges:</p>
<p>#mysql -u root -p<br />
mysql&gt; GRANT REPLICATION SLAVE ON *.* TO &#8217;slaveuser&#8217;@'%&#8217; IDENTIFIED BY &#8216;&lt;some_password&gt;&#8217;; (Replace &lt;some_password&gt; with a real password!)<br />
mysql&gt;FLUSH PRIVILEGES;</p>
<p>5. To accomplish identical data on both master and slave  server, prevent all writes on the master via Lock Tables &amp; Show Log Position<br />
mysql&gt; FLUSH TABLES WITH READ LOCK;<br />
mysql&gt; SHOW MASTER STATUS;</p>
<p>NOTE: Keep this prompt running  in order for lock to be ACTIVE</p>
<p>e.g.</p>
<p>mysql&gt; SHOW MASTER STATUS;<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
| File               | Position  | Binlog_Do_DB | Binlog_Ignore_DB |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
| FLTVM01-bin.000051 | 444132144 |              |                  |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
1 row in set (0.00 sec)</p>
<p>mysql&gt; exit</p>
<p>6. Dump Database</p>
<p>#mysqldump -u root -p&lt;password&gt; &#8211;lock-all-tables –all-databases &gt; alldb.sql</p>
<p>7. Unlock Tables on the master after dumping</p>
<p>mysql&gt; UNLOCK TABLES;</p>
<p>II. Configure Slave</p>
<p>1.Create Database</p>
<p>mysql -u root -p<br />
Enter password:<br />
CREATE DATABASE exampledb;<br />
quit;</p>
<p>2. Restore Database</p>
<p>mysql -u root -p &lt;password&gt; exampledb &lt; /path/to/alldb.sql</p>
<p>3. Configure Slave configuration, assuming master is 192.168.1.2,</p>
<p>server-id=2<br />
master-host=192.168.1.2<br />
master-user=slave_user<br />
master-password=secret<br />
master-connect-retry=60</p>
<p>4. Restart MySQL service<br />
#service mysql restart</p>
<p>5. Issue command Slave Stop and Change master</p>
<p>#mysql -u root -p<br />
Enter password:<br />
mysql&gt; SLAVE STOP;<br />
mysql&gt; CHANGE MASTER TO MASTER_HOST=&#8217;192.168.1.2&#8242;, MASTER_USER=&#8217;slaveuser&#8217;, MASTER_PASSWORD=&#8217;slavepass!&#8217;, MASTER_LOG_FILE=&#8217;FLTVM01-bin.000051&#8242;, MASTER_LOG_POS=444132144;</p>
<p>6. Start Slave</p>
<p>mysql&gt; START SLAVE;<br />
mysql&gt;quit</p>
<p>7. Check for errors<br />
#tail -f /var/log/mysqld.log</p>
<p>III. CHECKING &amp; TESTING</p>
<p>status of the master can be known from mysql prompt:</p>
<p>mysql&gt; SHOW MASTER STATUS;</p>
<p>and slave can be known by:</p>
<p>mysql&gt; SHOW SLAVE STATUS;</p>
<p>To test:</p>
<p>1. On sample database on master, create table</p>
<p>Example:</p>
<p>mysql&gt;use testdb;<br />
mysql&gt;CREATE TABLE example (<br />
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,<br />
data VARCHAR(100)       );</p>
<p>&#8211;&gt; insert data on table</p>
<p>mysql&gt; INSERT INTO example (data)  VALUES (&#8217;Hello world&#8217;);</p>
<p>2. Check the Slave database and see if the following changes are replicated.<br />
mysql&gt;use testdb;<br />
mysql&gt; select * from example;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.freelinuxtutorials.com/tutorials/setting-up-mysql-replication/feed/</wfw:commentRss>
		<slash:comments>0</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 class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.freelinuxtutorials.com%2Fquick-tips-and-tricks%2Fsplitting-up-apache-logs-for-subdomains%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.freelinuxtutorials.com%2Fquick-tips-and-tricks%2Fsplitting-up-apache-logs-for-subdomains%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</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>How to Backup Data on RHEL/CentOS via DVD</title>
		<link>http://www.freelinuxtutorials.com/tutorials/how-to-backup-data-on-rhelcentos-via-dvd/</link>
		<comments>http://www.freelinuxtutorials.com/tutorials/how-to-backup-data-on-rhelcentos-via-dvd/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 08:25:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[DVD]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.freelinuxtutorials.com/?p=317</guid>
		<description><![CDATA[
			
				
			
		
INTRODUCTION
Data backup is the process of making copies of data in order to protect and restore original files whenever data loss happens. Aside from automated routine data backup, this method does not protect against failure and natural disasters. This is where off-site data backup comes in.
OBJECTIVE
To establish an off-site backup of important data such as [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.freelinuxtutorials.com%2Ftutorials%2Fhow-to-backup-data-on-rhelcentos-via-dvd%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.freelinuxtutorials.com%2Ftutorials%2Fhow-to-backup-data-on-rhelcentos-via-dvd%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><em>INTRODUCTION</em></p>
<p>Data backup is the process of making copies of data in order to protect and restore original files whenever data loss happens. Aside from automated routine data backup, this method does not protect against failure and natural disasters. This is where off-site data backup comes in.</p>
<p><em>OBJECTIVE</em></p>
<p>To establish an off-site backup of important data such as website and configuration files, and database, by copying and burning it to a removable media via DVD.</p>
<p>Sample Scenario:</p>
<p>We need to backup the webserver files and database, and burn it on DVD disc.</p>
<p><em>PRE-BACKUP PROCEDURES:</em></p>
<p>1.    Website Files<br />
important directories:<br />
/var/www<br />
/etc/httpd</p>
<p>Assuming you have weekly backup @ FLTWWW01, we can just copy that file in format:<br />
FLTWWW01.freelinuxtutorials.com-var-www-html.yyyymmdd.tar.gz<br />
FLTWWW01.freelinuxtutorials.com-etc-httpd.yyyymmdd.tar.gz</p>
<p>2.    Database</p>
<p>For a consistent copy of database backup, read lock should be implemented on the database. Fortunately, we can do it on the slave database server without interrupting the MySQL service.</p>
<p>Write a script sqlbackup.sh that will be run on FLTVMM1-DBSERVER to stop the slave,read lock and dump the database to a certain location.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
#!/bin/sh<br />
date=`/bin/date +%Y%m%d-%H`</p>
<p>/usr/bin/mysqladmin &#8211;user=root &#8211;password=password stop-slave<br />
/usr/bin/mysqldump &#8211;user=root &#8211;password=password &#8211;lock-all-tables &#8211;all-databases &gt; /storage/temp/backup-${date}.sql<br />
/usr/bin/mysqladmin &#8211;user=root &#8211;password=password start-slave<br />
/bin/tar zcvf backup-${date}.sql.tar.gz backup-${date}.sql</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p><strong>BACKUP PROCESS:</strong></p>
<p><em>Backup Data on DVD</em></p>
<p>1. First install the package dvd+rw-tools<br />
#yum install dvd+rw-tools</p>
<p>2. check if dvd drive is present by displaying the information about disk drive<br />
dvd+rw-mediainfo /dev/dvd</p>
<p>3. Create the ISO image<br />
e.g.<br />
# mkisofs -r -o /tmp/var-www-disk1.iso /var/www</p>
<p>Website Files: (1st DVD)<br />
@FLTVMM1   → /storage/lun1/BACKUP/www/application</p>
<p>#cd /storage/lun1/BACKUP/www/temp<br />
#mkisofs -r -o wwwprod.iso /storage/lun1/BACKUP/www/application/FLTWWW01.freelinuxtutorials.com-var-www-html.yyyymmdd.tar.gz<br />
/storage/lun1/BACKUP/www/applicaiton/FLTWWW01.freelinuxtutorials.com-etc-httpd.yyyymmdd.tar.gz</p>
<p>Database: (2nd DVD)<br />
@FLTVMM1-DBSERVER</p>
<p>#cd /storage/temp<br />
#./sqlbackup.sh (can be scheduled automatically, hours before offsite backup)<br />
#mkisofs -r -o database.iso /storage/temp/backup-yyyymmdd-hh.tar.gz</p>
<p>4. Write the ISO onto the DVD<br />
Website Files:<br />
# growisofs -Z /dev/dvd=/storage/lun1/BACKUP/www/temp/wwwprod.iso</p>
<p>Database:<br />
# growisofs -Z /dev/dvd=/storage/temp/database.iso</p>
<p>5. To append more data for same DVD [Optional]<br />
# growisofs -M /dev/dvd /tmp/file1</p>
<p><em>VERIFICATION:</em></p>
<p>1. To verify if data was burned successfully, insert the DVD on the drive and mount it</p>
<p>#mkdir /mnt/dvd<br />
#mount -t iso9660 -o ro /dev/dvd /mnt/dvd</p>
<p>2. List the files and archive<br />
#ls -lah /mnt/dvd<br />
#tar -tf  file.tar.gz</p>
<p><em>RESTORATION PROCEDURE</em>:</p>
<p>Website Files:<br />
1.    Create the mount directory if not exists<br />
#mkdir /mnt/dvd<br />
2.    Mount the DVD<br />
#mount -t auto /dev/dvd /mnt/dvd<br />
3.    Decompress the files in a particular directory<br />
#cd /tmp<br />
#tar zxvf FLTWWW01.freelinuxtutorials.com-var-www-html.yyyymmdd.tar.gz<br />
#tar zxvf FLTWWW01.freelinuxtutorials.com-etc-httpd.yyyymmdd.tar.gz<br />
4. Select the files/folder that you need and copy to a specific directory</p>
<p>Database:<br />
1. Create the mount directory if not exists<br />
#mkdir /mnt/dvd<br />
2. Mount the DVD<br />
#mount -t auto /dev/dvd /mnt/dvd<br />
3.    Decompress the  sql file in a particular directory<br />
#cd /tmp<br />
#tar zxvf backup-yyyymmdd-hh.tar.gz<br />
4.    A .sql file will be decompress<br />
5.    Restore a specific database using the mysql command<br />
#mysql -u root -p databasename &lt; backup-yyyymmdd-hh.sql</p>
]]></content:encoded>
			<wfw:commentRss>http://www.freelinuxtutorials.com/tutorials/how-to-backup-data-on-rhelcentos-via-dvd/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 class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.freelinuxtutorials.com%2Fquick-tips-and-tricks%2Fautomatic-unlimited-subdomains-via-apache-mod_rewrite%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.freelinuxtutorials.com%2Fquick-tips-and-tricks%2Fautomatic-unlimited-subdomains-via-apache-mod_rewrite%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</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>2</slash:comments>
		</item>
		<item>
		<title>free linux tutorials via mobile</title>
		<link>http://www.freelinuxtutorials.com/news-and-updates/free-linux-tutorials-via-mobile/</link>
		<comments>http://www.freelinuxtutorials.com/news-and-updates/free-linux-tutorials-via-mobile/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 06:15:35 +0000</pubDate>
		<dc:creator>tux</dc:creator>
				<category><![CDATA[News and Updates]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mobile phones]]></category>

		<guid isPermaLink="false">http://www.freelinuxtutorials.com/?p=308</guid>
		<description><![CDATA[
			
				
			
		
http://www.freelinuxtutorials.com/?mobile or
for Iphone users &#8211;&#62; http://www.freelinuxtutorials.com/?iphone
enjoy mobile browsing!

]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.freelinuxtutorials.com%2Fnews-and-updates%2Ffree-linux-tutorials-via-mobile%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.freelinuxtutorials.com%2Fnews-and-updates%2Ffree-linux-tutorials-via-mobile%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><em><a href="../?mobile">http://www.freelinuxtutorials.com/?mobile</a></em> or</p>
<p>for Iphone users &#8211;&gt; <em><a href="../?iphone">http://www.freelinuxtutorials.com/?iphone</a></em></p>
<p><em>enjoy mobile browsing!<br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.freelinuxtutorials.com/news-and-updates/free-linux-tutorials-via-mobile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Full &amp; Incremental MySQL Backup via Mysql-ZRM</title>
		<link>http://www.freelinuxtutorials.com/tutorials/full-incremental-mysql-backup-via-mysql-zrm/</link>
		<comments>http://www.freelinuxtutorials.com/tutorials/full-incremental-mysql-backup-via-mysql-zrm/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 03:06:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[RHEL]]></category>

		<guid isPermaLink="false">http://www.freelinuxtutorials.com/?p=305</guid>
		<description><![CDATA[
			
				
			
		
mysql-zrm is short for Zmanda Recovery Manager for MySQL. It lets you create full logical or raw backups of your databases , generate reports about the backups, verify the integrity of the backups, and recover your databases. It can also send email notifcations about the backup status, and you can implement multiple backup policies.
This procedure [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.freelinuxtutorials.com%2Ftutorials%2Ffull-incremental-mysql-backup-via-mysql-zrm%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.freelinuxtutorials.com%2Ftutorials%2Ffull-incremental-mysql-backup-via-mysql-zrm%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>mysql-zrm is short for Zmanda Recovery Manager for MySQL. It lets you create full logical or raw backups of your databases , generate reports about the backups, verify the integrity of the backups, and recover your databases. It can also send email notifcations about the backup status, and you can implement multiple backup policies.</p>
<p>This procedure was successfully tested and implemented on CentOS 5.X and RHEL 5.X servers.<br />
Pre-requisites:<br />
1.mysql client, MySQL server 4.1 and above<br />
2.perl-DBI and perl-XML-Parser<br />
yum install perl-DBI perl-XML-Parser</p>
<p>Installation:</p>
<p>1.Download mysql-zrm on http://www.zmanda.com/download-zrm.php<br />
2.Get the RPM<br />
wget http://www.zmanda.com/downloads/community/ZRM-MySQL/2.1.1/RPM/MySQL-zrm-2.1.1-1.noarch.rpm<br />
3.Install<br />
rpm -ivh MySQL-zrm-2.1.1-1.noarch.rpm</p>
<p>-The executable files have been moved to /usr/bin, the configuration files are in /etc/mysql-zrm<br />
Important executable files are:</p>
<p>mysql-zrm<br />
mysql-zrm-reporter<br />
mysql-zrm-scheduler</p>
<p>4.Create a backup user in MySQL<br />
mysql&gt;GRANT ALL ON *.* TO &#8216;backup_user&#8217;@localhost IDENTIFIED BY &#8216;backup_pass&#8217;;<br />
mysql&gt; flush privileges;</p>
<p>Configuration:</p>
<p>Main configuration file is /etc/mysql-zrm/mysql-zrm.conf.</p>
<p>Fill important configuration:<br />
vi /etc/mysql-zrm/mysql-zrm.conf</p>
<p>1.Backup level, use 0 for full, 1 is incremental,default is full backup<br />
backup-level=0<br />
2.Backup method,either “raw” or “logical”.use logical<br />
backup-mode=logical</p>
<p>3.Backup type,use regular<br />
backup-type=regular<br />
4.Destination, directory where backups will be stored, default is /var/lib/mysql-zrm. You can specify the location here<br />
destination=/mysql-backup<br />
5.Retention policy, specify in days (D), week(W),months (M) or years(Y)<br />
retention-policy=6M<br />
6.If mysql zrm is done on replication slave, set replication to 1<br />
replication=1<br />
7.Set compression using gzip<br />
compress=1<br />
8.Set all databases of backup set<br />
all-databases=1<br />
9.Specify list of databases ,multiple database separated by space.<br />
databases=database1 database2 database3<br />
10.Set MySQL user parameter<br />
user=backup_user<br />
11.Set MySQL pass<br />
password=backup_pass<br />
12.Host of MySQL server<br />
host=localhost<br />
13.Set mailto adddress<br />
mailto=email@freelinuxtutorials.com<br />
14.Set backup reports<br />
html-reports=backup-status-info<br />
15.Directory where the reports will be created<br />
html-report-directory=/var/www/html/mysql-zrm/reports/</p>
<p>Here&#8217;s what it looks like: (mysql-zrm.conf)</p>
<p>backup-level=0<br />
backup-mode=logical<br />
backup-type=regular<br />
destination=/mysql-backup<br />
retention-policy=6M<br />
compress=1<br />
all-databases=1<br />
user=backup_user<br />
password=backup_pass<br />
host=localhost<br />
mailto=email@freelinuxtutorials.com<br />
html-reports=backup-status-info<br />
html-report-directory=/var/www/html/mysql-zrm/reports/</p>
<p>Testing:</p>
<p>Create first backup in backup set dailyrun. This will immediatley back up all databases to the specified  directory and will also create directory $backupdir/dailyrun.</p>
<p>#mysql-zrm-scheduler &#8211;now &#8211;backup-set dailyrun &#8211;backup-level 0</p>
<p>Email notification will be sent out as well with the status of backup.</p>
<p>Reporting:</p>
<p>To generate a report about the backup status on the command line , execute:</p>
<p>#mysql-zrm-reporter &#8211;where backup-set=dailyrun &#8211;show backup-status-info</p>
<p>You can also generate few other reports with the following commands:</p>
<p>mysql-zrm-reporter &#8211;where backup-set=dailyrun &#8211;show backup-method-info<br />
mysql-zrm-reporter &#8211;where backup-set=dailyrun &#8211;show backup-retention-info<br />
mysql-zrm-reporter &#8211;where backup-set=dailyrun &#8211;show backup-performance-info<br />
mysql-zrm-reporter &#8211;where backup-set=dailyrun &#8211;show restore-full-info<br />
mysql-zrm-reporter &#8211;where backup-set=dailyrun &#8211;show restore-incr-info<br />
mysql-zrm-reporter &#8211;where backup-set=dailyrun &#8211;show replication-info</p>
<p>Scheduling:</p>
<p>To schedule daily incremental and weekly full backups, set this:</p>
<p>#mysql-zrm-scheduler &#8211;add &#8211;interval weekly &#8211;backup-set weeklyrun &#8211;backup-level 0<br />
#mysql-zrm-scheduler &#8211;add &#8211;interval daily &#8211;backup-set dailyrun &#8211;backup-level 1</p>
<p>Check:</p>
<p># mysql-zrm-scheduler &#8211;query<br />
schedule:INFO: ZRM for MySQL Community Edition &#8211; version 2.1.1<br />
Logging to /var/log/mysql-zrm/mysql-zrm-scheduler.log<br />
0 2 * * 0 /usr/bin/zrm-pre-scheduler &#8211;action backup &#8211;backup-set weeklyrun &#8211;backup-level 0 &#8211;interval weekly<br />
0 3 * * * /usr/bin/zrm-pre-scheduler &#8211;action backup &#8211;backup-set dailyrun &#8211;backup-level 1 &#8211;interval daily</p>
<p>Or use “crontab -l” to get same information</p>
<p>If you want to start your daily backup at different time, let say at 1:30AM</p>
<p>mysql-zrm-scheduler &#8211;add &#8211;interval daily &#8211;backup-set dailyrun &#8211;start 1:30 &#8211;backup-level 1</p>
<p>Customized HTML Reports</p>
<p>To create HTML file backup-status-dailyrun.html in /var/www/html/mysql-zrm,execute this:</p>
<p>#mysql-zrm-reporter &#8211;show backup-status-info &#8211;where backup-set=dailyrun &#8211;type html &#8211;output /var/www/html/mysql-zrm/backup-status-dailyrun.html</p>
<p>Verifying Backups:</p>
<p>To check integrity of backup set in dailyrun, use:</p>
<p>#mysql-zrm &#8211;action verify-backup &#8211;backup-set dailyrun</p>
<p>Output something like this:</p>
<p>Use of uninitialized value in concatenation (.) or string at /usr/bin/mysql-zrm line 1305.<br />
INFO: mysql-zrm-version<br />
INFO: Verification successful</p>
<p>Data Recovery</p>
<p>1.To restore data from our MySQL backups, run this command first to find which backups are available.</p>
<p>2. If incremental in daily,</p>
<p>#mysql-zrm-reporter -show restore-info &#8211;where backup-set=dailyrun</p>
<p>Sample:</p>
<p># mysql-zrm-reporter -show restore-info &#8211;where backup-set=dailyrun</p>
<p>REPORT TYPE : restore-info</p>
<p>backup_set  backup_date                  backup_level  backup_directory                          backup_status         comment<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
dailyrun  Thu 14 Jan 2010 03:00:02                1  /mysql-backup/dailyrun/20100114030002     Backup succeeded      &#8212;-<br />
AM SGT<br />
dailyrun  Wed 13 Jan 2010 05:35:53                1  /mysql-backup/dailyrun/20100113173553     Backup succeeded      &#8212;-<br />
PM SGT<br />
dailyrun  Wed 13 Jan 2010 05:35:24                1  /mysql-backup/dailyrun/20100113173524     Backup succeeded      &#8212;-<br />
PM SGT<br />
dailyrun  Wed 13 Jan 2010 05:34:48                0  /mysql-backup/dailyrun/20100113173448     Backup succeeded      &#8212;-<br />
PM SGT</p>
<p>Restore:<br />
If we want to restore the incremental backup  20100113173553, then issue the command.</p>
<p>#mysql-zrm &#8211;action restore &#8211;source-directory /mysql-backup/dailyrun/20100113173553 &#8211;backup-set dailyrun</p>
<p>3.If full backup need to restore, first verify the full backup<br />
#mysql-zrm-reporter -show restore-info &#8211;where backup-set=weeklyrun</p>
<p>Sample Output:<br />
# mysql-zrm-reporter -show restore-info &#8211;where backup-set=weeklyrun</p>
<p>REPORT TYPE : restore-info</p>
<p>backup_set  backup_date                  backup_level  backup_directory                          backup_status         comment<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
weeklyrun  Wed 13 Jan 2010 05:56:51                0  /mysql-backup/weeklyrun/20100113175651    Backup succeeded      &#8212;-                      PM SGT</p>
<p>Restore:</p>
<p>#mysql-zrm &#8211;action restore &#8211;source-directory /mysql-backup/weeklyrun/20100113175651 &#8211;backup-set weeklyrun</p>
]]></content:encoded>
			<wfw:commentRss>http://www.freelinuxtutorials.com/tutorials/full-incremental-mysql-backup-via-mysql-zrm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
