<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>MinhTech.com &#187; Featured Linux</title> <atom:link href="http://minhtech.com/category/featuredlinux/feed/" rel="self" type="application/rss+xml" /><link>http://minhtech.com</link> <description>Yet another technology tutorial blog.</description> <lastBuildDate>Fri, 16 Dec 2011 13:45:47 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>CentOS Install Sun Java SE JRE</title><link>http://minhtech.com/featuredlinux/centos-install-sun-java-se-jre/</link> <comments>http://minhtech.com/featuredlinux/centos-install-sun-java-se-jre/#comments</comments> <pubDate>Wed, 09 Sep 2009 19:48:20 +0000</pubDate> <dc:creator>Minh</dc:creator> <category><![CDATA[Featured Linux]]></category> <category><![CDATA[Linux]]></category> <guid
isPermaLink="false">http://minhtech.com/?p=600</guid> <description><![CDATA[Here is how to install the Sun Java SE Runtime Environment (JRE) on CentOS 5.3.]]></description> <content:encoded><![CDATA[<p>Here is how to install the Sun Java SE Runtime Environment (JRE) on CentOS 5.3.</p><h3>First, Execute the Binary:</h3><p
class="code">> <span
class="input">mv jre-6u16-linux-x64.bin <span
class="codered">/usr/lib/java</span></span><br
/> > <span
class="input">cd <span
class="codered">/usr/lib/java</span></span><br
/> > <span
class="input">chmod 744 jre-6u16-linux-x64.bin</span><br
/> > <span
class="input">./jre-6u16-linux-x64.bin</span></p><p>Download the 32-bit or 64-bit non-RPM binary from Sun&#8217;s site <a
href="http://www.java.com/en/download/manual.jsp?locale=en&#038;host=www.java.com:80">here</a> and execute it.</p><h3>Next, Set Sun&#8217;s Java as Default:</h3><p
class="code">> <span
class="input">update-alternatives &#45;&#45;install &#34;/usr/bin/java&#34; &#34;java&#34; &#34;<span
class="codered">/usr/lib/java</span>/jre1.6.0_16/bin/java&#34; 1</span><br
/> > <span
class="input">update-alternatives &#45;&#45;set java <span
class="codered">/usr/lib/java</span>/jre1.6.0_16/bin/java</span></p><p>We configure the system to use Sun&#8217;s Java binaries to execute &#8220;java&#8221; commands by telling it there is an alternate installation and to use it by default.</p><h3>Finally, Check the Default Version:</h3><p
class="code">> <span
class="input">java -version</span><br
/> java version &#8220;1.6.0_16&#8243;<br
/> Java(TM) SE Runtime Environment (build 1.6.0_16-b01)<br
/> Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)</p> ]]></content:encoded> <wfw:commentRss>http://minhtech.com/featuredlinux/centos-install-sun-java-se-jre/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>CentOS Install &amp; Configure Mailman</title><link>http://minhtech.com/featuredlinux/install-and-configure-mailman/</link> <comments>http://minhtech.com/featuredlinux/install-and-configure-mailman/#comments</comments> <pubDate>Sun, 11 Jan 2009 02:09:02 +0000</pubDate> <dc:creator>Minh</dc:creator> <category><![CDATA[Featured Linux]]></category> <category><![CDATA[Linux]]></category> <guid
isPermaLink="false">http://minhtech.com/?p=61</guid> <description><![CDATA[Here is how to install the mailman mailing list on CentOS 5.2.]]></description> <content:encoded><![CDATA[<p>Here is how to install the mailman mailing list on CentOS 5.2.</p><h3>First, install Mailman via yum:</h3><p
class="code">> <span
class="input">yum install mailman</span></p><h3>Next, edit its Apache configuration file:</h3><p
class="code">> <span
class="input">cd /etc/httpd/conf.d</span><br
/> > <span
class="input">vi mailman.conf</span><br
/> RedirectMatch ^/mailman[/]*$ http://domain.com/mailman/listinfo</p><p>Uncomment the redirect parameter and enter the correct domain name.</p><h3>Set the site master password:</h3><p
class="code">> <span
class="input">/usr/lib/mailman/bin/mmsitepass <span
class="codered">password</span></span></p><p>This password can be used to access any list or any page.</p><h3>Edit the Mailman configuration file:</h3><p
class="code">> <span
class="input">vi /usr/lib/mailman/Mailman/mm_cfg.py</span><br
/> DEFAULT_URL_HOST   = &#8216;domain.com&#8217;<br
/> DEFAULT_EMAIL_HOST = &#8216;domain.com&#8217;</p><p>The URL host parameter usually matches the domain name from the above Apache configuration file. The email host should match the origin of the mail (i.e. the part after the @ of the email address, whether it is host.domain.com or domain.com).</p><h3>Check for updates:</h3><p
class="code">> <span
class="input">cd /usr/lib/mailman</span><br
/> > <span
class="input">bin/update</span><br
/> No updates are necessary.<br/></p><h3>Create the mailman site list and set up the aliases:</h3><p
class="code">> <span
class="input">cd /usr/lib/mailman</span><br
/> > <span
class="input">bin/newlist mailman</span><br/><br
/> Enter the email of the person running the list: <span
class="codered">minh@minhtech.com</span><br
/> Initial mailman password: <span
class="codered">password</span><br
/> To finish creating your mailing list, you must edit your /etc/aliases (or<br
/> equivalent) file by adding the following lines, and possibly running the<br
/> `newaliases&#8217; program:<br/><br
/> ## mailman mailing list<br
/> mailman:              &#8220;|/usr/lib/mailman/mail/mailman post mailman&#8221;<br
/> mailman-admin:        &#8220;|/usr/lib/mailman/mail/mailman admin mailman&#8221;<br
/> mailman-bounces:      &#8220;|/usr/lib/mailman/mail/mailman bounces mailman&#8221;<br
/> mailman-confirm:      &#8220;|/usr/lib/mailman/mail/mailman confirm mailman&#8221;<br
/> mailman-join:         &#8220;|/usr/lib/mailman/mail/mailman join mailman&#8221;<br
/> mailman-leave:        &#8220;|/usr/lib/mailman/mail/mailman leave mailman&#8221;<br
/> mailman-owner:        &#8220;|/usr/lib/mailman/mail/mailman owner mailman&#8221;<br
/> mailman-request:      &#8220;|/usr/lib/mailman/mail/mailman request mailman&#8221;<br
/> mailman-subscribe:    &#8220;|/usr/lib/mailman/mail/mailman subscribe mailman&#8221;<br
/> mailman-unsubscribe:  &#8220;|/usr/lib/mailman/mail/mailman unsubscribe mailman&#8221;<br/><br
/> Hit enter to notify mailman owner&#8230;<br/><br
/> > <span
class="input">vi /etc/aliases</span><br
/> ## mailman mailing list<br
/> mailman:              &#8220;|/usr/lib/mailman/mail/mailman post mailman&#8221;<br
/> mailman-admin:        &#8220;|/usr/lib/mailman/mail/mailman admin mailman&#8221;<br
/> mailman-bounces:      &#8220;|/usr/lib/mailman/mail/mailman bounces mailman&#8221;<br
/> mailman-confirm:      &#8220;|/usr/lib/mailman/mail/mailman confirm mailman&#8221;<br
/> mailman-join:         &#8220;|/usr/lib/mailman/mail/mailman join mailman&#8221;<br
/> mailman-leave:        &#8220;|/usr/lib/mailman/mail/mailman leave mailman&#8221;<br
/> mailman-owner:        &#8220;|/usr/lib/mailman/mail/mailman owner mailman&#8221;<br
/> mailman-request:      &#8220;|/usr/lib/mailman/mail/mailman request mailman&#8221;<br
/> mailman-subscribe:    &#8220;|/usr/lib/mailman/mail/mailman subscribe mailman&#8221;<br
/> mailman-unsubscribe:  &#8220;|/usr/lib/mailman/mail/mailman unsubscribe mailman&#8221;<br/><br
/> > <span
class="input">newaliases</span></p><p>After creating the list, add the listed aliases to the bottom of the aliases file, and then run newaliases.</p><h3>Finally, restart Apache and start mailman:</h3><p
class="code">> <span
class="input">/etc/init.d/httpd restart</span><br
/> Stopping httpd: [  OK  ]<br
/> Starting httpd: [  OK  ]<br/><br
/> > <span
class="input">/etc/init.d/mailman start</span><br
/> Starting mailman: [  OK  ]<br/><br
/> > <span
class="input">chkconfig &#8211;level 2345 mailman on</span></p><p>The documentation is located at /usr/share/doc/mailman-2.1.9/.</p> ]]></content:encoded> <wfw:commentRss>http://minhtech.com/featuredlinux/install-and-configure-mailman/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>CentOS Install &amp; Configure Postfix/Dovecot</title><link>http://minhtech.com/featuredlinux/install-and-configure-postfixdovecot/</link> <comments>http://minhtech.com/featuredlinux/install-and-configure-postfixdovecot/#comments</comments> <pubDate>Sun, 04 Jan 2009 01:41:23 +0000</pubDate> <dc:creator>Minh</dc:creator> <category><![CDATA[Featured Linux]]></category> <category><![CDATA[Linux]]></category> <guid
isPermaLink="false">http://minhtech.com/?p=44</guid> <description><![CDATA[Here is how to install a mail server on CentOS 5.2.]]></description> <content:encoded><![CDATA[<p>Here is how to install a mail server on CentOS 5.2.</p><h3>First, make sure sendmail is uninstalled:</h3><p
class="code">> <span
class="input">yum remove sendmail</span></p><p>We want to use Postfix as our mail transfer agent (MTA) because it is simpler to configure.</p><h3>Install Postfix:</h3><p
class="code">> <span
class="input">yum install postfix</span></p><h3>Edit the Posttfix configuration files:</h3><p
class="code">> <span
class="input">vi /etc/postfix/main.cf</span><br
/> myhostname = <span
class="codered">host.domain.com</span><br
/> mydomain = <span
class="codered">domain.com</span><br
/> myorigin = $mydomain<br
/> inet_interfaces = all<br
/> mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain<br
/> relay_domains = $mydestination</p><p>Make sure the myhostname and mydomain parameters are set correctly. Check the /etc/hosts and /etc/sysconfig/network files and use the &#8220;<span
class="command">hostname</span>&#8221; command to make sure network configurations are correct.</p><h3>Start Postfix:</h3><p
class="code">> <span
class="input">/etc/init.d/postfix start</span><br
/> Starting postfix: [  OK  ]</p><h3>Test Postfix:</h3><p
class="code">> <span
class="input">telnet localhost smtp</span><br
/> Trying 127.0.0.1&#8230;<br
/> Connected to localhost.localdomain (127.0.0.1).<br
/> Escape character is &#8216;^]&#8217;.<br
/> 220 host.domain.com ESMTP Postfix<br
/> > <span
class="input">ehlo host</span><br
/> 250-host.domain.com<br
/> 250-PIPELINING<br
/> 250-SIZE 10240000<br
/> 250-VRFY<br
/> 250-ETRN<br
/> 250-ENHANCEDSTATUSCODES<br
/> 250-8BITMIME<br
/> 250 DSN<br
/> > <span
class="input">mail from: <span
class="codered">mnguyen</span></span><br
/> 250 2.1.0 Ok<br
/> > <span
class="input">rcpt to: <span
class="codered">mnguyen</span></span><br
/> 250 2.1.5 Ok<br
/> > <span
class="input">data</span><br
/> 354 End data with &#60;CR&#62;&#60;LF&#62;.&#60;CR>&#60;LF&#62;<br
/> > <span
class="input">test</span><br
/> > <span
class="input">.</span><br
/> 250 2.0.0 Ok: queued as 1869B10145<br
/> > <span
class="input">quit</span><br
/> 221 2.0.0 Bye<br
/> Connection closed by foreign host.</p><p>Log into the server via telnet, check for an extended hello response, send a test message, and quit.</p><h3>Install Dovecot:</h3><p
class="code">> <span
class="input">yum install dovecot</span></p><p>We can send or check for messages locally if a client like mailx is installed. However, we will install a POP3 server so we can send or check for messages remotely from a client such as Outlook, Lotus Notes, or Thunderbird.</p><h3>Configure Dovecot:</h3><p
class="code">> <span
class="input">vi /etc/dovecot.conf</span><br
/> protocols = pop3 pop3s imap imaps<br
/> mail_location = mbox:~/mail:INBOX=/var/mail/%u<br
/> pop3_uidl_format = %08Xu%08Xv<br
/> imap_client_workarounds = delay-newmail outlook-idle netscape-eoh<br
/> pop3_client_workarounds = outlook-no-nuls oe-ns-eoh</p><p>We need to enable the POP3 protocol because it is not enabled by default. We will use the mbox mailbox format. We will also enable the built-in client workarounds.</p><h3>Start Dovecot:</h3><p
class="code">> <span
class="input">/etc/init.d/dovecot start</span><br
/> Starting Dovecot Imap: [  OK  ]</p><h3>Test Dovecot:</h3><p
class="code">> <span
class="input">telnet localhost pop3</span><br
/> Trying 127.0.0.1&#8230;<br
/> Connected to localhost.localdomain (127.0.0.1).<br
/> Escape character is &#8216;^]&#8217;.<br
/> +OK Dovecot ready.<br
/> > <span
class="input">user <span
class="codered">mnguyen</span></span><br
/> +OK<br
/> > <span
class="input">pass <span
class="codered">password</span></span><br
/> +OK Logged in.<br
/> > <span
class="input">list</span><br
/> +OK 1 messages:<br
/> 1 488<br
/> .<br
/> > <span
class="input">retr 1</span><br
/> +OK 488 octets<br
/> Return-Path: &#60;mnguyen@host.domain.com&#62;<br
/> X-Original-To: mnguyen<br
/> Delivered-To: mnguyen@host.domain.com<br
/> Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])<br
/> by host.domain.com (Postfix) with SMTP id 1869B10145<br
/> for &#60;mnguyen&#62;; Thu,  9 Oct 2008 14:12:03 -0400 (EDT)<br
/> Message-Id: &#60;20081009181211.1869B10145@host.domain.com&#62;<br
/> Date: Thu,  9 Oct 2008 14:12:03 -0400 (EDT)<br
/> From: mnguyen@host.domain.com<br
/> To: undisclosed-recipients:;<br/><br
/> test<br
/> .<br
/> > <span
class="input">quit</span><br
/> +OK Logging out.<br
/> Connection closed by foreign host.</p><p>Log into the POP3 server via telnet and retrieve the message sent earlier.</p><h3>Configure SASL for SMTP Authentication:</h3><p
class="code">> <span
class="input">vi /etc/dovecot.conf</span><br
/> auth default<br
/> {<br
/> &#160;&#160;&#160;mechanisms = plain login<br/><br
/> &#160;&#160;&#160;passdb pam<br
/> &#160;&#160;&#160;{<br
/> &#160;&#160;&#160;}<br/><br
/> &#160;&#160;&#160;userdb passwd<br
/> &#160;&#160;&#160;{<br
/> &#160;&#160;&#160;}<br/><br
/> &#160;&#160;&#160;socket listen<br
/> &#160;&#160;&#160;{<br
/> &#160;&#160;&#160;&#160;&#160;&#160;client<br
/> &#160;&#160;&#160;&#160;&#160;&#160;{<br
/> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;path = /var/spool/postfix/private/auth<br
/> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;mode = 0660<br
/> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;user = postfix<br
/> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;group = postfix<br
/> &#160;&#160;&#160;&#160;&#160;&#160;}<br
/> &#160;&#160;&#160;}<br
/> }<br/><br
/> > <span
class="input">vi /etc/postfix/main.cf</span><br
/> mynetworks = 127.0.0.0/8<br/><br
/> smtpd_sasl_type = dovecot<br
/> smtpd_sasl_path = private/auth<br
/> smtpd_sasl_auth_enable = yes<br
/> smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination<br
/> broken_sasl_auth_clients = yes</p><p>We want to configure SMTP authentication to allow only our users to relay mail. Unauthorized users (e.g. spammers) are denied relay. Edit both the Dovecot and Postfix configuration files. Put the SASL lines at the bottom of the Postfix configuration file.</p><h3>Start SASL and restart Postfix and Dovecot:</h3><p
class="code">> <span
class="input">/etc/init.d/postfix restart</span><br
/> Shutting down postfix: [  OK  ]<br
/> Starting postfix: [  OK  ]<br/><br
/> > <span
class="input">/etc/init.d/dovecot restart</span><br
/> Stopping Dovecot Imap: [  OK  ]<br
/> Starting Dovecot Imap: [  OK  ]<br/><br
/> > <span
class="input">/etc/init.d/saslauthd start</span><br
/> Starting saslauthd: [  OK  ]<br/><br
/> > <span
class="input">chkconfig &#8211;level 2345 postfix on</span><br/><br
/> > <span
class="input">chkconfig &#8211;level 2345 dovecot on</span><br/><br
/> > <span
class="input">chkconfig &#8211;level 2345 saslauthd on</span></p><h3>Test the SASL implementation:</h3><p
class="code">> <span
class="input">telnet host.domain.com smtp</span><br
/> Trying 123.123.123.123&#8230;<br
/> Connected to host.domain.com.<br
/> Escape character is &#8216;^]&#8217;.<br
/> 220 host.domain.com ESMTP Postfix<br
/> > <span
class="input">ehlo host</span><br
/> 250-host.domain.com<br
/> 250-PIPELINING<br
/> 250-SIZE 10240000<br
/> 250-VRFY<br
/> 250-ETRN<br
/> 250-AUTH PLAIN LOGIN<br
/> 250-AUTH=PLAIN LOGIN<br
/> 250-ENHANCEDSTATUSCODES<br
/> 250-8BITMIME<br
/> 250 DSN<br
/> > <span
class="input">mail from: mnguyen</span><br
/> 250 2.1.0 Ok<br
/> > <span
class="input">rcpt to: minh@minhtech.com</span><br
/> 554 5.7.1 &#60;minh@minhtech.com&#62;: Relay access denied<br
/> > <span
class="input">quit</span><br
/> 221 2.0.0 Bye<br
/> Connection closed by foreign host.</p><p>We are expecting relay access to be denied.</p> ]]></content:encoded> <wfw:commentRss>http://minhtech.com/featuredlinux/install-and-configure-postfixdovecot/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>CentOS Install &amp; Configure Apache</title><link>http://minhtech.com/featuredlinux/install-and-configure-apache/</link> <comments>http://minhtech.com/featuredlinux/install-and-configure-apache/#comments</comments> <pubDate>Sun, 28 Dec 2008 00:29:53 +0000</pubDate> <dc:creator>Minh</dc:creator> <category><![CDATA[Featured Linux]]></category> <category><![CDATA[Linux]]></category> <guid
isPermaLink="false">http://minhtech.com/?p=20</guid> <description><![CDATA[Here is how to install and tune Apache on CentOS 5.2.]]></description> <content:encoded><![CDATA[<p>Here is how to install and tune the Apache HTTP server on CentOS 5.2.</p><h3>First, install Apache via yum:</h3><p
class="code">&gt; <span
class="input">yum install httpd</span></p><h3>Next, we will modify the configuration file. Edit the timeout parameter:</h3><p
class="code">&gt; <span
class="input">vi /etc/httpd/conf/httpd.conf</span><br
/> Timeout 60</p><p>We will be limiting the number of processes to conserve memory so we do not want them held up for too long.</p><h3>Edit the keep alive parameters:</h3><p
class="code">KeepAlive On<br
/> MaxKeepAliveRequests 100<br
/> KeepAliveTimeout 2</p><p>We want to allow a browser to keep alive its connection with the server and use the same connection to request multiple files and maximize bandwidth. Fewer connections means less overhead. We have instructed Apache to close connections after 2 seconds of inactivity. The default 15 seconds is too long. We want to give the browser plenty of time to submit requests but close the connection as soon as possible.</p><h3>Edit the prefork multi-processing module (MPM):</h3><p
class="code">&lt;IfModule prefork.c&gt;<br
/> &#160;&#160;&#160;StartServers 4<br
/> &#160;&#160;&#160;MinSpareServers 4<br
/> &#160;&#160;&#160;MaxSpareServers 6<br
/> &#160;&#160;&#160;ServerLimit 16<br
/> &#160;&#160;&#160;MaxClients 16<br
/> &#160;&#160;&#160;MaxRequestsPerChild 4000<br
/> &lt;/IfModule&gt;</p><p>So we are instructing Apache to start 4 server processes and keep up at least 4 spare processes ready to go at all times. It may scale up to 16 active processes with a maximum of 6 spare processes at any given moment. Tune these numbers by considering physical memory available to Apache. &#8220;<span
class="command">ps -ylC httpd &#8211;sort:rss</span>&#8221; shows the physical memory usage for each process. Spawning too many processes will cause swap and slow the machine down to a crawl.</p><p>We are also instructing Apache to recycle processes by having each one handle 4,000 requests before it is killed. Spawning a new process requires a lot of overhead. On the other hand, we do not want to keep a process alive forever since each request may allocate more and more memory that will not be released (i.e. memory leak).</p><h3>Turn off hostname resolution:</h3><p
class="code">HostnameLookups Off</p><h3>Enable compression:</h3><p
class="code">AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript<br/><br
/> BrowserMatch ^Mozilla/4 gzip-only-text/html<br
/> BrowserMatch ^Mozilla/4\.0[678] no-gzip<br
/> BrowserMatch \bMSIE !no-gzip !gzip-only-text/html<br/><br
/> Header append Vary User-Agent env=!dont-vary</p><p>We are instructing Apache to compress files of several MIME types to speed up transmission and conserve bandwidth. Some older browsers partially support or do not support gzip compression so we limit or disable compression when they interface the server.</p><h3>Finally, start Apache:</h3><p
class="code">&gt; <span
class="input">/etc/init.d/httpd start</span><br
/> Starting httpd: [  OK  ]<br/><br
/> &gt; <span
class="input">chkconfig &#8211;level 2345 httpd on</span></p> ]]></content:encoded> <wfw:commentRss>http://minhtech.com/featuredlinux/install-and-configure-apache/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
