<?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>RedHatVN Network &#187; Directadmin</title>
	<atom:link href="http://redhatvn.net/category/linux/directadmin/feed" rel="self" type="application/rss+xml" />
	<link>http://redhatvn.net</link>
	<description>Shared Linux problems</description>
	<lastBuildDate>Tue, 07 Sep 2010 08:08:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Use wget with Squid Proxy Server</title>
		<link>http://redhatvn.net/use-wget-with-squid-proxy-server</link>
		<comments>http://redhatvn.net/use-wget-with-squid-proxy-server#comments</comments>
		<pubDate>Tue, 07 Sep 2010 04:07:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Directadmin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[proxy]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=1271</guid>
		<description><![CDATA[How do I make wget work with Squid under UNIX or Linux operating systems? You need to define the shell variables as follows: HTTP_PROXY={YOUR-PROXY-Server-IP-HERE}:{YOUR-PROXY-SERVER-Port-Here} FTP_PROXY={YOUR-PROXY-Server-IP-HERE}:{YOUR-PROXY-SERVER-Port-Here} You can put above two directives in a file called ~/.wgetrc: echo 'HTTP_PROXY=192.168.1.254:3128'&#62;&#62; ~/.wgetrc echo 'FTP_PROXY=192.168.1.254:3128'&#62;&#62; ~/.wgetrc Now you can use wget: $ wget http://example.com/file.tar.gz You can also define shell [...]]]></description>
			<content:encoded><![CDATA[<p>How do I make wget work with Squid under UNIX or Linux operating systems?</p>
<p>You need to define the shell variables as follows:</p>
<blockquote><p>HTTP_PROXY={YOUR-PROXY-Server-IP-HERE}:{YOUR-PROXY-SERVER-Port-Here}<br />
FTP_PROXY={YOUR-PROXY-Server-IP-HERE}:{YOUR-PROXY-SERVER-Port-Here}
</p></blockquote>
<p><span id="more-1271"></span><br />
You can put above two directives in a file called ~/.wgetrc:</p>
<p><code>echo 'HTTP_PROXY=192.168.1.254:3128'&gt;&gt; ~/.wgetrc<br />
echo 'FTP_PROXY=192.168.1.254:3128'&gt;&gt; ~/.wgetrc</code></p>
<p>Now you can use wget:<br />
<code>$ wget http://example.com/file.tar.gz</code><br />
You can also define shell variables as follows:<br />
<code>export http_proxy=http://192.168.1.254:3128/</code><br />
OR you can pass the proxy username and password as follows:<br />
<code>wget --proxy-user=YOUR-USERNAME-HERE --proxy-password=YOUR-PASSWORD-HERE http://nixcraft.com/file.tar.gz</code></p>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/use-wget-with-squid-proxy-server/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Use Gmail Account To Relay Email From a Shell Prompt</title>
		<link>http://redhatvn.net/how-to-use-gmail-account-to-relay-email-from-a-shell-prompt-2</link>
		<comments>http://redhatvn.net/how-to-use-gmail-account-to-relay-email-from-a-shell-prompt-2#comments</comments>
		<pubDate>Tue, 07 Sep 2010 07:26:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Directadmin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[mail server]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=1298</guid>
		<description><![CDATA[Usually, you do not need to setup an email server under Linux desktop operating system. Most GUI email clients (such as Thunderbird) supports Gmail POP3 and IMAP configurations. But, how do you send mail via the standard or /usr/bin/mail user agents or a shell script? Programs such as sendmail / postfix / exim can be [...]]]></description>
			<content:encoded><![CDATA[<p>Usually, you do not need to setup an  email server under Linux desktop operating system. Most GUI email  clients (such as Thunderbird) supports Gmail POP3 and IMAP  configurations. But, how do you send mail via the standard or  /usr/bin/mail user agents or a shell script? Programs such as sendmail /  postfix / exim can be configured as a gmail smarthost but they are  largely overkill for this use.</p>
<p>You can use gmail as a smart host to send all messages from your Linux /  UNIX desktop systems.  You need to use a simple program called ssmtp.  It accepts a mail stream on standard input with recipients specified on  the command line and synchronously forwards the message to the mail   transfer agent of a mailhub for the mailhub MTA to process. Failed  messages are placed in dead.letter in the sender&#8217;s home directory.<br />
<span id="more-1298"></span></p>
<h2>Install ssmtp</h2>
<p>Type the following command under CentOS / RHEL / Red Hat / Fedora Linux:<br />
<code># yum install ssmtp</code><br />
Type the following command under Debian / Ubuntu Linux:<br />
<code># apt-get update &amp;&amp; apt-get install ssmtp</code></p>
<h3>Configure gmail as a smarthost</h3>
<p>Open /etc/ssmtp/ssmtp.conf, enter:<br />
<code># vi /etc/ssmtp/ssmtp.conf</code><br />
Update file with the following settings:</p>
<blockquote><p>
AuthUser=vivek@gmail.com<br />
AuthPass=Your-Gmail-Password<br />
FromLineOverride=YES<br />
mailhub=smtp.gmail.com:587<br />
UseSTARTTLS=YES
</p></blockquote>
<p>Also, make sure you disable Sendmail:<br />
<code># service sendmail stop<br />
# chkconfig sendmail off<br />
# mkdir /root/.bakup<br />
# mv /usr/sbin/sendmail /root/.bakup<br />
#  ln -s /usr/sbin/ssmtp /usr/sbin/sendmail</code><br />
Now, you can use mail / mailx command to send email messages. You can  also write a shell script to backup your files and email to somewhere  else (see below). You can test settings using following syntax:<br />
<code>$ echo "This is a test" | mail -s "Test" vivek@nixcraft.co.in</code></p>
<h3>A note about sSMTP</h3>
<p>sSMTP works well for desktop systems, but it is not a replacement for  Sendmail / Postfix / Exim  / Qmail for email server environment. This  software is perfect for a single user system.</p>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/how-to-use-gmail-account-to-relay-email-from-a-shell-prompt-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sending Mail Through Gmail with Perl</title>
		<link>http://redhatvn.net/sending-mail-through-gmail-with-perl</link>
		<comments>http://redhatvn.net/sending-mail-through-gmail-with-perl#comments</comments>
		<pubDate>Tue, 07 Sep 2010 07:35:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Directadmin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[mail server]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=1301</guid>
		<description><![CDATA[We talked about some of the benefits of setting up an email server in Linux and how you can use python to send email. Now we are going to look at how you can send email from Perl. The Code use Net::SMTP::TLS; my $mailer = new Net::SMTP::TLS( &#8216;smtp.gmail.com&#8217;, Hello => &#8216;smtp.gmail.com&#8217;, Port => 587, User [...]]]></description>
			<content:encoded><![CDATA[<p>We talked about some of the benefits of setting up an email server in Linux and how you can use python to send email. Now we are going to look at how you can send email from Perl.<br />
The Code</p>
<blockquote><p>
use Net::SMTP::TLS;<br />
my $mailer = new Net::SMTP::TLS(<br />
&#8216;smtp.gmail.com&#8217;,<br />
Hello   =>      &#8216;smtp.gmail.com&#8217;,<br />
Port    =>      587,<br />
User    =>      &#8216;username&#8217;,<br />
Password=>      &#8216;password&#8217;);<br />
$mailer->mail(&#8216;from@domain.com&#8217;);<br />
$mailer->to(&#8216;to@domain.com&#8217;);<br />
$mailer->data;<br />
$mailer->datasend(&#8220;Sent from perl!&#8221;);<br />
$mailer->dataend;<br />
$mailer->quit;
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/sending-mail-through-gmail-with-perl/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Ketchup to manage your kernel sources</title>
		<link>http://redhatvn.net/using-ketchup-to-manage-your-kernel-sources</link>
		<comments>http://redhatvn.net/using-ketchup-to-manage-your-kernel-sources#comments</comments>
		<pubDate>Tue, 07 Sep 2010 07:44:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Directadmin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=1307</guid>
		<description><![CDATA[Today I discovered Ketchup, a little command-line tool to manage your Linux kernel sources. If you&#8217;re one of the weirdos, who is still compiling his kernel manually for whatever reason (like I do), I can only recommend it. Ketchup nicely eases up the entire process of checking for updates and applying them to your system. [...]]]></description>
			<content:encoded><![CDATA[<p>Today I discovered Ketchup, a little command-line tool to manage your  Linux kernel sources. If you&#8217;re one of the weirdos, who is still  compiling his kernel manually for whatever reason (like I do), I can  only recommend it. Ketchup nicely eases up the entire process of  checking for updates and applying them to your system.</p>
<p>Let&#8217;s not hesitate and look at few usage examples&#8230; Want to know what&#8217;s the latest version of a particular kernel-tree?<br />
<span id="more-1307"></span><br />
<code>$ ketchup -s 2.6</code></p>
<blockquote><p>2.6.17.7</p></blockquote>
<p><code>$ ketchup -s 2.6-mm</code></p>
<blockquote><p>2.6.18-rc1-mm2</p></blockquote>
<p>Let&#8217;s play with your kernel sources a bit. First of all, you surely want to check what version you currently got lying around&#8230;</p>
<p><code>$ cd /usr/src/linux</code></p>
<p><code>$ ketchup -m</code></p>
<blockquote><p>2.6.17.6</p></blockquote>
<p>Let&#8217;s assume there is a newer kernel version available and you want  to download it, bunzip it, revert the old patch and apply the new one.  Nothing easier than that:</p>
<p><code># cd /usr/src/linux</code></p>
<p><code># ketchup 2.6-tip</code></p>
<blockquote><p>2.6.17.6 -&gt; 2.6.17.7</p></blockquote>
<p>Applying patch-2.6.17.6.bz2 -R</p>
<p>Applying patch-2.6.17.7.bz2</p>
<p>That&#8217;s really it. It will download the patches, revert and apply them, so all you will have to do is watch and wait</p>
<p>Switching to an entirely different kernel versions is just as easy:</p>
<p><code># cd /usr/src/linux</code></p>
<p><code># ketchup 2.6.16.2</code></p>
<p>Final note: If Ketchup should abort with a gpg error, then it  couldn&#8217;t verify the patch&#8217;s or kernel&#8217;s signature. Either add the 2.6  public key to your keyring (this is the proper solution) or call Ketchup  with an additional -G parameter (this will override signature  checking). I&#8217;d suggest the former, which is really easy to do by  downloading it from a public pgp server:</p>
<p><code># gpg --keyserver wwwkeys.pgp.net --recv-keys 0x517D0F0E</code></p>
<p>Have fun compiling,</p>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/using-ketchup-to-manage-your-kernel-sources/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[HOWTO] mod_ruid2</title>
		<link>http://redhatvn.net/howto-mod_ruid2</link>
		<comments>http://redhatvn.net/howto-mod_ruid2#comments</comments>
		<pubDate>Fri, 03 Sep 2010 08:03:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Directadmin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=1257</guid>
		<description><![CDATA[Hello everyone, Since there are alot of people asking for it, here is my HowTo about mod_ruid2 This is based on my CentOS server with Apache 2.x. Installing this module its no longer needed to chmod config files to 666 or upload/attachments directories to 777. Since with this module enabled everything @ HTTP will run [...]]]></description>
			<content:encoded><![CDATA[<p>Hello everyone,</p>
<p>Since there are alot of people asking for it, here is my HowTo about mod_ruid2<br />
This is based on my CentOS server with Apache 2.x.</p>
<p><strong>Installing this module its no longer needed to chmod config files to  666 or upload/attachments directories to 777. Since with this module  enabled everything @ HTTP will run under the user itself and not  &#8216;apache&#8217; anymore.</strong><br />
<span id="more-1257"></span><br />
** If you are using mod_ruid instead of mod_ruid2, first of all remove the mod_ruid line from &#8216;<strong>/etc/httpd/conf/httpd.conf</strong>&#8216;</p>
<p>First, we are going to install <strong>libcap-devel</strong><br />
<code>yum -y install libcap-devel</code><br />
After this is done we are going to download and install mod_ruid2<br />
<code>wget <a href="http://dave.t0xic.nl/tars/mod_ruid2-0.9.tar.bz2" target="_blank">http://dave.t0xic.nl/tars/mod_ruid2-0.9.tar.bz2</a><br />
tar xjf mod_ruid2-0.9.tar.bz2<br />
cd mod_ruid2-0.9<br />
apxs -a -i -l cap -c mod_ruid2.c</code></p>
<p>Now, if you didn&#8217;t get any errors mod_ruid2 should be installed and added to the &#8216;<strong>/etc/httpd/conf/httpd.conf</strong>&#8216;.<br />
Lets confirm mod_ruid2 is added<br />
<code>grep 'mod_ruid2' /etc/httpd/conf/httpd.conf</code><br />
If you get any response like below its installed</p>
<blockquote><p>LoadModule ruid2_module       /usr/lib/apache/mod_ruid2.so</p></blockquote>
<p>Now we need to modify the DA httpd.conf templates a little bit to enable mod_ruid2 for the users</p>
<p>Now copy the template files to custom<br />
<code>cd /usr/local/directadmin/data/templates/<br />
cp virtual_host2* custom/<br />
chown -R diradmin:diradmin custom/</code></p>
<p>Now you have copied the original templates to the &#8216;custom&#8217; directory, so they won&#8217;t be overwritten.</p>
<p>Now follow the steps below for each virtual_host2 file you&#8217;ve copied<br />
<code>nano -w virtual_host2.conf</code></p>
<blockquote><p>## replace line: <strong>SuexecUserGroup |USER| |GROUP|</strong><br />
## replace with: <strong>#SuexecUserGroup |USER| |GROUP|</strong><br />
## Add the lines below under the just replaced line<br />
RMode          config<br />
RUidGid        |USER| |GROUP|<br />
RGroups        apache</p></blockquote>
<p>Save the files and lets rewrite the HTTPd config files<br />
<code>echo "action=rewrite&amp;value=httpd" &gt;&gt; /usr/local/directadmin/data/task.queue</code></p>
<p>If you want you can start the rewrite of the HTTPd config files manually, just paste the line below and wait when its done<br />
<code>/usr/local/directadmin/dataskq d800</code><br />
After the rewrite is complete you can restart HTTPd with the command below<br />
<code>/etc/init.d/httpd restart</code><br />
Now mod_ruid2 should be installed and you don&#8217;t need to chmod anymore like &#8216;chmod 666 config.php&#8217; or &#8216;chmod 777 uploads&#8217;.</p>
<p>To be sure the webmail clients etc still works we need to change the owner permissions<br />
<code>chown -R webapps:webapps /var/www/html</code></p>
<p>** Questions with Answers **<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<strong>Q:</strong> How can I test this is working?<br />
<strong>A:</strong> Easy, install some CMS that you are used before. Like  WordPress, Joomla that required (before!!) chmod 666 or 777 to get  install/working.</p>
<p><strong>Q:</strong> I&#8217;ve dirs/files owned by apache for some users, must I change this?<br />
<strong>A:</strong> Yes, you need to give the dirs/files owner of the user itself, not apache anymore. Check below<br />
<span style="text-decoration: underline;">Thanks for snk for the commands below, to fix the owner permissions of the dirs/files</span></p>
<p><code>cd /usr/local/directadmin/scripts &amp;&amp; ./set_permissions.sh user_homes<br />
find /home/*/domains/*/public_html -type d -print0 | xargs -0 chmod 711<br />
find /home/*/domains/*/public_html -type f -print0 | xargs -0 chmod 644<br />
cd /usr/local/directadmin/data/users &amp;&amp; for i in `ls`; do { chown -R $i:$i /home/$i/domains/*/public_html;}; done;</code></p>
<p><em>* Added &#8216;&amp;&amp;&#8217; so if they do a typo, it won&#8217;t change anything.</em></p>
<p>You are missing a question, or you have a question, please let me know and I&#8217;ll try to answer them for you!</p>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/howto-mod_ruid2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->