<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6453804165116474533</id><updated>2011-11-28T05:45:16.149+05:30</updated><category term='MYSQL'/><category term='connector'/><category term='pop3S'/><category term='smtp'/><category term='qmailrocks'/><category term='installation'/><category term='cluster'/><category term='AC2726'/><category term='perl'/><category term='multipletomcat linux'/><category term='postfix'/><category term='tomcat'/><category term='Encryption'/><category term='auth'/><category term='open source'/><category term='export'/><category term='ssl 465'/><category term='rpm'/><category term='Jaunty'/><category term='gfs'/><category term='pop3'/><category term='rhel'/><category term='firefox'/><category term='vsftpd'/><category term='find'/><category term='commands'/><category term='configuration'/><category term='plugin'/><category term='tips'/><category term='PGP'/><category term='domain'/><category term='SSL'/><category term='modjk'/><category term='troubleshoot'/><category term='cron'/><category term='mod_jk'/><category term='file'/><category term='blogs'/><category term='update'/><category term='san'/><category term='apache'/><category term='linux'/><category term='jms patch'/><category term='centos'/><category term='Dual MTA'/><category term='reports'/><category term='guide'/><category term='httpd'/><category term='steps'/><category term='howto'/><category term='relay'/><category term='tutorial'/><category term='broadband'/><category term='pbx'/><category term='voip'/><category term='modules'/><category term='CSV'/><category term='usage'/><category term='AsteriskNow'/><category term='tar'/><category term='USB'/><category term='der to pem'/><category term='load balancer'/><category term='CSR'/><category term='failover'/><category term='Qmail'/><category term='kernel'/><category term='errors'/><category term='https'/><category term='tomcat java linux'/><category term='reliance'/><category term='busy'/><category term='Ubuntu'/><category term='iptables'/><category term='new topics'/><category term='clean'/><title type='text'>SK's Tech Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Saravana Kumar</name><uri>http://www.blogger.com/profile/04009363852198982097</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>40</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-7116054526275792974</id><published>2009-11-02T01:36:00.005+05:30</published><updated>2009-11-08T15:03:00.819+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='Jaunty'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Installing Java in Ubuntu 9.04</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;span style=""&gt;&lt;span style="font-family:Helvetica,Arial,sans-serif;"&gt;I was trying to install the latest java version for firefox in Ubuntu 9.04. Current sun-java version available from Jaunty archives is jre1.6u14, while the latest in java site (as of now) is jre1.6u16&lt;br /&gt;Go to this link: &lt;a target="_blank" href="http://java.sun.com/javase/downloads/index.jsp"&gt;http://java.sun.com/javase/&lt;wbr&gt;downloads/index.jsp&lt;/a&gt; and downloaded latest jdk as of today it is jdk-6u16.&lt;br /&gt;&lt;br /&gt;Open terminal and cd to the download directory.&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;$ chmod u+x jdk-6u16-linux-i586.bin&lt;br /&gt;$ sudo mkdir /usr/java&lt;br /&gt;$ sudo mv jdk-6u16-linux-i586.bin /usr/java&lt;br /&gt;$ cd /usr/java&lt;br /&gt;$ sudo ./jdk-6u16-linux-i586.bin&lt;/pre&gt;Accept the license agreement and proceed installing. This will install java in the directory /usr/java/jdk1.6.0_16/&lt;br /&gt;&lt;br /&gt;Now we have to point the system to new installed path. Do this:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;$ sudo update-alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_16/jre/bin/java 2;$ sudo update-alternatives --config java &lt;/pre&gt;Output will be:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style=""&gt;&lt;span style="font-family:Helvetica,Arial,sans-serif;"&gt; &lt;i&gt;There are 3 alternatives which provide `java'.&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=""&gt;&lt;span style="font-family:Helvetica,Arial,sans-serif;"&gt;&lt;i&gt;   Selection    Alternative&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=""&gt;&lt;span style="font-family:Helvetica,Arial,sans-serif;"&gt;&lt;i&gt; ------------------------------&lt;/i&gt; &lt;wbr&gt;&lt;i&gt;-----------------&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=""&gt;&lt;span style="font-family:Helvetica,Arial,sans-serif;"&gt;&lt;i&gt;  +        1    /usr/lib/jvm/java-6-sun/jre/&lt;/i&gt;&lt;wbr&gt;&lt;i&gt;bin/java&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=""&gt;&lt;span style="font-family:Helvetica,Arial,sans-serif;"&gt;&lt;i&gt;           2    /usr/java/jre1.6.0_15/bin/java&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=""&gt;&lt;span style="font-family:Helvetica,Arial,sans-serif;"&gt;&lt;i&gt; *         3    /usr/java/jdk1.6.0_16/jre/bin/&lt;/i&gt;&lt;wbr&gt;&lt;i&gt;java&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=""&gt;&lt;span style="font-family:Helvetica,Arial,sans-serif;"&gt;&lt;i&gt; Press enter to keep the default[*], or type selection number:&lt;/i&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;span style=""&gt;&lt;span style="font-family:Helvetica,Arial,sans-serif;"&gt; I selected 3. Now we will have to point the new java plugin path in firefox.&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;$ cd /usr/lib/firefox-addons/plugins/ ; sudo ln -s /usr/java/jdk1.6.0_16/jre/plugin/i386/ns7/libjavaplugin_oji.so;$ cd /usr/lib/firefox/plugins/ ; sudo ln -s /usr/java/jdk1.6.0_16/jre/plugin/i386/ns7/libjavaplugin_oji.so&lt;/pre&gt;Note that firefox saw the latest plugin only after i linked it to both the directories. Then the new version started working.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="zemanta-pixie"&gt;&lt;img src="http://img.zemanta.com/pixy.gif?x-id=ecb7235b-0b63-8528-986f-1fe62f1723cc" alt="" class="zemanta-pixie-img" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-7116054526275792974?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/7116054526275792974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2009/11/installing-java-in-ubuntu-904.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/7116054526275792974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/7116054526275792974'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2009/11/installing-java-in-ubuntu-904.html' title='Installing Java in Ubuntu 9.04'/><author><name>Saravana Kumar</name><uri>http://www.blogger.com/profile/04009363852198982097</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-8442886547138800371</id><published>2009-09-14T22:00:00.001+05:30</published><updated>2009-09-14T22:00:37.973+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='reliance'/><category scheme='http://www.blogger.com/atom/ns#' term='AC2726'/><category scheme='http://www.blogger.com/atom/ns#' term='broadband'/><category scheme='http://www.blogger.com/atom/ns#' term='Jaunty'/><category scheme='http://www.blogger.com/atom/ns#' term='USB'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Installing USB modem ZTE AC2726 in Ubuntu 9.04 Jaunty</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Recently i successfully installed ZTE AC-2726 modem that came with reliance wireless broadband connection. Below are the steps:&lt;br/&gt;&lt;br/&gt;Insert the modem in USB interface and see if that gets detected.&lt;br/&gt;&lt;br/&gt;&lt;i&gt;$&lt;/i&gt; &lt;i&gt;lsusb&lt;br/&gt;Bus 005 Device 002: ID 19d2:fff5&lt;/i&gt;&lt;br/&gt;&lt;br/&gt;I noticed in /var/log/messsages that the device is detected as usb storage. To make it detected as modem we will use usb-modeswitch package. It is a Switching tool for controlling "flip flop" USB devices.&lt;br/&gt;&lt;br/&gt;Download usb_switch package from &lt;a href='http://packages.ubuntu.com/karmic/i386/usb-modeswitch/download' target='_blank'&gt;here&lt;/a&gt; and install.&lt;br/&gt;&lt;i&gt;$&lt;/i&gt; &lt;i&gt;sudo dpkg -i usb-modeswitch_1.0.2-1_i386.&lt;/i&gt;&lt;wbr/&gt;&lt;i&gt;deb&lt;/i&gt;&lt;br/&gt;&lt;br/&gt;Unplug and plugin the modem back.&lt;br/&gt;&lt;br/&gt;&lt;i&gt;$&lt;/i&gt; &lt;i&gt;lsusb&lt;br/&gt;Bus 005 Device 004: ID 19d2:fff1&lt;/i&gt; &amp;lt;- Notice the change in product id&lt;br/&gt;&lt;br/&gt;&lt;i&gt;$ sudo modprobe usbserial vendor=0x19d2 product=0xfff1&lt;/i&gt;&lt;br/&gt;&lt;br/&gt;You can see in the logs that the modem is detected correctly now. To detect &amp;amp; configure the dialer config run:&lt;br/&gt;&lt;br/&gt;&lt;i&gt;$ sudo wvdialconf&lt;/i&gt;&lt;br/&gt;&lt;br/&gt;Check and add the missing entries in wvdial conf as found below:&lt;br/&gt;&lt;i&gt;$ sudo vi /etc/wvdial.conf&lt;/i&gt;&lt;br/&gt;&lt;i&gt;Phone = #777&lt;br/&gt;Password = &amp;lt;Your Password&amp;gt;&lt;br/&gt;Username = &amp;lt;Your Login Name&amp;gt;&lt;br/&gt;Baud = 460800&lt;br/&gt;Stupid Mode = 1&lt;br/&gt;New PPPD = 1&lt;br/&gt;Tonline = 0&lt;/i&gt;&lt;br/&gt;&lt;br/&gt;Note: Give a valid username &amp;amp; password in the corresponding lines above and uncomment them (Hint: remove  ";" from the beginning of the line).&lt;br/&gt;&lt;br/&gt;&lt;i&gt;$ sudo wvdial&lt;/i&gt;&lt;br/&gt;&lt;br/&gt;The connection started working. Note that you can also configure gnome-ppp or kpp to connect.&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=312d33d1-9512-81f9-b793-203a10cc1231' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-8442886547138800371?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/8442886547138800371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2009/09/installing-usb-modem-zte-ac2726-in.html#comment-form' title='39 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/8442886547138800371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/8442886547138800371'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2009/09/installing-usb-modem-zte-ac2726-in.html' title='Installing USB modem ZTE AC2726 in Ubuntu 9.04 Jaunty'/><author><name>Saravana Kumar</name><uri>http://www.blogger.com/profile/04009363852198982097</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>39</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-6174893806610911816</id><published>2009-09-11T01:03:00.001+05:30</published><updated>2009-09-11T01:03:35.172+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='configuration'/><category scheme='http://www.blogger.com/atom/ns#' term='voip'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='update'/><category scheme='http://www.blogger.com/atom/ns#' term='guide'/><category scheme='http://www.blogger.com/atom/ns#' term='AsteriskNow'/><title type='text'>Asterisk Updates</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;font size='-1'&gt;&lt;font face='Helvetica, Arial, sans-serif'&gt;In my asterisk server i installed all updates available from the repos. After rebooting the server, all my iax2 extensions stopped working.&lt;br/&gt;&lt;br/&gt;I also found that there is one more interface virbr0 up with ip address 192.168.122.1. I stopped dnsmasq service which was listening on this ip. Then disabled dnsmasq (chkconfig dnsmasq off). Rebooted the box. Still the interface was present.&lt;br/&gt;&lt;br/&gt;Since there is no use of this service in my server i removed dnsmaq along with all the dependencies. Did this:&lt;br/&gt;# rpm -e dnsmasq libvirt-0.3.3-14.el5_3.1.i386 NetworkManager-0.7.0-4.el5_3.&lt;wbr/&gt;i386 NetworkManager-glib-0.7.0-4.&lt;wbr/&gt;el5_3.i386 libvirt-python-0.3.3-14.el5_3.&lt;wbr/&gt;1.i386&lt;br/&gt;&lt;br/&gt;The Virtual Interface went away but still iax2 extensions were not working. Then, found the following error in /var/log/asterisk/full&lt;br/&gt;ERROR[2659] chan_iax2.c: Call rejected, CallToken Support required. If unexpected, resolve by placing address x.x.x.x in the calltokenignore list or setting user yyyy requirecalltoken=no&lt;br/&gt;&lt;br/&gt;This is due to the security enhancement done in asterisk recently. IAX2 is now secured by call tokens which my iax2 doesn't support still. So i went ahead disabling this feature for now:&lt;br/&gt;&lt;br/&gt;vi /etc/asterisk/iax.conf&lt;br/&gt;Added calltokenoptional = &lt;a href='http://0.0.0.0/0.0.0.0' target='_blank'&gt;0.0.0.0/0.0.0.0&lt;/a&gt; to the end. Then did: /usr/sbin/amportal restart&lt;br/&gt;&lt;br/&gt;All iax2 extensions started working again. May be i should start looking for upgrading my clients to support call tokens for improved security.&lt;br/&gt;&lt;br/&gt;References:&lt;br/&gt;&lt;a href='http://www.venturevoip.com/allnews.php?count=99999' target='_blank'&gt;http://www.venturevoip.com/&lt;wbr/&gt;allnews.php?count=99999&lt;/a&gt;&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size='-1'&gt;&lt;font face='Helvetica, Arial, sans-serif'&gt;&lt;a href='http://downloads.asterisk.org/pub/security/AST-2009-006.html' target='_blank'&gt;http://downloads.asterisk.org/&lt;wbr/&gt;pub/security/AST-2009-006.html&lt;/a&gt;&lt;br/&gt;Details are available in this pdf: &lt;a href='http://svn.digium.com/svn/asterisk/branches/1.4/doc/IAX2-security.pdf' target='_blank'&gt;http://svn.digium.com/svn/&lt;wbr/&gt;asterisk/branches/1.4/doc/&lt;wbr/&gt;IAX2-security.pdf&lt;/a&gt;&lt;/font&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=3a42776f-1a60-8ee6-b545-43900264217e' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-6174893806610911816?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/6174893806610911816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2009/09/asterisk-updates.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/6174893806610911816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/6174893806610911816'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2009/09/asterisk-updates.html' title='Asterisk Updates'/><author><name>Saravana Kumar</name><uri>http://www.blogger.com/profile/04009363852198982097</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-4750465124361672648</id><published>2009-05-07T00:29:00.001+05:30</published><updated>2009-05-07T00:29:24.181+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='configuration'/><category scheme='http://www.blogger.com/atom/ns#' term='installation'/><category scheme='http://www.blogger.com/atom/ns#' term='voip'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='AsteriskNow'/><category scheme='http://www.blogger.com/atom/ns#' term='guide'/><category scheme='http://www.blogger.com/atom/ns#' term='steps'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><category scheme='http://www.blogger.com/atom/ns#' term='troubleshoot'/><category scheme='http://www.blogger.com/atom/ns#' term='open source'/><category scheme='http://www.blogger.com/atom/ns#' term='pbx'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='reports'/><title type='text'>Reports work in AsteriskNow 1.5</title><content type='html'>I suppose you have already &lt;a href="http://techsk.blogspot.com/2009/04/asterisknow-15-installation-and.html"&gt;installed AsteriskNow 1.5&lt;/a&gt; and you would have found that reports don't work out of the box. It always says "No data". Apparently the system is not logging the calls and we have to enable this with some additional configuration. Below are the steps for that:&lt;br /&gt;&lt;br /&gt;Login to your asterisk server as root and type &lt;span style="font-style: italic;"&gt;yum install asterisk-addons-mysql&lt;/span&gt;. Select Y when it asks for installation. Once this is done you can see that all calls that go through your server are tracked and reported. But the Admin web interface displays the following error: reporting an error "Asterisk Manager Connection Failure" (If you don't get that error then below step is not required).&lt;br /&gt;&lt;br /&gt;To fix the error go to web interface, Choose Administrators under Basic section. Select admin user and give the password (same as what you have in amportal.conf and manager.conf files). Apply changes. That's it.&lt;br /&gt;&lt;br /&gt;After that the system will starts tracking all the calls getting through it.&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-4750465124361672648?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/4750465124361672648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2009/05/reports-work-in-asterisknow-15.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/4750465124361672648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/4750465124361672648'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2009/05/reports-work-in-asterisknow-15.html' title='Reports work in AsteriskNow 1.5'/><author><name>Saravana Kumar</name><uri>http://www.blogger.com/profile/04009363852198982097</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-2363915947952840045</id><published>2009-04-06T23:54:00.003+05:30</published><updated>2009-04-16T00:06:05.220+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='open source'/><category scheme='http://www.blogger.com/atom/ns#' term='pbx'/><category scheme='http://www.blogger.com/atom/ns#' term='configuration'/><category scheme='http://www.blogger.com/atom/ns#' term='installation'/><category scheme='http://www.blogger.com/atom/ns#' term='voip'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='guide'/><category scheme='http://www.blogger.com/atom/ns#' term='AsteriskNow'/><category scheme='http://www.blogger.com/atom/ns#' term='steps'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><category scheme='http://www.blogger.com/atom/ns#' term='troubleshoot'/><title type='text'>AsteriskNow 1.5 + installation and configuartion</title><content type='html'>&lt;a href="http://asterisknow.org/node/48579"&gt;AsteriskNow 1.5&lt;/a&gt; was recently released. I already had a box with 1.0.2 version and thought of giving the new version a try. &lt;a href="http://asterisknow.org/downloads"&gt;Download&lt;/a&gt;ed the ISO from the site and burned it to a CD. The new version is built on CentOS 5.3. I installed the new version in the same system overwriting 1.0.2. Note that the installation did not detect the old version nor did it give me any option for upgrade. Since my server was not in production i went ahead removing all the partitions and reinstalled the new version. If you have a production box backup the configuration files or install the new version in a test system and then copy the existing setup/accounts. You have been warned.&lt;br /&gt;&lt;br /&gt;I installed AsteriskNow with the default partitions schema ( it creates all partitions under a single LVM). Once installation is complete, remove the CD and click reboot. After the OS boots it asks to configure the following:&lt;br /&gt;&lt;br /&gt;Authentication, Firewall, Network, System Services&lt;br /&gt;&lt;br /&gt;Authentication - Configure any extra authentication such as ldap.&lt;br /&gt;Firewall - You can enable firewall (remember to allow all required ports like sip, iax &amp;amp; zap) if needed.&lt;br /&gt;Network - Configure you network interfaces. This config sets the IP address of all interfaces in the system. Note that eth0 alone is enabled by default. Other interfaces must be enabled manually(Edit /etc/sysconfig/network-interfaces/ifcfg-ethx and set ONBOOT=yes).&lt;br /&gt;System Services - Disabled any unwanted services.&lt;br /&gt;&lt;br /&gt;After the above is done exit the wizard to login to the box. You will also have to restart the network service to enable all interfaces after login to the system as root. Immediately after the first login i ran a update&lt;br /&gt;&lt;br /&gt;# yum update.&lt;br /&gt;&lt;br /&gt;This installed a new version of kernel(2.6.18-128.1.6.el5), asterisk and dahdi modules. So i rebooted the box.(Default kernel is 2.6.18-128.1.1.el5).&lt;br /&gt;&lt;br /&gt;After the system reboots, open the web interface in your favourite browser: http://&amp;lt;your-asterisk-server-ip&amp;gt;. When you click the FreePBX Administration link it asks you to enter the password. Asterisk 1.5 by default has two administrator user accounts with default password as specified below.&lt;br /&gt;Username admin, Password - admin&lt;br /&gt;Username freepbx, Password - fpbx&lt;br /&gt;&lt;br /&gt;We will now change the default password of both admin accounts and secure the system. First let us change the admin user's password. In the web interface select Administrators tab in the Basic section. Click the admin user (in the top right) and give the new password of your choice. We are done.&lt;br /&gt;&lt;br /&gt;Note: I did the following changes from root login in the asterisk box. The web interface prompts you to reload the config after every change you do. You can reload the config after all the changes are done.&lt;br /&gt;&lt;br /&gt;To change freepbx user's password you have to change the entries in two files (we will backup the original files) and also change the mysql password.&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;# cd /etc/&lt;br /&gt;# cp amportal.conf amportal.conf.orig&lt;br /&gt;# vi amportal.conf&lt;br /&gt;AMPDBPASS=&amp;lt;new password&amp;gt;&lt;br /&gt;&lt;br /&gt;# cd /etc/asterisk&lt;br /&gt;# cp cdr_mysql.conf cdr_mysql.conf.orig&lt;br /&gt;# vi cdr_mysql.conf&lt;br /&gt;password=&amp;lt;new password&amp;gt; &lt;/code&gt;&lt;/pre&gt;Now we will change the password for mysql:&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;# mysql -p  (Just press enter in the password Prompt)&lt;br /&gt;mysql &amp;gt; SET PASSWORD FOR freepbx@localhost=PASSWORD('new password'); &lt;/code&gt;&lt;/pre&gt;The web interface reports the following errors at this point (Yes, these errors are there in the fresh installation itself).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; Notice Memory Limit Changed&lt;/span&gt; - To fix this edit /etc/php.ini and change memory_limit=100M. (You have to restart httpd after this).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; Default Asterisk Manager Password Used&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;You have to change this in two files&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;# cd /etc/&lt;br /&gt;# vi amportal.conf&lt;br /&gt;AMPMGRPASS=&amp;lt;new password&amp;gt;&lt;br /&gt;&lt;br /&gt;# cd  /etc/asterisk&lt;br /&gt;# cp manager.conf manager.conf.orig&lt;br /&gt;# vi manager.conf&lt;br /&gt;secret = &amp;lt;new password&amp;gt; (Must be same as what you gave for AMPMGRPASS in amportal.conf). &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; No email address for online update checks&lt;/span&gt; - Go to General Settings Tab under Basic and give an email address in the Update Email: text box. (I have given my email id here).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Could not reload FOP server&lt;/span&gt; - For this we will first install the newest FOP version and then setup httpd to run as asterisk user (By default httpd runs as apache user).&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;# cd /root&lt;br /&gt;# wget &lt;a href="http://www.asternic.org/files/op_panel-0.29.tar.gz" target="_blank"&gt;http://www.asternic.org/files/&lt;wbr&gt;op_panel-0.29.tar.gz&lt;/a&gt;&lt;br /&gt;# cd /var/www/html/panel&lt;br /&gt;# cp op_server.pl op_server.pl.orig&lt;br /&gt;# cp operator_panel.swf operator_panel.swf.orig&lt;br /&gt;# tar zxfv /root/op_panel-0.29.tar.gz&lt;br /&gt;# cp op_panel-0.29/flash/operator_&lt;wbr&gt;panel.swf .&lt;br /&gt;# cp op_panel-0.29/op_server.pl .&lt;br /&gt;# cd /var/lib/asterisk/bin/&lt;br /&gt;# ./retrieve_conf&lt;br /&gt;&lt;br /&gt;# cd /etc/httpd/conf&lt;br /&gt;# cp httpd.conf httpd.conf.orig&lt;br /&gt;# vi httpd.conf&lt;br /&gt;Find the line User apache and change it to User asterisk. Save the file and exit.&lt;br /&gt;# service httpd restart &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;After this click on Apply Configuration Changes in the web interface. Then the webinterface reports about module upgrade. Goto Module admin tab and click Check for upgrade online. Click Upgrade all and then click Process. Press Confirm. All modules will upgrade automatically.&lt;br /&gt;&lt;br /&gt;Now there won't be any errors or other warnings in the web interaface. You can create extensions, inbound/outbound settings as required.&lt;br /&gt;&lt;br /&gt;I found fixes from the following links:&lt;br /&gt;&lt;a href="http://www.freepbx.org/forum/freepbx/users/freepbx-panel-flashing-red-and-green" target="_blank"&gt;http://www.freepbx.org/forum/freepbx/users/freepbx-panel-flashing-red-and-green&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.asternic.org/" target="_blank"&gt;http://www.asternic.org/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.freepbx.org/support/documentation/faq/changing-the-asterisk-manager-password" target="_blank"&gt;http://www.freepbx.org/support/documentation/faq/changing-the-asterisk-manager-password&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-2363915947952840045?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/2363915947952840045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2009/04/asterisknow-15-installation-and.html#comment-form' title='60 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/2363915947952840045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/2363915947952840045'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2009/04/asterisknow-15-installation-and.html' title='AsteriskNow 1.5 + installation and configuartion'/><author><name>Saravana Kumar</name><uri>http://www.blogger.com/profile/04009363852198982097</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>60</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-8997956372974575803</id><published>2009-04-01T00:55:00.001+05:30</published><updated>2009-04-01T00:55:22.251+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ssl 465'/><category scheme='http://www.blogger.com/atom/ns#' term='domain'/><category scheme='http://www.blogger.com/atom/ns#' term='smtp'/><category scheme='http://www.blogger.com/atom/ns#' term='relay'/><category scheme='http://www.blogger.com/atom/ns#' term='postfix'/><category scheme='http://www.blogger.com/atom/ns#' term='auth'/><title type='text'>Selectively relay emails using postfix</title><content type='html'>Several machines in my internal network run automated jobs and send out emails. All emails were getting delivered without problems and one fine day my public IP got listed in &lt;a href="http://en.wikipedia.org/wiki/DNSBL"&gt;RBL&lt;/a&gt;s and the mail servers, using those RBLs, stopped accepting mails from mine.&lt;br /&gt;&lt;br /&gt;I have now set my main network router to restrict outgoing port 25 so that my public ip doesn't get black listed again. This means Internal machines cannot send mails to any of the domains outside my network. I needed a mechanism to route all my emails through my external mail server which has a proper mx record. My external &lt;a href="http://techsk.blogspot.com/2007/05/dual-mta-qmail-contd.html"&gt;email server&lt;/a&gt;, that is outside my network, allows users to relay emails only after successful auth on port 465 (SSL).&amp;nbsp; I configured postfix for this. &lt;br /&gt;&lt;br /&gt;Note that since &lt;a href="http://www.postfix.org/SOHO_README.html"&gt;Postfix does not deliver mails via port 465&lt;/a&gt; i used stunnel for smtps connection between my Postfix box, acting as &lt;a href="http://www.postfix.org/TLS_README.html#client_smtps"&gt;smtps client &lt;/a&gt;here, and the external mail server.&lt;br /&gt;&lt;br /&gt;Let us first start with installing postfix. We will also see how to route emails from sendmail through postfix.&lt;br /&gt;&lt;br /&gt;Note: In the below config example.com is the local domain of postfix box and example1.com is the external domain.&lt;br /&gt;&lt;br /&gt;# yum install postfix&lt;br /&gt;&lt;br /&gt;We will first configure stunnel to forward all connections to the external mail server.&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt; # vi /etc/stunnel/stunnel.conf&lt;br /&gt;client = yes&lt;br /&gt;[rev-smtps]&lt;br /&gt;accept = 127.0.0.1:2525&lt;br /&gt;connect = &amp;lt;externalmailserver&amp;gt;:465 &lt;/code&gt;&lt;/pre&gt; The above configuration makes stunnel to listen on localhost's port 2525 and forward everything from that port to mail server's 465. Certificates are accepted automatically. &lt;br /&gt;&lt;br /&gt;Let us start stunnel.&lt;br /&gt;&lt;br /&gt;# stunnel /etc/stunnel/stunnel.conf (You can put this line in /etc/rc.local so that the service starts automatically after the machine is reboots).&lt;br /&gt;&lt;br /&gt;Now try connecting to the port '2525' with&lt;br /&gt;# telnet localhost 2525&lt;br /&gt;&lt;br /&gt;You will see the greeting from the remote SMTP server. Now we will configure postfix to authenticate with the remote email server and route all such connections through stunnel. &lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt; # vi /etc/postfix/main.cf&lt;br /&gt;smtp_sasl_auth_enable = yes&amp;nbsp; # Enables auth through ssl&lt;br /&gt;smtp_sasl_security_options=&lt;br /&gt;smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd # specifies the password file&lt;br /&gt;transport_maps = hash:/etc/postfix/transport # this will tell postfix to selectively forward or relay emails.&lt;br /&gt;relay_domains = $mydestination, example1.com # list of all domains the server will accept to deliver email for.&lt;br /&gt;inet_interfaces = $myhostname, localhost # Interfaces in which postfix listens on&lt;br /&gt;mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, example.com # Local delivery domains&lt;br /&gt;home_mailbox = Mailbox &lt;/code&gt;&lt;/pre&gt; Save the file.&lt;br /&gt;&lt;br /&gt;We can configure different email servers for each domain with postfix's transport file. &lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;# vi /etc/postfix/transport&lt;br /&gt;example1.com smtp:127.0.0.1:2525&lt;br /&gt;any-other-domain.com smtp:127.0.0.1:2525 # You can mention any other domains here if your external email allows relaying mails.&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; Above config will forward all mails destined to example1.com and any-other-domain.com through the stunnel server which will inturn connect us to the external email server. &lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;# vi /etc/postfix/sasl_passwd&lt;br /&gt;[127.0.0.1]:2525 username@example1.com:password &lt;/code&gt;&lt;/pre&gt; Note that you can give only one username:password combination for one email server (127.0.0.1:2525 in this case).&lt;br /&gt;&lt;br /&gt;Save this file.&lt;br /&gt;&lt;br /&gt;Create maps so that postfix reads the new configuration. &lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;# postmap /etc/postfix/sasl_passwd&lt;br /&gt;# postmap /etc/postfix/transport&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; &lt;br /&gt;In all my Internal servers i have sendmail. Now i have to tell sendmail to route emails through the postfix box. I did this:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;# vi /etc/mail/mailtertable&lt;br /&gt;example.com smtp:[x.x.x.x]    # substitute the ip address of your postfix server instead of x.x.x.x&lt;br /&gt;example1.com smtp:[x.x.x.x]    # substitute the ip address of your postfix server instead of x.x.x.x&lt;br /&gt;any-other-domain.com smtp:[x.x.x.x]    # substitute the ip address of your postfix server instead of x.x.x.x&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; You will also have to add mx entries for example.com in your DNS. &lt;br /&gt;&lt;br /&gt;With the above config, this is what would happen:&lt;br /&gt;1. Any mail sent from internal servers (incl the postfix server itself) to user@example.com will be delivered to postfix's corresponding user mailbox.&lt;br /&gt;2. Any mail sent from internal servers (incl the postfix server itself) to user@example1.com (or any-other-domain.com) will be forwarded to the external mail server's 465 port after authenticating as user@exampe1.com user.&lt;br /&gt;3. Any mail from poxfix box to user@localhost or user@hostname-of-the-postfix-box will be delivered locally.&lt;br /&gt;&lt;br /&gt;Note that any mail sent to other domains through this postfix server will be rejected.&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-8997956372974575803?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/8997956372974575803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2009/04/selectively-relay-emails-using-postfix.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/8997956372974575803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/8997956372974575803'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2009/04/selectively-relay-emails-using-postfix.html' title='Selectively relay emails using postfix'/><author><name>Saravana Kumar</name><uri>http://www.blogger.com/profile/04009363852198982097</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-3557131957266837675</id><published>2009-03-22T00:44:00.002+05:30</published><updated>2010-03-31T09:31:29.590+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='modjk'/><category scheme='http://www.blogger.com/atom/ns#' term='failover'/><category scheme='http://www.blogger.com/atom/ns#' term='cluster'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><category scheme='http://www.blogger.com/atom/ns#' term='httpd'/><title type='text'>Tomcat Failover Setup with Apache2+modjk</title><content type='html'>Tomcat works fairly well under heavy loads. For critical services we will need some type of backup/failover mechanism. This tutorial is for those who want to configure apache to failover between two tomcat instances. When the first tomcat service fails, apache-httpd automatically routes the requests to second tomcat. &lt;br /&gt;&lt;br /&gt;This tutorial shows how to configure failover load balancing between two tomcat instances in the same server (i have also shown how to do this for tomcat instances in two different servers). For this i am assuming you know how to &lt;a href="http://techsk.blogspot.com/2008/02/how-to-configure-2-or-more-tomcat.html"&gt;install multiple tomcat instances in the same machine&lt;/a&gt;. This is only slightly different from &lt;a href="http://techsk.blogspot.com/2009/03/load-balancing-tomcat-with-apache-and.html"&gt;load balancing between two tomcat instances&lt;/a&gt; as you see below in the sample workers.properties file.&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;#&lt;br /&gt;# workers.properties&lt;br /&gt;#&lt;br /&gt;# Below Entry Specifies the load balance factor when used with a load balancing worker.&lt;br /&gt;# Note: ----&amp;gt; lbfactor must be &amp;gt; 0,&amp;nbsp; Low lbfactor means less work done by the worker.&lt;br /&gt;# worker.tomcat1.lbfactor=100&lt;br /&gt;&lt;br /&gt;# In Unix, we use forward slashes:&lt;br /&gt;ps=/&lt;br /&gt;&lt;br /&gt;# list the workers by name&lt;br /&gt;&lt;br /&gt;# Workers that are member of lb should not be in the list.&lt;br /&gt;worker.list = failover&lt;br /&gt;&lt;br /&gt;# ------------------------&lt;br /&gt;# Tomcat1 Primary &lt;br /&gt;# ------------------------&lt;br /&gt;worker.tomcat1.port=8009        # You can specify your tomcat instance's ajp port here&lt;br /&gt;worker.tomcat1.host=localhost # Specify any hostname/IP here if tomcat is running in a remote server&lt;br /&gt;worker.tomcat1.type=ajp13&lt;br /&gt;worker.tomcat1.lbfactor=1&lt;br /&gt;worker.tomcat1.connection_pool_timeout=600&lt;br /&gt;worker.tomcat1.socket_timeout=600&lt;br /&gt;worker.tomcat1.redirect=tomcat2&lt;br /&gt;&lt;br /&gt;# ------------------------&lt;br /&gt;# Tomcat2 Failover&lt;br /&gt;# ------------------------&lt;br /&gt;worker.tomcat2.port=9009        # You can specify your tomcat instance's ajp port here&lt;br /&gt;worker.tomcat2.host=localhost # Specify any hostname/IP here if tomcat is running in a remote server&lt;br /&gt;worker.tomcat2.type=ajp13&lt;br /&gt;worker.tomcat2.lbfactor=1&lt;br /&gt;worker.tomcat2.connection_pool_timeout=600&lt;br /&gt;worker.tomcat2.socket_timeout=600&lt;br /&gt;worker.tomcat2.activation=disabled # Requests are sent to the disabled worker only if first worker fails&lt;br /&gt;&lt;br /&gt;# ------------------------&lt;br /&gt;# Failover worker&lt;br /&gt;# ------------------------&lt;br /&gt;#&lt;br /&gt;# The loadbalancer (type lb) worker performs weighted round-robin&lt;br /&gt;# load balancing with sticky sessions.&lt;br /&gt;# Note:&lt;br /&gt;# ----&amp;gt; If a worker dies, the load balancer will check its state&lt;br /&gt;# once in a while. Until then all work is redirected to peer&lt;br /&gt;# worker.&lt;br /&gt;worker.failover.type=lb&lt;br /&gt;worker.failover.balance_workers=tomcat1,tomcat2&lt;br /&gt;worker.failover.sticky_session=False&lt;br /&gt;worker.failover.sticky_session_force=False&lt;br /&gt;&lt;br /&gt;# END workers.properties&lt;br /&gt;&lt;/code&gt; &lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-3557131957266837675?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/3557131957266837675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2009/03/tomcat-failover-setup-with-apache2modjk.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/3557131957266837675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/3557131957266837675'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2009/03/tomcat-failover-setup-with-apache2modjk.html' title='Tomcat Failover Setup with Apache2+modjk'/><author><name>Saravana Kumar</name><uri>http://www.blogger.com/profile/04009363852198982097</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-7150724413703543710</id><published>2009-03-22T00:36:00.001+05:30</published><updated>2009-03-22T00:36:52.187+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='cluster'/><category scheme='http://www.blogger.com/atom/ns#' term='load balancer'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><category scheme='http://www.blogger.com/atom/ns#' term='httpd'/><title type='text'>Load Balancing tomcat with Apache and mod jk</title><content type='html'>Tomcat works fairly under heavy loads. But many a times we would like to distribute the requests to more than one server to minimize response time and there by improving the user experience. This tutorial shows how to configure load balancing (distribute the load) between two tomcat instances in the same system (i have also shown how to do this for tomcat instances in two different servers). For this i am assuming you know how to &lt;a href="http://techsk.blogspot.com/2008/02/how-to-configure-2-or-more-tomcat.html"&gt;install multiple tomcat instances in the same machine&lt;/a&gt; and also know &lt;a href="http://techsk.blogspot.com/2008/12/connecting-apache-with-tomcat-using.html"&gt;how to connect apache with tomcat using mod_jk&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;All we will do here is to add a new worker to the worker.properties file we already saw in the previous tutorials with Apache httpd 2.x, tomcat 6.x and tomcat-connector 1.2.27.&lt;br /&gt;&lt;br /&gt;Below is the content of workers.properties file. &lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;#&lt;br /&gt;#workers.properties&lt;br /&gt;#&lt;br /&gt;# Below Entry Specifies the load balance factor when used with a load balancing worker.&lt;br /&gt;# Note: ----&amp;gt; lbfactor must be &amp;gt; 0, Low lbfactor means less work done by the worker.&lt;br /&gt;# worker.tomcat1.lbfactor=100&amp;nbsp;&lt;br /&gt;&lt;br /&gt;# In Unix, we use forward slashes:&lt;br /&gt;ps=/&lt;br /&gt;&lt;br /&gt;# list the workers by name&lt;br /&gt;&lt;br /&gt;# Workers that are member of lb should not be in the list.&lt;br /&gt;worker.list = loadbalancer&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;# ------------------------&lt;br /&gt;# First worker&lt;br /&gt;# ------------------------&lt;br /&gt;worker.tomcat1.port=8009      # Give the ajp port of the first tomcat instance here&lt;br /&gt;worker.tomcat1.host=localhost # You can mention any other hostname or IP here&lt;br /&gt;worker.tomcat1.type=ajp13&lt;br /&gt;worker.tomcat1.lbfactor=100    &lt;br /&gt;worker.tomcat1.connection_pool_timeout=600&lt;br /&gt;worker.tomcat1.socket_timeout=600&lt;br /&gt;worker.tomcat1.recovery_options=16&lt;br /&gt;&lt;br /&gt;# ------------------------&lt;br /&gt;# Second worker&lt;br /&gt;# ------------------------&lt;br /&gt;worker.tomcat2.port=9009      # Give the ajp port of the first tomcat instance here&lt;br /&gt;worker.tomcat2.host=localhost # You can mention any other hostname or IP here&lt;br /&gt;worker.tomcat2.type=ajp13&lt;br /&gt;worker.tomcat2.lbfactor=100&lt;br /&gt;worker.tomcat2.connection_pool_timeout=600&lt;br /&gt;worker.tomcat2.socket_timeout=600&lt;br /&gt;worker.tomcat2.recovery_options=16&lt;br /&gt;&lt;br /&gt;# ------------------------&lt;br /&gt;# Load Balancer worker&lt;br /&gt;# ------------------------&lt;br /&gt;#&lt;br /&gt;# The loadbalancer (type lb) worker performs weighted round-robin&lt;br /&gt;# load balancing with sticky sessions.&lt;br /&gt;# Note:&lt;br /&gt;# ----&amp;gt; If a worker dies, the load balancer will check its state&lt;br /&gt;#once in a while. Until then all work is redirected to peer&lt;br /&gt;# worker.&lt;br /&gt;worker.loadbalancer.type=lb&lt;br /&gt;worker.loadbalancer.balance_workers=tomcat1, tomcat2&lt;br /&gt;worker.loadbalancer.sticky_session=False&lt;br /&gt;worker.loadbalancer.sticky_session_force=False&lt;br /&gt;&lt;br /&gt;# END workers.properties&lt;br /&gt;&lt;/code&gt; &lt;/pre&gt;&lt;br /&gt;Note: You can have as many tomcat instances(workers) as you want in the same box as long as your box can withstand the load.&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-7150724413703543710?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/7150724413703543710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2009/03/load-balancing-tomcat-with-apache-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/7150724413703543710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/7150724413703543710'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2009/03/load-balancing-tomcat-with-apache-and.html' title='Load Balancing tomcat with Apache and mod jk'/><author><name>Saravana Kumar</name><uri>http://www.blogger.com/profile/04009363852198982097</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-4811591892472441080</id><published>2009-01-12T00:08:00.001+05:30</published><updated>2009-01-12T00:08:39.686+05:30</updated><title type='text'>Ftps with apache keys</title><content type='html'>FTPS (ftp with SSL) is different from Sftp, in that the later is a mostly part of ssh service. All permissions that a user has through SSH, like viewing files under other directories like /etc, will also be available through sftp. Using sftp one can download a copy of the /etc/passwd file. To safeguard this you have to enable chroot for sftp users and they will be restricted to their home directory. I found the configuration of chrooted sftp difficult. Since i had a ftp server running in the same box, with chrooted users, it made lot of sense to me to use ftps. I just had to add certificates' location and rest of the configuration was there after all.&lt;br /&gt;&lt;br /&gt;In my other post i wrote about using Apache-tomcat SSL keys in Apache-httpd server. This post explains how to use apache-httpd SSL keys in vsftpd.&lt;br /&gt;&lt;br /&gt;I assume that you have a working copy of vsftpd. If not please install and configure vsftpd as per your requirement. Here is what you have to do to enable ftps (ftp through SSL).&lt;br /&gt;&lt;br /&gt;Store all your apache SSL keys in a location accessible to vsftpd.&amp;nbsp; I kept them under /root/vsftpd_keys/. There will be minimum two files (private and public key). In my case i had 3 private key (exported.key), public key (mydomain.com.crt) and two intermediate keys (cross_intermediate.crt, gd_intermediate.crt).&lt;br /&gt;&lt;br /&gt;First we have to combine public and intermediate keys into one file:&lt;br /&gt;# cd /root/vsftpd_keys/&lt;br /&gt;# cat mydomain.com.crt cross_intermediate.crt intermediate.crt &amp;gt; vsftpd_domain_inter_comb3.crt&lt;br /&gt;&lt;br /&gt;Note: 1. You have to concatenate the files in the same order specified above. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2. It is fine to join just the domain &amp;amp; intermediate certs if your certificate chain doesn't need/have cross_intermediate.&lt;br /&gt;&lt;br /&gt;Edit the vsftpd.conf file (Usually /etc/vsftpd/vsftpd.conf) and add the following to the end of the file:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;userlist_enable=YES&lt;br /&gt;ssl_enable=YES&lt;br /&gt;allow_anon_ssl=YES&lt;br /&gt;force_local_data_ssl=NO&lt;br /&gt;force_local_logins_ssl=YES&lt;br /&gt;ssl_tlsv1=YES&lt;br /&gt;ssl_sslv2=NO&lt;br /&gt;ssl_sslv3=NO&lt;br /&gt;rsa_cert_file=/root/vsftpd_keys/vsftpd_domain_inter_comb3.crt&lt;br /&gt;rsa_private_key_file=/root/vsftpd_keys/exported.key&lt;br /&gt;pasv_enable=YES&lt;br /&gt;pasv_address= &amp;lt;your ip here&amp;gt; (Note: When the system is behind NAT firewall you have to give the firewall's NATed IP here).&lt;br /&gt;pasv_min_port=1500&lt;br /&gt;pasv_max_port=1505&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The above configuration requires incoming ports 1500 to 1505 to be open in the firewall, if you have one.&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-4811591892472441080?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/4811591892472441080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2009/01/ftps-with-apache-keys.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/4811591892472441080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/4811591892472441080'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2009/01/ftps-with-apache-keys.html' title='Ftps with apache keys'/><author><name>Saravana Kumar</name><uri>http://www.blogger.com/profile/04009363852198982097</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-3687114042524995544</id><published>2009-01-07T00:49:00.001+05:30</published><updated>2009-01-07T00:49:26.958+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSL'/><category scheme='http://www.blogger.com/atom/ns#' term='export'/><category scheme='http://www.blogger.com/atom/ns#' term='der to pem'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><title type='text'>Exporting tomcat keys to Apache httpd</title><content type='html'>Apache Tomcat SSL keys created with keytool are, by default, in der format. These keys cannot be used in Apache httpd since httpd, be default, expects the keys in pem(X509) format. Using the below steps you can export the tomcat's keys to apache httpd format and use it for apache.&lt;br /&gt;&lt;br /&gt;I assume that you already have a working copy of &lt;a href="http://techsk.blogspot.com/2008/05/enabling-https-ssl-in-tomcat.html"&gt;tomcat with SSL&lt;/a&gt;. You need a copy of the tomcat's keystore file and the keystore password.&lt;br /&gt;&lt;br /&gt;Let us start....&lt;br /&gt;&lt;br /&gt;First copy the existing tomcat's keystore file to a new directory so that we don't break anything that is working.&lt;br /&gt;&lt;br /&gt;# mkdir /root/SSL_export/&lt;br /&gt;# cp &amp;lt;path/to/tomcat/keystore/file&amp;gt; /root/SSL_export/tomcat.keystore&lt;br /&gt;# cd /root/SSL_export/&lt;br /&gt;# keytool -list -keystore tomcat.keystore&lt;br /&gt;Enter keystore password:&amp;nbsp; &lt;br /&gt;&lt;br /&gt;The above command will print all the keys in the keystore.&lt;br /&gt;&lt;br /&gt;Now we will &lt;strong&gt;export&lt;/strong&gt; the key in DER format&lt;br /&gt;# keytool -export -alias tomcat -keystore tomcat.keystore -file exported-der.crt&lt;br /&gt;Enter keystore password:&amp;nbsp; &lt;br /&gt;Output will be: Certificate stored in file &lt;br /&gt;&lt;br /&gt;The certificate will be stored in exported-der.crt&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Verify&lt;/strong&gt; the certificate with this command:&lt;br /&gt;# openssl x509 -noout -text -in exported-der.crt -inform der&lt;br /&gt;Output will be: The whole certificate saying - who issued it&amp;nbsp; and other info like your company name etc.&lt;br /&gt;&lt;br /&gt;Now &lt;strong&gt;Convert&lt;/strong&gt; the key to PEM format so that apache can understand it:&lt;br /&gt;# openssl x509 -out exported-pem.crt -outform pem -in exported-der.crt -inform der&lt;br /&gt;&lt;br /&gt;The exported key will be in the file exported-pem.crt.&lt;br /&gt;&lt;br /&gt;We have exported the public key and now are going to export the private key. &lt;br /&gt;&lt;br /&gt;Download these files:&lt;br /&gt;# wget&amp;nbsp; http://richfreedman.googlepages.com/ExportPrivateKey.java&lt;br /&gt;# wget http://www.source-code.biz/snippets/java/Base64Coder.java.txt&lt;br /&gt;# mv Base64Coder.java.txt Base64Coder.java&lt;br /&gt;# javac ExportPrivateKey.java Base64Coder.java&lt;br /&gt;&lt;br /&gt;Below command will save the exported private key in the file it is redirected to.&lt;br /&gt;# java ExportPrivateKey tomcat.keystore tomcat G10BalPass &amp;gt; exported-pkcs8.key&lt;br /&gt;&lt;br /&gt;We have to change it to RSA format so that apache can recognise it.&lt;br /&gt;# openssl pkcs8 -inform PEM -nocrypt -in exported-pkcs8.key -out exported.key&lt;br /&gt;&lt;br /&gt;Private key is now exported to the file exported.key.&lt;br /&gt;Download the intermediate certificate from your certificate authority and keep it in the same location.&lt;br /&gt;&lt;br /&gt;Now we should configure apache accordingly:&lt;br /&gt;# cd /etc/httpd/conf.d/&lt;br /&gt;# cp ssl.conf ssl.conf.orig&lt;br /&gt;# vi ssl.conf (Change the following line only after commenting the old lines):&lt;br /&gt;SSLCertificateFile /root/SSL_export/exported-pem.crt&lt;br /&gt;SSLCertificateKeyFile /root/SSL_export/exported.key&lt;br /&gt;SSLCertificateChainFile /root/SSL_export/&amp;lt;&lt;wbr&gt;intermediate.crt&amp;gt;&lt;br /&gt;&lt;br /&gt;Restart apache. You must be able to browse https://yourdomain.com/&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-3687114042524995544?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/3687114042524995544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2009/01/exporting-tomcat-keys-to-apache-httpd.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/3687114042524995544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/3687114042524995544'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2009/01/exporting-tomcat-keys-to-apache-httpd.html' title='Exporting tomcat keys to Apache httpd'/><author><name>Saravana Kumar</name><uri>http://www.blogger.com/profile/04009363852198982097</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-4979381039224931530</id><published>2008-12-27T01:22:00.001+05:30</published><updated>2009-01-07T00:44:16.119+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='tar'/><category scheme='http://www.blogger.com/atom/ns#' term='modjk'/><category scheme='http://www.blogger.com/atom/ns#' term='connector'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><title type='text'>Apache and Tomcat with modjk using tar</title><content type='html'>I have already put together a tutorial to connect&lt;a href="http://techsk.blogspot.com/2008/12/connecting-apache-with-tomcat-using.html"&gt; Apache HTTP with Apache tomcat&lt;/a&gt;. In that i had installed httpd with rpm. This tutorial explains the steps to connect apache(http) with tomcat using modjk ;only that this time i am going to explain how to do everything from tar bundles. Here i am not going to explain how to install tomcat. Another tutorial on that is here: &lt;a href="http://techsk.blogspot.com/2008/04/installing-tomcat.html"&gt;http://techsk.blogspot.com/2008/04/installing-tomcat.html&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In the below tutorial i will be installing apache in the default directory (/usr/local/apache2) you can change that location in your server to any other by adding --prefix=&amp;lt;your-install-directory&amp;gt; in the configuration step before calling make. Also i am installing Apache HTTP with SSL support. &lt;br /&gt;&lt;br /&gt;When i get some time i will put together the steps for enabling SSL in apache and for using tomcat's SSL keys in Apache.&lt;br /&gt;&lt;br /&gt;Here we go:&lt;br /&gt;&lt;br /&gt;First download httpd:&lt;br /&gt;# cd /usr/local/src/&lt;br /&gt;# wget http://apache.mirrors.redwire.net/httpd/httpd-2.2.10.tar.gz&lt;br /&gt;# wget http://www.apache.org/dist/httpd/httpd-2.2.10.tar.gz.md5&lt;br /&gt;# md5sum httpd-2.2.10.tar.gz (was equal to the downloaded sum)&lt;br /&gt;# tar zxfv httpd-2.2.10.tar.gz&lt;br /&gt;# cd httpd-2.2.10&lt;br /&gt;&lt;br /&gt;Below command will configure (prepare) apache installation with most of the shared modules. Type ./configure --help to see what they are&lt;br /&gt;# ./configure --enable-so --enable-mods-shared=most --enable-ssl&amp;nbsp;&amp;nbsp;&amp;nbsp; (Hint: --prefix=&amp;lt;/path/to/install/directory&amp;gt;)&lt;br /&gt;# make&lt;br /&gt;# make install&lt;br /&gt;# cd /usr/local/src/&lt;br /&gt;# wget http://www.trieuvan.com/apache/tomcat/tomcat-connectors/jk/source/jk-1.2.27/tomcat-connectors-1.2.27-src.tar.gz&lt;br /&gt;# wget http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.27/tomcat-connectors-1.2.27-src.tar.gz.md5&lt;br /&gt;# md5sum tomcat-connectors-1.2.27-src.tar.gz (was equal to the downloaded sum).&lt;br /&gt;# tar zxfv tomcat-connectors-1.2.27-src.tar.gz&lt;br /&gt;# cd tomcat-connectors-1.2.27-src/native/&lt;br /&gt;#&amp;nbsp; ./configure --with-apxs=/usr/local/apache2/bin/apxs &lt;br /&gt;# make&lt;br /&gt;# make install&lt;br /&gt;&lt;br /&gt;That is it for the installation. Now we will configure apache for connecting it with tomcat&lt;br /&gt;# cd /usr/local/apache2/conf/&lt;br /&gt;# cp httpd.conf httpd.conf_18Nov08&lt;br /&gt;# vi httpd.conf&lt;br /&gt;Add the following code below the LoadModule section.&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;# Load mod_jk&lt;br /&gt;# &lt;br /&gt;LoadModule jk_module modules/mod_jk.so&lt;br /&gt;&lt;br /&gt;# Configure mod_jk&lt;br /&gt;#&lt;br /&gt;JkWorkersFile conf/workers.properties&lt;br /&gt;JkLogFile logs/mod_jk.log&lt;br /&gt;JkLogLevel info&lt;br /&gt;&lt;br /&gt;JkMount *.jsp test   &amp;lt;- This must be the worker name you give in workers.properties. This will at(many) times go into your Virtual Host configuration.&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Uncomment the line: Include conf/extra/httpd-ssl.conf&lt;br /&gt;Save and Exit.&lt;br /&gt;# cd /usr/local/apache2/conf/&lt;br /&gt;# vi workers.properties (create new file and paste the below code)&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;# workers.properties&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;# In Unix, we use forward slashes:&lt;br /&gt;ps=/&lt;br /&gt;&lt;br /&gt;# list the workers by name&lt;br /&gt;&lt;br /&gt;worker.list=test&lt;br /&gt;&lt;br /&gt;# ------------------------&lt;br /&gt;# First tomcat server&lt;br /&gt;# ------------------------&lt;br /&gt;worker.test.port=8009&lt;br /&gt;worker.test.host=localhost&lt;br /&gt;worker.test.type=ajp13&lt;br /&gt;&lt;br /&gt;#&lt;br /&gt;# END workers.properties&lt;br /&gt;#&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Save and exit. &lt;br /&gt;&lt;br /&gt;Start Apache. &lt;br /&gt;# /usr/local/apache2/bin/apachectl start&lt;br /&gt;&lt;br /&gt;Now you will be able to browse all jsp pages through apache. Apache will silently be connecting with tomcat through modjk to serve those.&lt;div class="flockcredit" style="text-align: right; color: #CCC; font-size: x-small;"&gt;Blogged with the &lt;a href="http://www.flock.com/blogged-with-flock" style="color: #999; font-weight: bold;" target="_new" title="Flock Browser"&gt;Flock Browser&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-4979381039224931530?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/4979381039224931530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2008/12/apache-and-tomcat-with-modjk-using-tar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/4979381039224931530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/4979381039224931530'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2008/12/apache-and-tomcat-with-modjk-using-tar.html' title='Apache and Tomcat with modjk using tar'/><author><name>Saravana Kumar</name><uri>http://www.blogger.com/profile/04009363852198982097</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-5474193318379988307</id><published>2008-12-27T00:30:00.001+05:30</published><updated>2009-01-07T00:46:35.820+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='rpm'/><category scheme='http://www.blogger.com/atom/ns#' term='mod_jk'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><title type='text'>Connecting Apache with tomcat using modjk</title><content type='html'>&lt;a href="http://httpd.apache.org/"&gt;Apache HTTP&lt;/a&gt; and &lt;a href="http://tomcat.apache.org/"&gt;Tomcat&lt;/a&gt; are web servers meant for different purposes. While Apache HTTP can be used to serve static (html) and dynamic (cgi/perl) contents ,&amp;nbsp; tomcat is used to serve Java pages (jsp/servlets). We can link both Apache HTTP &amp;amp; Apache Tomcat using modjk (connector):&lt;br /&gt;&lt;br /&gt;What can you do by linking them both?&lt;br /&gt;&lt;br /&gt;1. Effectively serve both static (html) and dynamic (jsp/servlet) pages.&lt;br /&gt;2. Load balance/Cluster between two or more tomcat services.&lt;br /&gt;&lt;br /&gt;There may be more ....&lt;br /&gt;&lt;br /&gt;I did the installation in CentOS 4.4 (32bit). I installed Apache http (rpm) using yum. I assume that you have already &lt;a href="http://techsk.blogspot.com/2008/04/installing-tomcat.html"&gt;installed Tomcat&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Below is the tutorial:&lt;br /&gt;&lt;br /&gt;# yum install httpd httpd-devel (httpd-devel is needed to install any module in httpd)&lt;br /&gt;# wget http://apache.siamwebhosting.com/tomcat/tomcat-connectors/jk/source/jk-1.2.26/tomcat-connectors-1.2.26-src.tar.gz (download any latest version).&lt;br /&gt;# wget http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.26/tomcat-connectors-1.2.26-src.tar.gz.md5 (md5 check sum for the above). &lt;br /&gt;&lt;br /&gt;Check if you have downloaded a genuine package&lt;br /&gt;# md5sum tomcat-connectors-1.2.26-src.tar.gz (This must be equal to the sum downloaded with the second wget).&lt;br /&gt;&lt;br /&gt;# tar zfxv tomcat-connectors-1.2.26-src.tar.gz &lt;br /&gt;# cd tomcat-connectors-1.2.26-src&lt;br /&gt;# cd native&lt;br /&gt;# ./configure --with-apxs=/usr/sbin/apxs&lt;br /&gt;# make&lt;br /&gt;# make install&lt;br /&gt;&lt;br /&gt;# cd /etc/httpd/conf/&lt;br /&gt;# cp httpd.conf httpd.conf.orig (I always keep a copy of the original).&lt;br /&gt;# vi httpd.conf&lt;br /&gt;&lt;br /&gt;Add the following code below the LoadModule section.&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;# Load mod_jk&lt;br /&gt;# &lt;br /&gt;LoadModule jk_module modules/mod_jk.so&lt;br /&gt;&lt;br /&gt;# Configure mod_jk&lt;br /&gt;#&lt;br /&gt;JkWorkersFile conf/workers.properties&lt;br /&gt;JkLogFile logs/mod_jk.log&lt;br /&gt;JkLogLevel info&lt;br /&gt;&lt;br /&gt;JkMount *.jsp test   &amp;lt;- This must be the worker name you give in workers.properties. This will at(many) times go into your Virtual Host configuration.&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Save and Exit.&lt;br /&gt;&lt;br /&gt;# cd /etc/httpd/conf/&lt;br /&gt;# vi workers.properties (create new file and paste the below code)&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;# workers.properties&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;# In Unix, we use forward slashes:&lt;br /&gt;ps=/&lt;br /&gt;&lt;br /&gt;# list the workers by name&lt;br /&gt;&lt;br /&gt;worker.list=test&lt;br /&gt;&lt;br /&gt;# ------------------------&lt;br /&gt;# First tomcat server&lt;br /&gt;# ------------------------&lt;br /&gt;worker.test.port=8009&lt;br /&gt;worker.test.host=localhost&lt;br /&gt;worker.test.type=ajp13&lt;br /&gt;&lt;br /&gt;#&lt;br /&gt;# END workers.properties&lt;br /&gt;#&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Restart apache. Now you can access tomcat through apache. Any request to jsp files will go to test-tomcat.&lt;div class="flockcredit" style="text-align: right; color: #CCC; font-size: x-small;"&gt;Blogged with the &lt;a href="http://www.flock.com/blogged-with-flock" style="color: #999; font-weight: bold;" target="_new" title="Flock Browser"&gt;Flock Browser&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-5474193318379988307?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/5474193318379988307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2008/12/connecting-apache-with-tomcat-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/5474193318379988307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/5474193318379988307'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2008/12/connecting-apache-with-tomcat-using.html' title='Connecting Apache with tomcat using modjk'/><author><name>Saravana Kumar</name><uri>http://www.blogger.com/profile/04009363852198982097</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-4413492961566968764</id><published>2008-11-19T01:38:00.001+05:30</published><updated>2008-11-23T00:56:58.767+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='new topics'/><category scheme='http://www.blogger.com/atom/ns#' term='blogs'/><category scheme='http://www.blogger.com/atom/ns#' term='busy'/><title type='text'>After a long time!</title><content type='html'>&lt;font style="font-family: Arial;" size="3"&gt;I was too busy to update my pages here. With most of the deadlines passed through, I hope to add more articles starting next week.&lt;br /&gt;&lt;br /&gt; You can Expect something on serving dynamic pages from apache with apache + mod_jk + tomcat setup,&amp;nbsp; failover setup for two tomcat instance with apache and mod_jk, LVM setup, Problems/errors and fix&lt;/font&gt;&lt;font style="font-family: Arial;" size="3"&gt;es in LVM, Striping in LVM.&lt;br /&gt;&lt;br /&gt;I will also update my experiences about ISMS implementations in our company so that it will be helpful for others who need help.&lt;br /&gt;&lt;br /&gt;Thanks for coming here.&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-4413492961566968764?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/4413492961566968764/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2008/11/after-long-time_19.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/4413492961566968764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/4413492961566968764'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2008/11/after-long-time_19.html' title='After a long time!'/><author><name>Saravana Kumar</name><uri>http://www.blogger.com/profile/04009363852198982097</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-6527859878931857860</id><published>2008-08-04T01:16:00.001+05:30</published><updated>2008-08-04T01:16:27.191+05:30</updated><title type='text'>Dual MySQL services in single server</title><content type='html'>Requirement:&lt;br /&gt;To install one more mysql instance (server) and make it run on another port. The second instance must use a different data directory (ofcourse!). I assume that you have a working copy of mysql in the server which may be listening on any port (default: 3306) and storing data any where (default: /var/lib/mysql).&lt;br /&gt;&lt;br /&gt;Steps:&lt;br /&gt;&lt;br /&gt;# cd /usr/local/src/&lt;br /&gt;downloaded mysql from here: http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.26-rc.tar.gz/from/pick#mirrors&lt;br /&gt;&lt;br /&gt;# tar zxfv mysql-5.1.26-rc.tar.gz&lt;br /&gt;# cd mysql-5.1.26-rc&lt;br /&gt;See what options are available with ./configure --help&lt;br /&gt;&lt;br /&gt;Below are options we need to consider:&lt;br /&gt;&amp;nbsp; --bindir=DIR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; user executables [EPREFIX/bin]&lt;br /&gt;&amp;nbsp; --sbindir=DIR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system admin executables [EPREFIX/sbin]&lt;br /&gt;&amp;nbsp; --libexecdir=DIR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; program executables [EPREFIX/libexec]&lt;br /&gt;&amp;nbsp; --datadir=DIR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; read-only architecture-independent data [PREFIX/share]&lt;br /&gt;&amp;nbsp; --sysconfdir=DIR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; read-only single-machine data [PREFIX/etc]&lt;br /&gt;&amp;nbsp; --sharedstatedir=DIR&amp;nbsp;&amp;nbsp; modifiable architecture-independent data [PREFIX/com]&lt;br /&gt;&amp;nbsp; --localstatedir=DIR&amp;nbsp;&amp;nbsp;&amp;nbsp; modifiable single-machine data [PREFIX/var]&lt;br /&gt;&amp;nbsp; --libdir=DIR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; object code libraries [EPREFIX/lib]&lt;br /&gt;&amp;nbsp; --includedir=DIR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C header files [PREFIX/include]&lt;br /&gt;&amp;nbsp; --oldincludedir=DIR&amp;nbsp;&amp;nbsp;&amp;nbsp; C header files for non-gcc [/usr/include] - installation will take some libs from here.&lt;br /&gt;&amp;nbsp; --infodir=DIR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; info documentation [PREFIX/info]&lt;br /&gt;&amp;nbsp; --mandir=DIR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; man documentation [PREFIX/man]&lt;br /&gt;&lt;br /&gt;Note that all are created by default under PREFIX/EPREFIX. By default EPREFIX=PREFIX.&lt;br /&gt;&lt;br /&gt;Some more options to look into:&lt;br /&gt;--with-tcp-port=port-number (default 3306)&lt;br /&gt;--with-mysqld-user=username - no default&lt;br /&gt;&lt;br /&gt;--with-unix-socket-path=SOCKET&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Where to put the unix-domain socket.&amp;nbsp; SOCKET must be an absolute file name.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;--with-plugins=PLUGIN[,PLUGIN..]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Plugins to include in mysqld. (default is: none)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Must be a configuration name or a comma separated list of plugins.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Available configurations are: none max max-no-ndb all.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Available plugins are: partition daemon_example&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ftexample archive blackhole csv example federated&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; heap innobase myisam myisammrg ndbcluster.&lt;br /&gt;&lt;br /&gt;Also use this: CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti&lt;br /&gt;&lt;br /&gt;I will be using /data/mysql for this instance's settings and data. The new instance should listen on port 33060. Let us start the config now:&lt;br /&gt;&lt;br /&gt;# ./configure --prefix=/data/mysql --with-unix-socket-path=/data/mysql/mysql.sock --with-tcp-port=33060 --with-plugins=all&lt;br /&gt;# make&lt;br /&gt;# make install&lt;br /&gt;&lt;br /&gt;This will take about 15 minutes&lt;br /&gt;&lt;br /&gt;#&amp;nbsp; cp support-files/my-medium.cnf /data/mysql/my.cnf (If you want to config anything).&lt;br /&gt;# cd /data/mysql/&lt;br /&gt;# chown -R mysql .&lt;br /&gt;# chown -R mysql .&lt;br /&gt;# ls (there won't be var directory in that). We have to create it with the below command which creates all necessary databases.&lt;br /&gt;&lt;br /&gt;# ./bin/mysql_install_db --user=mysql&lt;br /&gt;&lt;br /&gt;Start the server:&lt;br /&gt;# /data/mysql/bin/mysqld_safe &amp;amp;&lt;br /&gt;&lt;br /&gt;And test it:&lt;br /&gt;# mysql -P 33060 -p&lt;br /&gt;&lt;br /&gt;It worked.&lt;br /&gt;&lt;br /&gt;You can setup other accounts, change root password etc after this. Refer the below manual for all other options.&lt;br /&gt;&lt;br /&gt;http://dev.mysql.com/doc/refman/5.1/en/quick-install.html&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-6527859878931857860?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/6527859878931857860/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2008/08/dual-mysql-services-in-single-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/6527859878931857860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/6527859878931857860'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2008/08/dual-mysql-services-in-single-server.html' title='Dual MySQL services in single server'/><author><name>Saravana Kumar</name><uri>http://www.blogger.com/profile/04009363852198982097</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-2030980813418151434</id><published>2008-06-01T01:33:00.001+05:30</published><updated>2008-06-01T01:33:03.077+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='cron'/><title type='text'>how to run a cronjob on last Friday of every month</title><content type='html'>A crontab entry in linux looks like this: &lt;br /&gt;10 10 * * 7  /path/to/your/script&lt;br /&gt;&lt;br /&gt;This says to run /path/to/your/script at 10:10am on Sunday.&lt;br /&gt;&lt;br /&gt;The first five fields are:&lt;br /&gt;minute (0-59)&lt;br /&gt;hour (0-23)&lt;br /&gt;day of the month(1-31)&lt;br /&gt;month of the year (1-12)&lt;br /&gt;day of the week (0-7 with 0 &amp;amp;7 = Sunday, 1 = Monday etc.,)&lt;br /&gt;&lt;br /&gt;For running a script on last Friday of every month you would typically put entry as:&lt;br /&gt;10 10 28-31 * 5 /path/to/your/script&lt;br /&gt;&lt;br /&gt;But the above will run your script on 28,29,30 &amp;amp; 31 of every month and on each Friday (weekly). The thing is, cron would execute the script if either day of the week &lt;span style="font-weight: bold;"&gt;or&lt;/span&gt; day of the month matches.&lt;br /&gt;&lt;br /&gt;To run your script &lt;span style="font-weight: bold;"&gt;only&lt;/span&gt; on &lt;span style="font-weight: bold;"&gt;every last Friday/weekday &lt;/span&gt;of a month use the below entry:&lt;br /&gt;10 10 * * 5 [ $(date +"\%m") -ne $(date -d 7days +"\%m") ] &amp;amp;&amp;amp; /path/to/your/script&lt;br /&gt;&lt;br /&gt;The above entry is executed every week. It has two parts:&lt;br /&gt;&lt;br /&gt;First part:&lt;br /&gt;$(date +"\%m") -ne $(date -d 7days +"\%m") - Checks if the month today is not equal to month next week (7days from now - same day). If they are equal then current&lt;br /&gt;day (Friday in our case) is not the 'last Friday' if not it is the last&lt;br /&gt;Friday.&lt;br /&gt;&lt;br /&gt;Second Part: your actual script /path/to/your/script&lt;br /&gt;&lt;br /&gt;We have glued both parts with &amp;amp;&amp;amp;. This will effect the execution of second part ie., second part is executed only when the first part is true (Months returned from both date commands should not be equal).&lt;br /&gt;&lt;br /&gt;Also note that there is a \ before %m in the entry. Cron cannot understand % sign and so we have to escape it with \.&lt;br /&gt;&lt;hr style="width: 100%; height: 2px;" /&gt;References:&lt;br /&gt;http://www.unix.com/answers-frequently-asked-questions/13527-cron-crontab.html&lt;br /&gt;http://www.unix.com/unix-advanced-expert-users/11562-can-cron-do.html&lt;br /&gt;http://forums.macosxhints.com/archive/index.php/t-34624.html&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-2030980813418151434?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/2030980813418151434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2008/06/how-to-run-cronjob-on-last-friday-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/2030980813418151434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/2030980813418151434'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2008/06/how-to-run-cronjob-on-last-friday-of.html' title='how to run a cronjob on last Friday of every month'/><author><name>Saravana Kumar</name><uri>http://www.blogger.com/profile/04009363852198982097</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-546920806548945017</id><published>2008-05-29T00:38:00.001+05:30</published><updated>2009-01-07T00:45:28.210+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSL'/><category scheme='http://www.blogger.com/atom/ns#' term='CSR'/><category scheme='http://www.blogger.com/atom/ns#' term='https'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><title type='text'>Enabling https (SSL) in Tomcat</title><content type='html'>For enabling ssl in tomcat you need to buy signed certificate/s from a Certificate Authority (some hosting companies also sell SSL certificates). The work doesn't end with that. After buying a certificate you have to create a certificate request, which your CA will sign and authorize. &lt;br /&gt;&lt;br /&gt;Below are the steps i followed to enable SSL in tomcat.&lt;br /&gt;&lt;br /&gt;Note: Remember to replace the full path of the filename. Usually i create these files a new subdirectory.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Creating Certificate Request&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;$ keytool -genkey -alias tomcat -keyalg RSA -keystore tomcat.key&lt;br /&gt;&lt;br /&gt;The above command generates a key store file (tomcat.key) with RSA algorithm and aliased as tomcat. A keystore is nothing but a file which has your key and the CA's signature. The above command gets all the following information from you, so please keep them handy&lt;br /&gt;Keystore password: &amp;lt;any thing you want&amp;gt;&lt;br /&gt;First &amp;amp; Last Name: &amp;lt;your name/any authorized person's name&amp;gt;&lt;br /&gt;Organizational Unit: &amp;lt;Dept in your company&amp;gt;&lt;br /&gt;Organization Name: &amp;lt;Your company name&amp;gt;&lt;br /&gt;Your City: &lt;br /&gt;State:&lt;br /&gt;Country Code: &amp;lt;eg: US&amp;gt;&lt;br /&gt;&lt;br /&gt;Following command actually creates the csr&lt;br /&gt;$ keytool -certreq -keyalg RSA -alias tomcat -file certreq.csr -keystore tomcat.key&lt;br /&gt;&lt;br /&gt;Depending on whom you bought the certificate from, you may have to copy the contents of the certreq.csr from your CA's site or your CA will send it as email attachment.&lt;br /&gt;&lt;br /&gt;Keys from CA:&lt;br /&gt;&lt;br /&gt;You will get the keys (issued) from CA. You may also have to download two more key's (root &amp;amp;amp; intermediate) from your CA's website. First add root cert, then add intermediate followed by your site's certificate. Below are the steps:&lt;br /&gt;&lt;br /&gt;First import root cert.&lt;br /&gt;$ keytool -import -alias root -keystore tomcat.key -trustcacerts -file &amp;lt;root.crt&amp;gt;&lt;br /&gt;&lt;br /&gt;Then the intermediate cert&lt;br /&gt;$ keytool -import -alias intermed -keystore tomcat.key -trustcacerts -file &amp;lt;intermediate.crt&amp;gt;&lt;br /&gt;&lt;br /&gt;Finally your site's cert&lt;br /&gt;$ keytool -import -alias tomcat -keystore tomcat.key -trustcacerts -file &amp;lt;yourdomain.com.crt&amp;gt;&lt;br /&gt;&lt;br /&gt;yourdomain.com.crt is the cert file issued by CA for &lt;span style="font-weight: bold;"&gt;your&lt;/span&gt; domain.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;How to list the imported Certificates?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;$ keytool -list -keystore tomcat.key&lt;br /&gt;&lt;br /&gt;The above keystore file is now ready. Let us know configure tomcat to use this key file.&lt;br /&gt;&lt;br /&gt;If you have already &lt;a href="http://techsk.blogspot.com/2008/04/installing-tomcat.html"&gt;installed tomcat&lt;/a&gt;, edit the server.xml of the tomcat instance you want to turn on https. Search for the below lines:&lt;br /&gt;&lt;br /&gt;&amp;lt;Connector port="8443" maxHttpHeaderSize="8192"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; maxThreads="150" minSpareThreads="25" maxSpareThreads="75"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enableLookups="false" disableUploadTimeout="true" &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; acceptCount="100" scheme="https" secure="true"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clientAuth="false" sslProtocol="TLS" /&amp;gt;&lt;br /&gt;&lt;br /&gt;The above lines are commented by default. Remove the comment signs &amp;lt;!-- before and&amp;nbsp; --&amp;gt; after them.&lt;br /&gt;&lt;br /&gt;  Add the below line anywhere in between them:&lt;br /&gt;keystoreFile="/path/to/keystore/tomcat.key" keystorePass="changeit"&lt;br /&gt;&lt;br /&gt;Restart the tomcat service. We are done.&lt;br /&gt;&lt;br /&gt;Now you must be able to browse https://localhost:8443 from the same machine where tomcat is installed. You can view the certificate and cross check it.&lt;div class="flockcredit" style="text-align: right; color: #CCC; font-size: x-small;"&gt;Blogged with the &lt;a href="http://www.flock.com/blogged-with-flock" style="color: #999; font-weight: bold;" target="_new" title="Flock Browser"&gt;Flock Browser&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-546920806548945017?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/546920806548945017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2008/05/enabling-https-ssl-in-tomcat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/546920806548945017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/546920806548945017'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2008/05/enabling-https-ssl-in-tomcat.html' title='Enabling https (SSL) in Tomcat'/><author><name>Saravana Kumar</name><uri>http://www.blogger.com/profile/04009363852198982097</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-4386005564124646050</id><published>2008-04-03T00:58:00.000+05:30</published><updated>2008-04-06T00:45:33.962+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='multipletomcat linux'/><title type='text'>How to configure 2 or more tomcat instances in the same server</title><content type='html'>We have already seen how to &lt;a href="http://techsk.blogspot.com/2008/04/installing-tomcat.html"&gt;install tomcat&lt;/a&gt; in Linux.&lt;br /&gt;&lt;br /&gt;Now let us create one more instance. As you may already know we cannot have two services listening on the same ip &amp;amp; port. So, for the second instance of the tomcat we have to change the port settings.&lt;br /&gt;&lt;br /&gt;This tutorial is in continuation of my first post on installing tomcat. You can read it &lt;a href="http://techsk.blogspot.com/2008/04/installing-tomcat.html"&gt;here&lt;/a&gt;. I assume that you already have one tomcat instance up and running (as a special user 'myuser').&lt;br /&gt;&lt;br /&gt;Login as or su as myuser:&lt;br /&gt;# su - myuser&lt;br /&gt;$ cd ~&lt;br /&gt;&lt;br /&gt;$ unzip /your/download/directory/apache-tomcat-x.x.x.zip (or)&lt;br /&gt;&lt;br /&gt;if downloaded gzip file then&lt;br /&gt;$ tar zxfv /your/download/directory/apache-tomcat-x.x.x.tar.gz&lt;br /&gt;&lt;br /&gt;$ mv apache-tomcat-x.x.x test-tomcat1&lt;br /&gt;$ cd ~/test-tomcat1/conf&lt;br /&gt;&lt;br /&gt;Changing the default ports:&lt;br /&gt;$ cp server.xml server.xml.orig&lt;br /&gt;$ vi server.xml&lt;br /&gt;&lt;br /&gt;Change the shutdown port 8006 (as shown in below line):&lt;br /&gt;&lt;br /&gt;&lt;font style="color: rgb(51, 51, 255);"&gt;server port="8006" shutdown="SHUTDOWN"&lt;br /&gt;&lt;br /&gt;to:&lt;br /&gt;server port="9006" shutdown="SHUTDOWN"&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;Change non-ssl http 1.1 Connector port on 8080 (as shown in below line):&lt;br /&gt;&lt;br /&gt;&lt;font style="color: rgb(51, 51, 255);"&gt;Connector port="8080" maxHttpHeaderSize="8192" maxThreads="150" ...&lt;br /&gt;&lt;br /&gt;to:&lt;br /&gt;Connector port="9080" maxHttpHeaderSize="8192" maxThreads="150" ...&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;Ajp connector port 8009 (as shown in below line):&lt;br /&gt;&lt;font style="color: rgb(51, 51, 255);"&gt;connector port="8009" enablelookups="false" redirectport="8443" protocol="AJP/1.3"&lt;br /&gt;&lt;br /&gt;to:&lt;br /&gt;connector port="9009" enablelookups="false" redirectport="9443" protocol="AJP/1.3"&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;If you have enabled proxied http connector port 8082 (found in line below):&lt;br /&gt;&lt;font style="color: rgb(51, 51, 255);"&gt;Connector port="8082" maxThreads="150" minSpareThreads="25" ...&lt;br /&gt;&lt;br /&gt;Change it to:&lt;br /&gt;Connector port="9082" maxThreads="150" minSpareThreads="25" ...&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;If you have enabled https port 8443 (found in lines below):&lt;br /&gt;&lt;br /&gt;&lt;font style="color: rgb(51, 51, 255);"&gt;connector&lt;br /&gt;port="8443" maxhttpheadersize="8192"&lt;br /&gt;keystorefile="/home/tomcat/keystore/tomcat.key" scheme="https"&lt;br /&gt;secure="true" clientauth="false" sslprotocol="TLS"&lt;br /&gt;&lt;br /&gt;Change it to:&lt;br /&gt;connector&lt;br /&gt;port="9443" maxhttpheadersize="8192"&lt;br /&gt;keystorefile="/home/myuser/keystore/domain.key" scheme="https"&lt;br /&gt;secure="true" clientauth="false" sslprotocol="TLS"&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;Now give executable permission to the scripts:&lt;br /&gt;$ cd ~/test-tomcat1/bin/&lt;br /&gt;$ chmod u+x *.sh&lt;br /&gt;&lt;br /&gt;Create a directory for your Servlet's log files:&lt;br /&gt;$ mkdir ~/myservlet1&lt;br /&gt;&lt;br /&gt;And add aliases:&lt;br /&gt;&lt;br /&gt;$alias tomcat1-down=~/test-tomcat/bin/shutdown.sh&lt;br /&gt;&lt;home directory=""&gt;&lt;server port="8005" shutdown="SHUTDOWN"&gt;&lt;/server&gt;&lt;/home&gt;$ alias tomcat1-up=cd ~/myservlet1; ~/test-tomcat/bin/startup.sh&lt;br /&gt;&lt;br /&gt;Remember to put alias entries in ~/.bashrc so that they are persistent.&lt;br /&gt;&lt;br /&gt;Startup tomcat:&lt;br /&gt;$ tomcat1-up&lt;br /&gt;  &lt;br /&gt;Open your browser. You must be able to view both tomcat test pages by now.&lt;br /&gt;Page1: http://localhost:8080/&lt;br /&gt;Page2: http://localhost:9080/&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-4386005564124646050?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/4386005564124646050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2008/02/how-to-configure-2-or-more-tomcat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/4386005564124646050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/4386005564124646050'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2008/02/how-to-configure-2-or-more-tomcat.html' title='How to configure 2 or more tomcat instances in the same server'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-5508187233009462923</id><published>2008-04-01T00:48:00.007+05:30</published><updated>2008-04-02T00:47:18.457+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='tomcat java linux'/><title type='text'>Installing tomcat in Linux</title><content type='html'>We will need Java to install tomcat. You can download it &lt;a href="http://java.sun.com/javase/downloads/index.jsp"&gt;here&lt;/a&gt;. I used JDK 6 Update 5.&lt;br /&gt;&lt;br /&gt;I am not going into the details of installing jdk. Make a note of where you install it. My jdk location is: /usr/java/jdk1.6.0_5&lt;br /&gt;&lt;br /&gt;Download tomcat from &lt;a href="http://tomcat.apache.org/download-60.cgi"&gt;here&lt;/a&gt;. I used 6.0.16&lt;br /&gt;&lt;br /&gt;By default tomcat listens on port 8080, so you will not need super user permissions. If you are using any port &lt;1024&gt;&lt;br /&gt;# passwd myuser&lt;username&gt;&lt;br /&gt;&lt;br /&gt;su - myuser&lt;br /&gt;&lt;br /&gt;$ unzip /your/download/directory/apache-tomcat-x.x.x.zip (or)&lt;br /&gt;&lt;br /&gt;if downloaded gzip file then&lt;br /&gt;$ tar zxfv /your/download/directory/apache-tomcat-x.x.x.tar.gz&lt;br /&gt;&lt;br /&gt;This creates a directory apache-tomcat-x.x.x&lt;home directory=""&gt;. It is always a good practice to rename the directory and give it some meaning full name:&lt;br /&gt;$ mv apache-tomcat-x.x.x test-tomcat&lt;br /&gt;&lt;br /&gt;Set JAVA_HOME&lt;br /&gt;$ export JAVA_HOME=/usr/java/jdk1.6.0_5/bin&lt;br /&gt;&lt;br /&gt;Optionally set CATALINA_HOME (If you are running only one instance).&lt;br /&gt;$ export CATALINA_HOME=/opt/test-tomcat&lt;br /&gt;&lt;br /&gt;Remember to put the above entries in user's .bash_profile.&lt;br /&gt;&lt;br /&gt;Starting tomcat:&lt;br /&gt;&lt;br /&gt;$ cd ~/test-tomcat/bin/&lt;br /&gt;$ chmod u+x *.sh ( so that the sh scripts can be executed)&lt;br /&gt;$ cd ~/myservlet/  (where you store all config files needed by your servlet)&lt;br /&gt;$ ~/test-tomcat/bin/startup.sh&lt;br /&gt;&lt;br /&gt;Note: Normally any output/log file generated by your Servlet will be created in the directory where you started tomcat from. I generally use a directory named after my servlet. For this tutorial i am using  used ~/myservlet as the directory.&lt;br /&gt;&lt;br /&gt;If your servlet isn't generating logs of its own then you can view the logs in ~/test-tomcat/logs/ directory. This directory has many files. Two files are particularly important.&lt;br /&gt;1. catalina.out is the main log file (watch out this grows faster in a big site with more hits &amp;amp; logging).&lt;br /&gt;2. There are also individual files for each day (eg format: catalina-yyyy-mm-dd.log).&lt;br /&gt;&lt;br /&gt;As i said above, tomcat service listens on port 8080 and serves webpages/ servlets through it. It also listens on following default ports:&lt;br /&gt;&lt;br /&gt;8005 - Shutdown port (you can telnet to this port from localhost and shutdown the tomcat service by issuing SHUTDOWN in the telnet session. Afaik, You cannot enable this for remote connections).&lt;br /&gt;&lt;br /&gt;8009 - AJP connector port (used to connect this tomcat instance with other tomcat or apache instances. Apache communicates with tomcat through this port).&lt;br /&gt;&lt;br /&gt;8443 - SSL port (disabled by default).&lt;br /&gt;&lt;br /&gt;To make life easier add aliases for shutting down and starting the tomcat instances:&lt;br /&gt;$alias tomcat-down=~/test-tomcat/bin/shutdown.sh&lt;br /&gt;&lt;br /&gt;&lt;server port="8005" shutdown="SHUTDOWN"&gt;&lt;/server&gt;&lt;/home&gt;&lt;/username&gt;$ alias tomcat-up= cd ~/myservlet ; ~/test-tomcat/bin/startup.sh&lt;br /&gt;&lt;br /&gt;Remember to put alias entries in ~./bashrc. Also note that the above alias entry will work only if tomcat is installed in that user's home directory.&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-5508187233009462923?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/5508187233009462923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2008/04/installing-tomcat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/5508187233009462923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/5508187233009462923'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2008/04/installing-tomcat.html' title='Installing tomcat in Linux'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-7715715370234074696</id><published>2008-03-11T01:40:00.001+05:30</published><updated>2008-05-31T00:39:01.678+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gfs'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='centos'/><category scheme='http://www.blogger.com/atom/ns#' term='rhel'/><category scheme='http://www.blogger.com/atom/ns#' term='san'/><title type='text'>Using the same LUN in multiple servers</title><content type='html'>Setting up SAN and sharing a single LUN to multiple servers.&lt;br /&gt;&lt;br /&gt;When i first started working in SAN all i knew was that i can create LUNs (a slice of space in the storage) and use them in the servers as drives. What i didn't know was that i cannot (and should not) access the same LUN from multiple servers simultaneously (I learned it the hard way).&lt;br /&gt;&lt;br /&gt;Usually I test things before putting them in production. In my first attempt i created a LUN and made it as a part of two Storage Groups, each with one server.&lt;br /&gt;&lt;br /&gt;Well, i could see the 'test' LUN in both servers and mount it in those machines simultaneously. Tried to write some data in the LUN from server1 and view it from server2. It did not show up.I could not even list the files written in server1 from server2 or vice versa. It is actually not a problem with SAN or server. The problem was with my setup. While i can assign the same LUN to multiple storage groups, one LUN must NOT be accessed from both servers simultaneously. We ended up losing data here.&lt;br /&gt;&lt;br /&gt;But why?&lt;br /&gt;&lt;br /&gt;Because, there is no way for a server to know about the disk blocks changed by the other server. Since LUNs are presented to servers as scsi drives servers cannot cordinate changes in disk blocks without special programs. We need clustered file systems for this. A clustered file system is a file system which is simultaneously mounted on multiple servers. There are several file system clustering softwares such as GFS, OCFS, Veritas CVM, luster etc.&lt;br /&gt;&lt;br /&gt;We will now see how to configure GFS.&lt;br /&gt;&lt;br /&gt;The below described installation was done with the following setup:&lt;br /&gt;SAN Storage box&lt;br /&gt;SAN Fibre switch - Brocade&lt;br /&gt;4 servers - Each connected with 1 HBA card and connected to SAN directly. I had 4 RAID groups each with one server. 2 servers( cluster nodes) were running with Centos 4.4 and the other two with 4.3&lt;br /&gt;Create 1 LUN in the SAN and assign it to all Raid groups.&lt;br /&gt;&lt;br /&gt;Note: I used dlm as cluster locking method. More on that later.&lt;br /&gt;&lt;br /&gt;To know more about setting up the hardware click &lt;a href="http://mirror.centos.org/centos/4/docs/4.5/SAC_Cluster_Administration/s2-hw-setup-CA.html"&gt;here&lt;/a&gt;&lt;br /&gt;Official documentation of setting up GFS can be found &lt;a href="http://mirror.centos.org/centos/4/docs/4.5/SAC_Cluster_Administration/"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Below are few things to be done before implementing GFS:&lt;br /&gt;&lt;span style="color:blue;"&gt;&lt;br /&gt;You will be doing the whole setup as root.&lt;br /&gt;&lt;br /&gt;Make sure clocks on the GFS nodes are synchronized (I used ntp for this).&lt;br /&gt;&lt;br /&gt;You will need one fencing device for the cluster to work.  I used Brocade Fabric Switch for fencing. &lt;span style="font-weight: bold;"&gt;GFS will not work without fencing&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Always make sure that the kernel you use has &lt;a href="http://techsk.blogspot.com/2008/03/gfs-module-in-centos-rpm.html"&gt;gfs modules&lt;/a&gt;. Some kernels don't. All you have to do is to install a kernel with gfs support and boot the server with that kernel (i used 2.6.9-55.0.2.ELsmp)&lt;br /&gt;&lt;br /&gt;We will use one server (server node) for deploying the config across other nodes. Enable password less login from this server to other nodes in the cluster.&lt;br /&gt;&lt;br /&gt;You will need GUI mode in the server node for doing cluster configuration. I have given a sample text configuration file also for those who don't have GUI access. The file can be used as is (ofcourse after substituting your values)&lt;br /&gt;&lt;br /&gt;All the nodes &amp;amp; fencing device in the cluster must be in the same subnet. Else you may have to configure multicast.&lt;br /&gt;&lt;br /&gt;FQDN names of all nodes must be resolvable. Else put appropriate entries in /etc/hosts&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Also keep the following &lt;a href="http://mirror.centos.org/centos/4/docs/4.5/SAC_Global_File_System/s1-ov-preconfig.html"&gt;details&lt;/a&gt; handy&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Number of file systems ( 1 in my case). More can be added later.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;File-system name (sk)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Journals ( I used 4)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;GFS nodes ( 4 )&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Storage devices and partitions&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can easily install Cluster Suite &amp;amp; gfs from the csgfs repo, as explained below (run these commands as root in all nodes and the server).&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;# cd /etc/yum.repos.d/&lt;br /&gt;# wget http://mirror.centos.org/centos/4/csgfs/CentOS-csgfs.repo&lt;br /&gt;# rpm --import /usr/share/doc/centos-release-4/RPM-GPG-KEY&lt;br /&gt;&lt;br /&gt;# yum install rgmanager system-config-cluster magma magma-plugins cman cman-kernel dlm dlm-kernel fence gulm iddev GFS GFS-kernel gnbd gnbd-kernel lvm2-cluster GFS-kernheaders gnbd-kernheaders&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Note: If you want the server to run with smp kernel install the appropriate rpms (eg: cman-kernel-smp)&lt;br /&gt;&lt;br /&gt;Boot the server with the new kernel (that has gfs support). Repeat this in all cluster nodes and server node.&lt;br /&gt;&lt;br /&gt;Configuration Steps:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step1: Defining &amp;amp; creating the cluster config&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In the server node type:&lt;br /&gt;# system-config-cluster&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Choose File-&gt;New&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;   Give cluster name&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;   Choose DLM as locking method&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Click ok to accept the configuration.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then you will see the cluster you just created.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 2: Adding a fence device&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Click on Fence devices and Add a Fence Device. A window named Fence Device Configuration opens up. Choose the device you have for fencing (mine is Brocade Switch).&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Fill Name, IP adress, Login &amp;amp; Password for the device.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Click ok to accept the changes&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 3: Adding a node to the cluster&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;In the cluster window choose cluster nodes and click on add a cluster node&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Give the FQDN of the server node. Leave the quoram vote blank. Click ok&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 4: Adding fencing for the node&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Choose the node you just added.&lt;br /&gt;Click on Manage fencing for this node. This will open a new window called Fence Configuration.&lt;br /&gt;Now choose add a fence level. No need to enter anything.&lt;br /&gt;Click Close (make sure that the fence level is added for that node. You will see the details if you click on the node name)&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Repeat the steps 3 &amp;amp; 4 for all other nodes. Substitute the other node names instead of server node name in Step 3.&lt;br /&gt;&lt;br /&gt;Save the config file (default: /etc/cluster/cluster.config). You will now get a Send to cluster button. Click that button to copy the config file in all the cluster nodes (this will be done through scp; that is why we configured the server to login to nodes without password).&lt;br /&gt;&lt;br /&gt;Below is a sample config file: $cat /etc/cluster/cluster.conf&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&amp;lt;cluster alias="Test" config_version="1" name="Test"&amp;gt;&lt;br /&gt; &amp;lt;fence_daemon post_fail_delay="0" post_join_delay="3"/&amp;gt;&lt;br /&gt; &amp;lt;clusternodes&amp;gt;&lt;br /&gt;         &amp;lt;clusternode name="server1.examplenet" votes="1"&amp;gt;&lt;br /&gt;                 &amp;lt;fence&amp;gt;&lt;br /&gt;                         &amp;lt;method name="1"/&amp;gt;&lt;br /&gt;                 &amp;lt;/fence&amp;gt;&lt;br /&gt;         &amp;lt;/clusternode&amp;gt;&lt;br /&gt;         &amp;lt;clusternode name="server2.example.net" votes="1"&amp;gt;&lt;br /&gt;                 &amp;lt;fence&amp;gt;&lt;br /&gt;                         &amp;lt;method name="1"/&amp;gt;&lt;br /&gt;                 &amp;lt;/fence&amp;gt;&lt;br /&gt;         &amp;lt;/clusternode&amp;gt;&lt;br /&gt; &amp;lt;/clusternodes&amp;gt;&lt;br /&gt; &amp;lt;cman expected_votes="1" two_node="1"/&amp;gt;&lt;br /&gt; &amp;lt;fencedevices&amp;gt;&lt;br /&gt;         &amp;lt;fencedevice agent="fence_brocade" ipaddr="x.x.x.x" login="user" name="Switch" passwd="test"/&amp;gt;&lt;br /&gt; &amp;lt;/fencedevices&amp;gt;&lt;br /&gt; &amp;lt;rm&amp;gt;&lt;br /&gt;         &amp;lt;failoverdomains/&amp;gt;&lt;br /&gt;         &amp;lt;resources/&amp;gt;&lt;br /&gt; &amp;lt;/rm&amp;gt;&lt;br /&gt;&amp;lt;/cluster&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;You can also create your own file in text mode and copy it to the nodes. Enter other nodes info in the config file between the tags &lt;clusternode&gt;&lt;/clusternode&gt; as found in the above example.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 5: Check if you have all needed modules&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Verify that the configuration is copied to all the servers and then proceed.&lt;br /&gt;&lt;br /&gt;Reboot all the nodes with gfs kernel and check whether they have gfs &amp;amp; dlm enabled. Below are the steps and output from my server node:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;# lsmod|grep gfs&lt;br /&gt;gfs                   290652  0&lt;br /&gt;lock_harness            8992  2 gfs,lock_dlm&lt;br /&gt;cman                  124896  3 gfs,lock_dlm,dlm&lt;br /&gt;&lt;br /&gt;# lsmod|grep dlm&lt;br /&gt;lock_dlm               44640  0&lt;br /&gt;lock_harness            8992  2 gfs,lock_dlm&lt;br /&gt;dlm                   116580  1 lock_dlm&lt;br /&gt;cman                  124896  3 gfs,lock_dlm,dlm&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;If nothing shows up, please follow the below steps:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;# modprobe gfs&lt;br /&gt;# modprobe lock_dlm&lt;br /&gt;# modprobe dlm&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;To make the modules persistent, put the below lines in /etc/rc.modules&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;# echo modprobe dlm &gt;&gt; /etc/rc.modules&lt;br /&gt;# echo modprobe lock_dlm &gt;&gt; /etc/rc.modules&lt;br /&gt;# echo modprobe gfs &gt;&gt; /etc/rc.modules&lt;br /&gt;# chmod +x /etc/rc.modules&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Also turn on all these cluster services with chkconfig: &lt;span style="color: rgb(51, 51, 255);"&gt;ccsd, cman, fenced, clvmd , gfs, rgmanager, &lt;span style="color: rgb(153, 0, 0);"&gt;clvmd&lt;/span&gt;&lt;/span&gt; (&lt;span style="color: rgb(153, 0, 0);"&gt;only if you are planning to cluster LVMs&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;Proceed to Step 6 only if step 5 is Successful ie., if all modules get detected after a fresh reboot of the server.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 6: Making a GFS partition or LVM (&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;Do this only if Step 5 was successful&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now we are going to create a clustered File system(GFS) partition in the server and use it in all nodes.&lt;br /&gt;&lt;br /&gt;In the server, create a partition inside the LUN drive (now shown as scsi drive in the server). It can be a normal partition or LVM. Below are the steps to create a clustered LVM ( in my system the LUN disk was scanned as sdb; Verify &amp;amp; substitute your's in the below config).&lt;br /&gt;&lt;br /&gt;# fdisk /dev/sdb&lt;br /&gt;Create one partition.&lt;br /&gt;&lt;br /&gt;Choose either of the two options.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Step 6: Option 1&lt;/span&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;# pvcreate /dev/sdb1&lt;br /&gt;# vgcreate VG /dev/sdb1&lt;br /&gt;# vgchange -aey VG  (To make it as clustered VG)&lt;br /&gt;&lt;br /&gt;# lvcreate -L1023G -n LV1 VG  ( Remember to substitute the size of your disk )&lt;br /&gt;# gfs_mkfs -p lock_dlm -t Test:sk -j 8 /dev/VG/LV1&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style="font-style: italic;"&gt;Step 6: Option 2&lt;/span&gt;&lt;br /&gt;For a normal partition command would be:&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;# gfs_mkfs -p lock_dlm -t Test:sk -j 8 /dev/sdb1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note: I have used Test:sk; you can substitute your clustername:fname here.&lt;br /&gt;&lt;br /&gt;Above gfs_mkfs command creates the gfs file system in our test LV, LV1.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Step 6a: Activating clustered LVMs (Optional - Skip this if you are using an ordinary partition)&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Since we used a clusted LVM you have to modify the following two lines in the /etc/lvm/lvm.conf file. Do this in all nodes and server node:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;locking_type = 2 (by default it is 1)&lt;br /&gt;locking_library = "liblvm2clusterlock.so"&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;After this restarting clvmd will show up all logical volumes inclusive of clustered LVMs. Note: You have to restart clvmd in all nodes. Rebooting all the nodes &amp;amp; server may solve the problems many times.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 8: Mounting the GFS parition/LVM in all nodes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Issue this command in all cluster nodes and server node.&lt;br /&gt;&lt;br /&gt;For normal partition:&lt;br /&gt;# mount -t gfs /dev/sdb1 /mnt&lt;br /&gt;&lt;br /&gt;For CLVMs:&lt;br /&gt;# mount -t gfs /dev/VG/LV1 /mnt&lt;br /&gt;&lt;br /&gt;You can now write a data in /mnt and access it from the other server without problems.&lt;br /&gt;&lt;br /&gt;To make the mounting points permanent after next reboot, put the below entry in /etc/fstab of all nodes and server:&lt;br /&gt;&lt;br /&gt;For Normal Paritions:&lt;br /&gt;/dev/sdb1      /MyData         gfs     defaults 0 0&lt;br /&gt;&lt;br /&gt;For CLVMs:&lt;br /&gt;/dev/VG/LV1      /MyData       gfs     defaults 0 0&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-7715715370234074696?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/7715715370234074696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2008/02/using-same-lun-in-multiple-servers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/7715715370234074696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/7715715370234074696'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2008/02/using-same-lun-in-multiple-servers.html' title='Using the same LUN in multiple servers'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-4068196695174886987</id><published>2008-03-11T01:16:00.004+05:30</published><updated>2008-05-31T00:38:13.749+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gfs'/><category scheme='http://www.blogger.com/atom/ns#' term='modules'/><category scheme='http://www.blogger.com/atom/ns#' term='centos'/><category scheme='http://www.blogger.com/atom/ns#' term='rhel'/><category scheme='http://www.blogger.com/atom/ns#' term='kernel'/><title type='text'>GFS module in CentOS RPM</title><content type='html'>How to check if the kernel you have in the server has gfs modules?&lt;br /&gt;&lt;br /&gt;When i was installing gfs support in one of my servers i wanted to check whether the kernel i used was having gfs modules. Without that i cannot make gfs work. It was simple to find out.&lt;br /&gt;&lt;br /&gt;After installing the kernel and gfs rpms, just list the files under the kernel modules directory:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;# cd /lib/modules/2.6.9-55.0.2.ELsmp&lt;br /&gt;# ls kernel/fs/&lt;br /&gt;autofs4  cramfs    ext3  freevxfs  gfs_locking  hfsplus  jffs2  msdos  nfs_common  nls    udf&lt;br /&gt;cifs     exportfs  fat   gfs       hfs          jbd      lockd  nfs    nfsd        smbfs  vfat&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You can even list the files in gfs and gfs_locking directories&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;# ls kernel/fs/gfs&lt;br /&gt;gfs.ko&lt;br /&gt;&lt;br /&gt;# ls kernel/fs/gfs_locking/&lt;br /&gt;lock_dlm  lock_gulm  lock_harness  lock_nolock&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It will be tricky if you want other modules like xfs. You need to find a kernel RPM that has both xfs &amp;amp; gfs module rpms or if you have time to play you can compile them all yourselves.&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-4068196695174886987?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/4068196695174886987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2008/03/gfs-module-in-centos-rpm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/4068196695174886987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/4068196695174886987'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2008/03/gfs-module-in-centos-rpm.html' title='GFS module in CentOS RPM'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-4190836713413409807</id><published>2008-02-26T00:33:00.006+05:30</published><updated>2008-05-28T23:58:32.341+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='usage'/><category scheme='http://www.blogger.com/atom/ns#' term='howto'/><category scheme='http://www.blogger.com/atom/ns#' term='san'/><title type='text'>Intro to SAN config</title><content type='html'>I am trying to explain the terms used while configuring SAN. You can use the below details as reference  for creating/reconfiguring LUNs in a SAN Storage.&lt;br /&gt;&lt;br /&gt;The Model i worked on is EMC CX-320C. It had two DAEs (Disk Arrary Enclosures). DAE1 was populated with FC Drives and DAE2 was populated with SATAII. You must be able to figure out the options in other Storages easily.&lt;br /&gt;&lt;br /&gt;EMC has an web interface for configuring the drives, RAID levels and to prepare them  for storing data. It is called Navisphere Manager.&lt;br /&gt;&lt;br /&gt;In the EMC's interface you will see a list of things - Hosts connected to the SAN, physical interfaces, SPA, SPB details ( drives in that ), RAID Groups and Storage Groups. Initially there wont be any RAID/Storage Group.&lt;br /&gt;&lt;br /&gt;First we have to configure the drives into specific RAID (0/2/5) groups and then add them  to  a Storage group.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;RAID Group: (RG)&lt;/b&gt;&lt;br /&gt;A collection of drives operating in a RAID. When creating a new RAID group you have to specify the following:&lt;br /&gt;1. RAID group id (Unique).&lt;br /&gt;2. Number of disks you are going to add (you can select the drives from specific DAE).&lt;br /&gt;3. RAID Type - HotSpare, Disk, Unbound (more on this later). If selecting more than 3 drives RAID 0,3,5 will show up. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;Best practices while creating RGs:&lt;br /&gt;1. Do not combine the different disk types into single RG. Combining them will make the RAID array to operate in lowest speed available.eg: Create separate RGs  for  FC drives and SATAII drives. Combining them will make FC drives to operate in SATAII's speed.&lt;br /&gt;2. Remember to have one drive as global hot spare for the whole array/DAE so that it will kick in when one of the drives in the array fails.&lt;br /&gt;3. RAID0 is for highest performance (no redundancy) while RAID5 is for high redundancy (ofcourse has performance hit).&lt;br /&gt;4. Do not combine drives from 2 DAEs to a single RG even if they are of same type and speed.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;LUN&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;After Creating a RAID group you will create LUNs. LUNs are nothing but partitions presented as (scsi) drives to servers. LUNs are always a part of the RAID group. You cannot assign a RG as whole to a Storage Group, instead you will assign individual LUN/s to SG/s.&lt;br /&gt;&lt;br&gt;&lt;br /&gt;If you have specified 'unbound' as RAID type while creating RG, you can specify the RAID type when creating a LUN. Remember all LUNs in a RG must of same RAID Type.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Storage Group&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;Storage Group is a collection of all info: LUNs, Hosts, SAN Copy connections etc., (we have all these three and there may be more that i am not aware of). A unique name must be given for every storage group.&lt;br /&gt;&lt;br /&gt;Create a Storage group as you desire and add LUNs and hosts to it. You can either select LUNs &amp;amp; connect hosts from the Storage group or add LUN to a Storage Group from a RG.&lt;br /&gt;&lt;br /&gt;Note the following:&lt;br /&gt;1. You can add one LUN to multiple storage groups. But remember that only one server from the SGs must access the LUN. If you want more than one server to access a single LUN simultaneously then that LUN must be configured as a &lt;a href="http://techsk.blogspot.com/2008/02/using-same-lun-in-multiple-servers.html"&gt;file system cluster&lt;/a&gt; (eg: gfs).&lt;br /&gt;2. You can add  a host to only one SG. Adding the same host to another SG will remove the host from the old SG.&lt;br /&gt;3. There can be as many LUNs in a SG.&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-4190836713413409807?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/4190836713413409807/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2008/02/intro-to-san-config.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/4190836713413409807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/4190836713413409807'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2008/02/intro-to-san-config.html' title='Intro to SAN config'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-7292204988795419289</id><published>2007-09-07T12:40:00.000+05:30</published><updated>2008-02-04T22:35:31.449+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='modules'/><category scheme='http://www.blogger.com/atom/ns#' term='vsftpd'/><category scheme='http://www.blogger.com/atom/ns#' term='iptables'/><title type='text'>Vsftpd and iptables</title><content type='html'>In one of our servers we were running vsftpd service. iptables was setup to allow ports 21 and 20(data). Still after the user logs in, the connection dies when trying to enter  passive mode.&lt;p&gt;Entry: /sbin/modprobe ip_conntrack_ftp&lt;/p&gt;&lt;p&gt;was already there in /etc/rc.local&lt;/p&gt;&lt;p&gt;still the module was not loaded by default, Since iptables unloas all modules automatically everytime it starts.&lt;br /&gt;&lt;/p&gt;Change the below lines to change this behavior:&lt;br /&gt;&lt;p&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;ip_conntrack_ftp       76273  0&lt;br /&gt;ip_conntrack           45573  1 ip_conntrack_ftp&lt;/p&gt;&lt;p&gt;IPTABLES_MODULES_UNLOAD="no"    # Makes all modules to be persistent&lt;/p&gt;&lt;p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;Restart the service and check whether the conntrack module is loaded&lt;/p&gt;&lt;p&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&lt;/p&gt;&lt;p&gt;# service iptables restart&lt;/p&gt;&lt;p&gt;# lsmod|grep ip_conntrack&lt;/p&gt;&lt;p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Worked liked charm. Now i could login to the ftp service and enter passive mode.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-7292204988795419289?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/7292204988795419289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2007/09/vsftpd-and-iptables.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/7292204988795419289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/7292204988795419289'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2007/09/vsftpd-and-iptables.html' title='Vsftpd and iptables'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-7731025512075048270</id><published>2007-08-05T00:36:00.001+05:30</published><updated>2007-09-27T18:02:47.048+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gfs'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='san'/><title type='text'>EMC SAN and GFS</title><content type='html'>Currently i am working on configuring gfs, with 3 servers using the same LUN from a EMC SAN storage. Will be posting the configuration steps shortly.&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-7731025512075048270?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/7731025512075048270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/7731025512075048270'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2007/08/emc-san-and-gfs.html' title='EMC SAN and GFS'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-1194493256370322891</id><published>2007-05-19T12:00:00.001+05:30</published><updated>2008-05-13T23:42:10.442+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Qmail'/><category scheme='http://www.blogger.com/atom/ns#' term='pop3'/><category scheme='http://www.blogger.com/atom/ns#' term='pop3S'/><category scheme='http://www.blogger.com/atom/ns#' term='Dual MTA'/><title type='text'>Configuring pop3-secure(SSL)- Dual MTA Contd...</title><content type='html'>Continuing my &lt;a href="http://techsk.blogspot.com/2007/05/dual-mta-qmail-contd.html"&gt;previous post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Below procedure shows the steps to configure pop3 with SSL.&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;cd /service/&lt;br /&gt;svc -d qmail-pop3d/&lt;br /&gt;cd /var/qmail/supervise/&lt;br /&gt;mkdir qmail-pop3d-secure&lt;br /&gt;mkdir qmail-pop3d-secure/log&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;vi qmail-pop3d-secure/run&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;#!/bin/sh exec /usr/local/bin/softlimit -m 20000000 \ /usr/local/bin/tcpserver -H -R -v -l 0 -c100 0 995 \ /usr/sbin/stunnel /var/qmail/control/pop3s.conf 2&gt;&amp;amp;1&lt;br /&gt;&lt;br /&gt;# cd /var/qmail/control&lt;br /&gt;&lt;br /&gt;# vi pop3s.conf&lt;br /&gt;&lt;br /&gt;cert = /var/qmail/control/servercert.pem&lt;br /&gt;exec = /var/qmail/bin/qmail-popup&lt;br /&gt;execargs = qmail-popup example.net /home/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir&lt;br /&gt;&lt;br /&gt;# mkdir -p /var/log/qmail/qmail-pop3d-secure&lt;br /&gt;# chown -R qmaill.root /var/log/qmail/qmail-pop3d-secure&lt;br /&gt;# cd /var/qmail/supervise&lt;br /&gt;# cp qmail-pop3d/log/run qmail-pop3d-secure/log/&lt;br /&gt;# chmod 755 qmail-pop3d-secure/run&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-1194493256370322891?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/1194493256370322891/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2007/05/configuring-pop3-securessl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/1194493256370322891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/1194493256370322891'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2007/05/configuring-pop3-securessl.html' title='Configuring pop3-secure(SSL)- Dual MTA Contd...'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-3735962663312589556</id><published>2007-05-11T23:01:00.000+05:30</published><updated>2008-02-09T00:47:31.894+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Qmail'/><category scheme='http://www.blogger.com/atom/ns#' term='jms patch'/><category scheme='http://www.blogger.com/atom/ns#' term='Dual MTA'/><category scheme='http://www.blogger.com/atom/ns#' term='qmailrocks'/><title type='text'>Dual MTA Qmail - Contd...</title><content type='html'>OS: CentOS4.4(64bit)&lt;br /&gt;&lt;br /&gt;For the inside queue(that scans and delivers mail) i followed the instructions from qmailrocks. Disk space, pre-installation check list &amp;amp; other instructions are &lt;a href="http://www.qmailrocks.org/checklist.php"&gt; here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Note: I installed vpopmail without mysql since the number of domains i manage is small. If you are going to have more than 10 domains consider using vpopmail with mysql backend. &lt;span style="color:red;"&gt;Remember to replace all example.net entries with your own domain. For hostnames enter the FQDN of your server.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After installing qmailrocks, make sure that mails to &amp;amp; from  your domain works. The qmail installation from qmailrocks listens on port 25, alter it to listen on port 2000.&lt;br /&gt;&lt;br /&gt;Last few lines in '/var/qmail/supervise/qmail-smtpd/run' looks like this&lt;br /&gt;&lt;br /&gt;# tail -4 /var/qmail/supervise/qmail-smtpd/run&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;/usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \&lt;br /&gt;-u "$QMAILDUID" -g "$NOFILESGID" 127.0.0.1 2000 \&lt;br /&gt;/var/qmail/bin/qmail-smtpd your.hostname.here \&lt;br /&gt;/home/vpopmail/bin/vchkpw /usr/bin/true 2&gt;&amp;amp;1&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;With the above setting, the QMR installation will serve us as a separate queue which will scan any mail that comes to it. Now we have everything setup to install our other queue.&lt;br /&gt;&lt;br /&gt;Note: I used /var/qmail-inside as my qmail directory(for all incoming mails). You can choose any other directory you want. Also for this queue i patched qmail with &lt;a href="http://qmail.jms1.net/patches/combined-details.shtml"&gt; jms's combined patch set 6cd&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Below are the steps:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;cd /usr/local/src&lt;br /&gt;wget ftp://ftp.jp.qmail.org/qmail/qmail-1.03.tar.gz&lt;br /&gt;wget http://qmail.jms1.net/patches/qmail-1.03-jms1.6cd.patch&lt;br /&gt;wget http://untroubled.org/qmail-qfilter/qmail-qfilter-2.1.tar.gz&lt;br /&gt;wget http://qmail.jms1.net/scripts/service-qmail-send-run&lt;br /&gt;wget http://qmail.jms1.net/scripts/service-qmail-smtpd-run&lt;br /&gt;tar zxfv qmail-1.03.tar.gz&lt;br /&gt;mv qmail-1.03 qmail-inside&lt;br /&gt;cd qmail-inside/&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Edit conf-qmail and change the directory entry from /var/qmail to /var/qmail-inside&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;echo 211 &gt; conf-split&lt;br /&gt;echo 255 &gt; conf-spawn&lt;br /&gt;patch &lt; /usr/local/src/qmail-1.03-jms1.6cd.patch make setup check &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Next we have to copy create necessary control files for qmail. Copying all the control files from the /var/qmail/control will do. But we have remove some unwanted files too. virtualdomains file has the names of the virtual domains created with vpopmail. However, having this file means that the mail will be directly delivered to the vpopmail user rather than passing it to out other queue.&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;cd /var/qmail-inside/control/&lt;br /&gt;cp /var/qmail/control/* /var/qmail-inside/control/&lt;br /&gt;rm -f virtualdomains.lock locals.lock rcpthosts.lock clientcert.pem&lt;br /&gt;rm -f virtualdomains&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It is better to link some files directly from /var/qmail so that when there are new virtual domains we don't have to change the file each time we add a new virtual domain.&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;/var/qmail-inside/control&lt;br /&gt;rm -f rcpthosts&lt;br /&gt;ln -s /var/qmail/control/rcpthosts&lt;br /&gt;rm -f plusdomain&lt;br /&gt;ln -s /var/qmail/control/plusdomain&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now we are gonna created necessary aliases and cbd file.&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;cd /var/qmail-inside/alias  echo "postmaster" &gt; .qmail-root&lt;br /&gt;echo "postmaster@example.net" &gt; .qmail-postmaster&lt;br /&gt;echo "postmaster" &gt; .qmail-mailer-daemon&lt;br /&gt;cp .qmail-root .qmail-abuse&lt;br /&gt;echo "127.0.0.1:allow,RELAYCLIENT=\"\"" &gt; /etc/tcp.smtp.inside&lt;br /&gt;tcprules /etc/tcp.smtp.inside.cdb /etc/tcp.smtp.inside.tmp &lt; /etc/tcp.smtp.inside&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Next step is to create all supervise and log directories&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;mkdir -p /var/qmail-inside/supervise/qmail-inside-send/log&lt;br /&gt;mkdir -p /var/qmail-inside/supervise/qmail-smtpd-25/log&lt;br /&gt;mkdir -p /var/qmail-inside/supervise/qmail-smtpd-465/log&lt;br /&gt;chmod +t /var/qmail-inside/supervise/qmail-inside-send&lt;br /&gt;chmod +t /var/qmail-inside/supervise/qmail-smtpd-25&lt;br /&gt;chmod +t /var/qmail-inside/supervise/qmail-smtpd-465&lt;br /&gt;mkdir -p /var/log/qmail-inside/qmail-inside-send&lt;br /&gt;mkdir -p /var/log/qmail-inside/qmail-smtpd-25&lt;br /&gt;mkdir -p /var/log/qmail-inside/qmail-smtpd-465&lt;br /&gt;chown -R qmaill /var/log/qmail-inside/&lt;br /&gt;chown vpopmail.qmail servercert.pem&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Create run files for both smtpd instances:&lt;br /&gt;vi /var/qmail-inside/supervise/qmail-smtpd-25/log/run&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;#!/bin/sh exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t s2500000 /var/log/qmail-inside/qmail-smtpd-25&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;vi /var/qmail-inside/supervise/qmail-inside-send/log/run&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;#!/bin/sh exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t /var/log/qmail-inside/qmail-inside-send&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now we are going to create the supervise directories:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;cd /var/qmail-inside/supervise&lt;br /&gt;cp /usr/local/src/service-qmail-smtpd-run qmail-smtpd-25/&lt;br /&gt;cp /usr/local/src/service-qmail-smtpd-run qmail-smtpd-465/&lt;br /&gt;cp /usr/local/src/service-qmail-send-run qmail-inside-send/&lt;br /&gt;cp qmail-smtpd-25/log/run qmail-smtpd-465/log/&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;vi qmail-smtpd-465/log/run &lt;br /&gt;&lt;br /&gt;change the directory qmail-smtpd-25 to qmail-smtpd-465&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;chmod 755 qmail-smtpd-465/log/run qmail-smtpd-25/log/run\ qmail-inside-send/log/run&lt;br /&gt;cd /var/qmail-inside/supervise/qmail-inside-send/&lt;br /&gt;mv service-qmail-send-run run&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Edit the file run: vi run&lt;br /&gt;&lt;br /&gt;and change the following entries&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;VQ=/var/qmail to VQ=/var/qmail-inside&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;and save the file&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;chmod 755 run&lt;br /&gt;cd ../qmail-smtpd-25/&lt;br /&gt;mv service-qmail-smtpd-run run&lt;br /&gt;vi run&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Change the following:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;VQ="/var/qmail-inside"&lt;br /&gt;SMTP_CDB="/etc/tcp.smtp.inside.cdb"&lt;br /&gt;GREETDELAY=30&lt;br /&gt;IP=0&lt;br /&gt;&lt;br /&gt;uncomment RBLSMTPD_PROG, RBL_BAD , save the file and make it executable.&lt;br /&gt;# chmod 755 run&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;We have to install sslserver for enabling secured smtp connections(i configured it to listen on port 465).&lt;br /&gt;&lt;br /&gt;Installing sslserver&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;cd /usr/local/src/&lt;br /&gt;wget http://www.superscript.com/ucspi-ssl/ucspi-ssl-0.70.tar.gz&lt;br /&gt;cd /package/&lt;br /&gt;tar zxfv /usr/local/src/ucspi-ssl-0.70.tar.gz&lt;br /&gt;cd host/superscript.com/net/ucspi-ssl-0.70&lt;br /&gt;package/compile&lt;br /&gt;package/rts  # output should be empty&lt;br /&gt;package/install&lt;br /&gt;cd /var/qmail-inside/supervise/qmail-smtpd-465/&lt;br /&gt;mv service-qmail-smtpd-run run&lt;br /&gt;vi run&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;change the following&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;VQ="/var/qmail-inside"&lt;br /&gt;SMTP_CDB="/etc/tcp.smtp.cdb"&lt;br /&gt;QUSER=vpopmail&lt;br /&gt;IP=0&lt;br /&gt;PORT=465&lt;br /&gt;SSL=1&lt;br /&gt;AUTH=1&lt;br /&gt;REQUIRE_AUTH=1&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Save the file&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;chmod 755 run&lt;br /&gt;cd /var/qmail-inside/control/&lt;br /&gt;echo ":127.0.0.1:2000" &gt; smtproutes&lt;br /&gt;cd /service/&lt;br /&gt;ln -s /var/qmail-inside/supervise/qmail-smtpd-25/&lt;br /&gt;ln -s /var/qmail-inside/supervise/qmail-inside-send/&lt;br /&gt;ln -s /var/qmail-inside/supervise/qmail-smtpd-465/&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;ps -ef|grep qmail-inside&lt;br /&gt;&lt;br /&gt;will show that the processes are started and running. Check the corresponding services logs and make sure that they don't throw errors.&lt;br /&gt;&lt;br /&gt;If you followed the above steps word by word then, log files for the above services will be at: /var/log/qmail-inside/qmail-smtpd-25/current and /var/log/qmail-inside/qmail-smtpd-465/current&lt;br /&gt;&lt;br /&gt;Errors and fixes:&lt;br /&gt;When configuring your mail client to send mail you get auth failure. You have to use useid@example.net as username. Also make sure that SSLis enbaled and the port is set as 465.&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-3735962663312589556?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/3735962663312589556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2007/05/dual-mta-qmail-contd.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/3735962663312589556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/3735962663312589556'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2007/05/dual-mta-qmail-contd.html' title='Dual MTA Qmail - Contd...'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-8872713684169310018</id><published>2007-05-08T23:44:00.001+05:30</published><updated>2008-05-13T23:41:01.218+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Qmail'/><category scheme='http://www.blogger.com/atom/ns#' term='Dual MTA'/><title type='text'>Dual MTA with Qmail</title><content type='html'>Recently i installed two qmails in a single server to handle mails from inner and outer domains. I will be posting a step by step tutorial of the same in the coming days.&lt;br /&gt;&lt;br /&gt;Why dual MTA?&lt;br /&gt;&lt;br /&gt;Basically i wanted two different queues to handle mails in different ways.&lt;br /&gt;Queue 1) To get the mails(incoming) and pass it on to queue 2.&lt;br /&gt;Queue 2) Will receive mails only from queue 1, runs virus scan, spamassassin  and delivers mails to local or remote mail boxes(outgoing).&lt;br /&gt;&lt;br /&gt;While i could have achieved the same functionality with single queue i doubted it may not suit my needs in the future. Say if the server can handle 250 mails and the queue is already full then we may see some delay in receiving mails from remote machines and/or may completely loose some mails. More over I don't have to change the incoming queue's setup and continue receiving mails until i needed. It provides me the flexibility to pass the message to different server/s altogether whenever needed.&lt;br /&gt;&lt;br /&gt;How the setup will look like?&lt;br /&gt;&lt;br /&gt;Queue 1: Two qmail-smtpd instances one listening on port 25 and the other listening on port 465(SSL).&lt;br /&gt;port 25 - To receive mails from public domains such as yahoo/google.&lt;br /&gt;port 465 - For internal users to send mails(auth + encryption).&lt;br /&gt;&lt;br /&gt;Queue 2: qmail-smtpd listens on port 2000. Receives mail only from localhost(127.0.0.1). Calls qmailscanner and have it scanned with clamav &amp;amp; spamassassin. If it has virus the mail is quarantined. If tagged SPAM then the mail's subject is prepend with [SPAM] and delivered to user's mail box. If the user is local, the mail will be delivered to Junk directory.&lt;br /&gt;&lt;br /&gt;Also there were some specific needs for me. We had many aliases in the server and only certain people must be able to send mail to those aliases. While this can be done with mailing list software like ezmlm i thought of discovering more. When a unauthorized user sends a mail to particular alias it will send a mail to the moderator. I wanted the mail to be bounced back to the sender(ezmlm has that option) and also give my own message for the bounce(reason). I wrote my own perl script to achieve this and it was simple enough. Ezmlm is also installed in my server and serving other purposes.&lt;br /&gt;&lt;br /&gt;Enough for tonight. I will be posting a &lt;a href="http://techsk.blogspot.com/2007/05/dual-mta-qmail-contd.html"&gt;step-by-step&lt;/a&gt; guide in couple of days.&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-8872713684169310018?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/8872713684169310018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2007/05/dual-mta-with-qmail.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/8872713684169310018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/8872713684169310018'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2007/05/dual-mta-with-qmail.html' title='Dual MTA with Qmail'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-5936182351398460667</id><published>2006-09-14T12:17:00.001+05:30</published><updated>2008-02-09T00:52:31.590+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='clean'/><category scheme='http://www.blogger.com/atom/ns#' term='file'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Cleaning Up Data with Perl</title><content type='html'>We had a peculiar problem. We got a plain text file of about 150G. The file had many records in it. Most of the records had control characters like ^M(equivalent to \n in Unix), ^@(0x000) &amp; tabs. We tried to view the record and count the characters in each. But the word count for each record varied as there were special and control characters. Some records did not have \n at the end and were merged with the next record. Trying to open the file in vi was horrible. Only thing we knew was the record size. We tried to remove the control characters with sed and see what happens.&lt;br /&gt;&lt;br /&gt;But sed hanged after processing 6G and took very long time ( 6 Hrs for 6G ). So i thought of doing this with perl. I posted the question in the perl forums and got a good solution. The solution was to read n characters(where n = each record size that we already knew), remove special characters from them and append \n to the end and write it in a new file. That worked fine! Below is the perl code i used:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;#! /usr/bin/perl&lt;br /&gt;# Script to Remove control characters from the BIG data file and print&lt;br /&gt;the output -&lt;br /&gt;# Note: Redirect the output to a new file while calling this from bash.&lt;br /&gt;open(MYINPUTFILE, @ARGV[0]);&lt;br /&gt;$/=\1000;&lt;br /&gt;while(&amp;lt;MYINPUTFILE&amp;gt;){&lt;br /&gt;s/[[:cntrl:]]/ /g;&lt;br /&gt;print "$_\n";&lt;br /&gt;}&lt;br /&gt;close(MYINPUTFILE);&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;I got this solution from &lt;a href="http://thread.gmane.org/gmane.comp.lang.perl.beginners/60975/focus=60975"&gt;perl forum&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-5936182351398460667?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/5936182351398460667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/5936182351398460667'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2006/09/cleaning-up-data-with-perl.html' title='Cleaning Up Data with Perl'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-140193243792028450</id><published>2006-08-26T20:43:00.001+05:30</published><updated>2007-09-07T12:58:45.877+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Encryption'/><category scheme='http://www.blogger.com/atom/ns#' term='PGP'/><title type='text'>PGP - Encryption, mails and files</title><content type='html'>About Peculiar problem i encountered.&lt;br /&gt;&lt;br /&gt;One of my colleagues wanted to send a pgp public key to the client. I thought it was for encrypting mails and created a key pair in Openpgp(Thunderbird) and sent the public key. But at last it turned out that the key was used to encrypt files and not mails.&lt;br /&gt;&lt;br /&gt;We have to use gpg command in linux for encrypting/decypting files. I tried importing the public key(that i sent) to the gpg keyring in the machine that had encrypted files.&lt;br /&gt;$gpg --import &amp;lt;public-key-file&lt;br /&gt;&lt;br /&gt;and tried decrypting the file:&lt;br /&gt;gpg -o output-file --decrypt encrypted_file&lt;br /&gt;&lt;br /&gt;But it did not work. By no way i could decrypt the files. Then a thought stuck me that "Shouldn't i import the private key to decrypt the file rather than the public key". So, i tried the key management tool in&lt;br /&gt;Openpgp(Thunderbird). In that i selected my key and exported it to a file. I compared that key file with my public key. I noticed that the file that i exported from Thunderbird had both private and public key&lt;br /&gt;info. I copied the key file to the system having all the encrypted files. Then i imported the copied key&lt;br /&gt;to the keyring with:&lt;br /&gt;#gpg --import keyfile eg: gpg --import my.key.asc&lt;br /&gt;&lt;br /&gt;This imported both the public key and secret key(private key). I could  see the keys with:&lt;br /&gt;#gpg --list-keys&lt;br /&gt;#gpg --list-secret-keys&lt;br /&gt;&lt;br /&gt;Then i used gpg to decrypt the files:&lt;br /&gt;gpg gpg -o output-file --decrypt encrypted_file&lt;br /&gt;&lt;br /&gt;This did the trick and i was able to decrypt all the files one by one.&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-140193243792028450?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/140193243792028450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2006/08/pgp-encryption-mails-and-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/140193243792028450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/140193243792028450'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2006/08/pgp-encryption-mails-and-files.html' title='PGP - Encryption, mails and files'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-1147069637995833238</id><published>2006-08-23T20:15:00.001+05:30</published><updated>2007-09-07T12:57:16.485+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='CSV'/><category scheme='http://www.blogger.com/atom/ns#' term='MYSQL'/><title type='text'>Converting Mysql table to CSV</title><content type='html'>&lt;span class="gmail_quote"&gt;&lt;/span&gt;Trying to export the data from mysql to csv will end up in creating the csv file in the mysql data directory (/var/lib/mysql). Use this method to covert the individual tables from mysql to CSV format&lt;br /&gt;&lt;br /&gt;$mysql -u &amp;lt;username&amp;gt; -h &amp;lt;hostname&amp;gt; &amp;lt;databasename&amp;gt; -p -B -e "select * from table;" | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' &amp;gt; test.csv&lt;br /&gt;&lt;div&gt;&lt;br /&gt;Note: The whole command above must essentially be in a single line&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-1147069637995833238?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/1147069637995833238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2006/08/converting-mysql-table-to-csv.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/1147069637995833238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/1147069637995833238'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2006/08/converting-mysql-table-to-csv.html' title='Converting Mysql table to CSV'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-5514729725488220018</id><published>2006-08-17T21:12:00.000+05:30</published><updated>2007-05-08T23:56:53.466+05:30</updated><title type='text'>My New Tech Blog</title><content type='html'>I had a tech blog at livejournal and making new post there was time consuming(had to login to livejournal to post new entries). Mails to journal id was allowed only for paid customers.&lt;br /&gt;&lt;br /&gt;I have a different blog for my personal events &lt;blogitemurl&gt;&lt;a href="http://sunsarav.blogspot.com"&gt; here &lt;/a&gt;&lt;/blogitemurl&gt;which allowed me to post the from anywhere by just sending a mail. I like this feature very much in blogger and am posting all the blogs i had in liverjournal to blogger(this blog). I will be using this new blog to post all my further findings/experiments in Linux and other technologies that interests me.&lt;br /&gt;&lt;br /&gt;I am posting the blogs here from livejournal with the same date i posted there so as to remember things and days. So you will see back dated posts here.&lt;br /&gt;&lt;br /&gt;Thanks! for reading this.&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-5514729725488220018?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/5514729725488220018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2006/08/my-new-tech-blog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/5514729725488220018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/5514729725488220018'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2006/08/my-new-tech-blog.html' title='My New Tech Blog'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-1544845853468730311</id><published>2006-05-08T06:20:00.000+05:30</published><updated>2007-09-07T12:59:15.612+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='find'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>Find Files</title><content type='html'>&lt;p&gt;Commands to find files:&lt;br /&gt;&lt;br /&gt;Files modified with in 24 hours and list them&lt;br /&gt;&lt;br /&gt;find / -mtime 1 -exec ls -l {} \;&lt;br /&gt;&lt;br /&gt;Same but copies to /tmp&lt;br /&gt;&lt;br /&gt;find / -mtime 1 -exec cp {} /tmp \;&lt;br /&gt;&lt;br /&gt;Other options:&lt;br /&gt;-atime n Finding files that were accessed n days ago. You can also use the +n for finding files that were accessed over n days ago, or even -n for finding files that were accessed less than n days ago.&lt;br /&gt;-mtime n  Same as -atime but here we find files that were modified n days ago.&lt;br /&gt;-ctime n  Same as -atime and -mtime but here we find files that were changed n days ago.&lt;br /&gt;-newer file    Find files that have been modified more recently than file.&lt;br /&gt;&lt;br /&gt;More help &lt;a href="http://www.linuxdevcenter.com/linux/cmd/cmd.csp?path=f/find"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-1544845853468730311?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/1544845853468730311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2006/05/find-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/1544845853468730311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/1544845853468730311'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2006/05/find-files.html' title='Find Files'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-5402484353062121450</id><published>2005-06-24T04:27:00.000+05:30</published><updated>2006-08-17T21:32:52.768+05:30</updated><title type='text'>Changing hostname in Solaris</title><content type='html'>Just edit the following files and substitute each occurrence of the old hostname with the new one.&lt;br /&gt;&lt;br /&gt;Changing the following files entry will make hostname changes permanent.&lt;br /&gt;&lt;br /&gt;/etc/hosts&lt;br /&gt;/etc/nodename&lt;br /&gt;/etc/hostname.xxn&lt;br /&gt;(xxn = network interface, such as hme0)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can change the entries in below files too. But they are all optional:&lt;br /&gt;/etc/net/ticlts/hosts&lt;br /&gt;/etc/net/ticots/hosts&lt;br /&gt;/etc/net/ticotsord/hosts&lt;br /&gt;/etc/inet/ipnodes&lt;br /&gt;(if this file exists and if a hostname entry exists)&lt;br /&gt;&lt;br /&gt;hostname newhostname will change the hostname instantly.&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-5402484353062121450?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/5402484353062121450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2005/06/changing-hostname-in-solaris.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/5402484353062121450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/5402484353062121450'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2005/06/changing-hostname-in-solaris.html' title='Changing hostname in Solaris'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-952829229314174286</id><published>2005-05-03T12:56:00.000+05:30</published><updated>2007-09-07T12:56:41.074+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>Some commands that may help</title><content type='html'>Suppose you have a file named file.txt which has hunders of lines and you want to see lines 100-120&lt;br /&gt;&lt;br /&gt;head -120 file.txt|tail -20&lt;br /&gt;&lt;br /&gt;Find and replace text in vi: 1,$s/oldvalue/newvalue/g (or) :%s/oldvalue/newvalue/g&lt;br /&gt;&lt;br /&gt;More help with vi here: &lt;a href="http://www.ahinc.com/linux101/vi.htm"&gt;http://www.ahinc.com/linux101/vi.ht&lt;wbr&gt;m&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-952829229314174286?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/952829229314174286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2005/03/some-commands-that-may-help.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/952829229314174286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/952829229314174286'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2005/03/some-commands-that-may-help.html' title='Some commands that may help'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-6472424810074691773</id><published>2005-04-17T06:22:00.000+05:30</published><updated>2006-08-17T21:30:05.138+05:30</updated><title type='text'>Error message</title><content type='html'>&lt;p&gt;While compiling packages, sometimes you get the error message like: undefined reference to 'errno' &lt;/p&gt; &lt;p&gt; To fix this add: #include &lt;errno.h&gt;  at the beginning of error.h &lt;/p&gt;   And the compilation will go on smoothly, thereafter.&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-6472424810074691773?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/6472424810074691773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2005/04/error-message.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/6472424810074691773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/6472424810074691773'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2005/04/error-message.html' title='Error message'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-3371320756961837985</id><published>2005-04-03T08:26:00.000+05:30</published><updated>2006-08-17T21:28:51.003+05:30</updated><title type='text'>Centralised log server</title><content type='html'>Here are fews links that will help collecting the logs from linux and windows clients to a centralised syslog server:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sans.org/rr/whitepapers/casestudies/713.php"&gt;http://www.sans.org/rr/whitepapers/case&lt;wbr&gt;studies/713.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ntsyslog.sourceforge.net/"&gt;http://ntsyslog.sourceforge.net/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.kiwisyslog.com/"&gt;http://www.kiwisyslog.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.netadmintools.com/art127.html"&gt;http://www.netadmintools.com/art127.htm&lt;wbr&gt;l&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-3371320756961837985?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/3371320756961837985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2005/04/centralised-log-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/3371320756961837985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/3371320756961837985'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2005/04/centralised-log-server.html' title='Centralised log server'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-9185201620507542159</id><published>2005-01-03T09:50:00.000+05:30</published><updated>2006-08-17T21:27:53.932+05:30</updated><title type='text'>Samba Without Roaming profile</title><content type='html'>When configuring samba server as PDC some times you may want to create users without roaming profile.&lt;br /&gt;&lt;br /&gt;The solution is client side: gpedit.msc leads you to the policy editor&lt;br /&gt;Computer Configuration\Administrative Templates\System\User Profiles&lt;br /&gt;Enable both the "Prevent Roaming Profile changes from propagating to the server" setting and the "Only allow local user profiles" setting and it will do the trick.&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-9185201620507542159?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/9185201620507542159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2005/01/samba-without-roaming-profile.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/9185201620507542159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/9185201620507542159'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2005/01/samba-without-roaming-profile.html' title='Samba Without Roaming profile'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-1483756064790529730</id><published>2004-11-17T08:43:00.000+05:30</published><updated>2006-08-17T21:26:56.406+05:30</updated><title type='text'>More Additions</title><content type='html'>How to run your own yum repository? Read this:&lt;br /&gt;&lt;a href="http://www.linux.com/article.pl?sid=04/07/22/1718242"&gt;http://www.linux.com/article.pl?sid=0&lt;wbr&gt;4/07/22/1718242&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thread about A perfect yum.conf file here:&lt;br /&gt;&lt;a href="http://www.redhat.com/archives/fedora-list/2004-May/msg05704.html"&gt;http://www.redhat.com/archives/fedora-l&lt;wbr&gt;ist/2004-May/msg05704.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Linux Encyclopedia:&lt;br /&gt;&lt;a href="http://stommel.tamu.edu/%7Ebaum/linuxlist/linuxlist/linuxlist.html"&gt;http://stommel.tamu.edu/~baum/linux&lt;wbr&gt;list/linuxlist/linuxlist.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Some Tips:&lt;br /&gt;&lt;a href="http://linuxportal.pp.ru/modules.php?name=Sections&amp;op=viewarticle&amp;amp;artid=388"&gt;http://linuxportal.pp.ru/modules.php?na&lt;wbr&gt;me=Sections&amp;op=viewarticle&amp;amp;artid=388&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Some tools here:&lt;br /&gt;&lt;a href="http://sabernet.home.comcast.net/"&gt;http://sabernet.home.comcast.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Configuring SQUID GUARD:&lt;br /&gt;&lt;a href="http://www.aerospacesoftware.com/squidguard-howto.html"&gt;http://www.aerospacesoftware.com/squidg&lt;wbr&gt;uard-howto.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Blocking SPAM in qmail:&lt;br /&gt;&lt;a href="http://www.linuxquestions.org/questions/history/188474"&gt;http://www.linuxquestions.org/quest&lt;wbr&gt;ions/history/188474&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-1483756064790529730?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/1483756064790529730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2004/11/more-additions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/1483756064790529730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/1483756064790529730'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2004/11/more-additions.html' title='More Additions'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-6382507815922757531</id><published>2004-11-04T20:03:00.000+05:30</published><updated>2006-08-17T21:26:02.660+05:30</updated><title type='text'>Some new entries for Linux</title><content type='html'>This has a A-Z list of all available softwares for linux:&lt;br /&gt;&lt;a href="http://stommel.tamu.edu/%7Ebaum/linuxlist/linuxlist/linuxlist.html"&gt;http://stommel.tamu.edu/~baum/linux&lt;wbr&gt;list/linuxlist/linuxlist.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Some Advice for participating in user groups, or mail lists.&lt;br /&gt;&lt;a href="http://catb.org/%7Eesr/faqs/smart-questions.html"&gt;http://catb.org/~esr/faqs/smart-questio&lt;wbr&gt;ns.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;How did windows became so insecure Read:&lt;br /&gt;&lt;a href="http://www.kernelthread.com/publications/security/uw.html"&gt;http://www.kernelthread.com/publication&lt;wbr&gt;s/security/uw.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Designing some Simple Front Ends with Dialog/Xdialog:&lt;br /&gt;&lt;a href="http://linuxgazette.net/101/sunil.html"&gt;http://linuxgazette.net/101/sunil.html&lt;/a&gt; &lt;p&gt;&lt;wbr&gt;&lt;br /&gt;&lt;br /&gt;Using SMTP AUTH and STARTTLS with sendmail&lt;br /&gt;&lt;a href="http://www.joreybump.com/code/howto/smtpauth.html"&gt;http://www.joreybump.com/code/howto/smt&lt;wbr&gt;pauth.html&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-6382507815922757531?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/6382507815922757531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2004/11/some-new-entries-for-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/6382507815922757531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/6382507815922757531'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2004/11/some-new-entries-for-linux.html' title='Some new entries for Linux'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-4000304925549896365</id><published>2004-11-02T06:22:00.000+05:30</published><updated>2006-08-17T21:23:25.205+05:30</updated><title type='text'>Linux Vs Windows</title><content type='html'>Here are some links comparing Linux vs Windows:&lt;br /&gt;1. &lt;a href="http://www.theregister.co.uk/security/security_report_windows_vs_linux/"&gt;http://www.theregister.co.uk/security/s&lt;wbr&gt;ecurity_report_windows_vs_linux/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. &lt;a href="http://www.securitypipeline.com/showArticle.jhtml?articleId=50500004"&gt;http://www.securitypipeline.com/showArt&lt;wbr&gt;icle.jhtml?articleId=50500004&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How did windows became so insecure read:&lt;br /&gt;&lt;a href="http://www.kernelthread.com/publications/security/uw.html"&gt;http://www.kernelthread.com/publication&lt;wbr&gt;s/security/uw.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is from novell abt the argument that windows is secured than Linux&lt;br /&gt;&lt;a href="http://www.novell.com/linux/truth/"&gt;http://www.novell.com/linux/truth/&lt;/a&gt; &lt;p&gt;&lt;wbr&gt;&lt;br /&gt;&lt;br /&gt;"Why I hate Microsoft" intsresting link:&lt;br /&gt;&lt;a href="http://www.euronet.nl/users/frankvw/rants/microsoft/IhateMS.html"&gt;http://www.euronet.nl/users/frankvw/ran&lt;wbr&gt;ts/microsoft/IhateMS.html&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-4000304925549896365?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/4000304925549896365/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2004/11/linux-vs-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/4000304925549896365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/4000304925549896365'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2004/11/linux-vs-windows.html' title='Linux Vs Windows'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6453804165116474533.post-3206447138426164319</id><published>2004-10-27T04:27:00.000+05:30</published><updated>2006-08-17T21:20:51.630+05:30</updated><title type='text'>Some nice links for linux</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;Here are few links that i read:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style="font-family: arial;" href="http://linux-ip.net/html/nat-stateless.html"&gt;http://linux-ip.net/html/nat-statel&lt;wbr&gt;ess.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style="font-family: arial;" href="http://linuxreviews.org/dictionary/NAT/#Masquerading"&gt;http://linuxreviews.org/dictionary/NAT/&lt;wbr&gt;#Masquerading&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Now with iptables NAT i use iproute for routing. Its easy to configure.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;This helped me a lot:&lt;/span&gt;&lt;br /&gt;&lt;a style="font-family: arial;" href="http://linux-ip.net/html/adv-multi-internet.html"&gt;http://linux-ip.net/html/adv-multi-inte&lt;wbr&gt;rnet.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Here you can learn some more(for best understand before doing):&lt;/span&gt;&lt;br /&gt;&lt;a style="font-family: arial;" href="http://lartc.org/howto/lartc.rpdb.multiple-links.html"&gt;http://lartc.org/howto/lartc.rpdb.multi&lt;wbr&gt;ple-links.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;I have done this too(but may not help you though just for reading:&lt;/span&gt;&lt;br /&gt;&lt;a style="font-family: arial;" href="http://www.ssi.bg/%7Eja/nano.txt"&gt;http://www.ssi.bg/~ja/nano.txt&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Don't miss to read the links inside the above links.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;This one has a lot of help about security. Once surf  &lt;/span&gt;&lt;span style="font-family:arial;"&gt;this, you will go mad(like me) worrying about security(once done everything you will feel like heaven):&lt;/span&gt;&lt;br /&gt;&lt;a style="font-family: arial;" href="http://www.linuxquestions.org/questions/showthread.php?threadid=45261"&gt;http://www.linuxquestions.org/quest&lt;wbr&gt;ions/showthread.php?threadid=45261&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;I will add more as &amp;amp; when i find them&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;HTH some one&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;---
SK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6453804165116474533-3206447138426164319?l=techsk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsk.blogspot.com/feeds/3206447138426164319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsk.blogspot.com/2004/10/some-nice-links-for-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/3206447138426164319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6453804165116474533/posts/default/3206447138426164319'/><link rel='alternate' type='text/html' href='http://techsk.blogspot.com/2004/10/some-nice-links-for-linux.html' title='Some nice links for linux'/><author><name>SK's Tech Blog</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
