<?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 &#124; Ho Tro Linux &#124; Support Linux &#124; Linux VN &#187; Centos</title>
	<atom:link href="http://redhatvn.net/category/linux/centos-center/feed" rel="self" type="application/rss+xml" />
	<link>http://redhatvn.net</link>
	<description>Shared Linux problems</description>
	<lastBuildDate>Fri, 03 Sep 2010 08:03:00 +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>[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>

		<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></p>
<p>** 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>
		<item>
		<title>Red Hat / CentOS IPv6 Network Configuration</title>
		<link>http://redhatvn.net/red-hat-centos-ipv6-network-configuration</link>
		<comments>http://redhatvn.net/red-hat-centos-ipv6-network-configuration#comments</comments>
		<pubDate>Thu, 26 Aug 2010 04:23:59 +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>

		<guid isPermaLink="false">http://redhatvn.net/?p=1248</guid>
		<description><![CDATA[Q. How do I configure static IPv6 networking under RHEL 5.x / Fedora / CentOS Linux? A. Red Hat / CentOS / Fedora RHEL support IPv6 out of box. All you have to do is update two files and turn on networking. You need to update and configure following files for IPv6 configuration: /etc/sysconfig/network : [...]]]></description>
			<content:encoded><![CDATA[<p>Q. How do I configure static IPv6 networking under RHEL 5.x / Fedora / CentOS Linux?<br />
A.  Red Hat / CentOS / Fedora RHEL support IPv6 out of box. All you have to do is update two files and turn on networking.<br />
<span id="more-1248"></span><br />
You need to update and configure following files for IPv6 configuration:</p>
<ol>
<li><strong>/etc/sysconfig/network</strong> : Turn on networking in this file.</li>
<li><strong>/etc/sysconfig/network-scripts/ifcfg-eth0</strong> : Set default IPv6 router IP and server IP address in this file.</li>
</ol>
<p>Open /etc/sysconfig/network file, enter:<br />
<code># vi /etc/sysconfig/network</code><br />
Append following line:</p>
<blockquote><p>NETWORKING_IPV6=yes</p></blockquote>
<p>Open /etc/sysconfig/network-scripts/ifcfg-eth0 (1st network config file)<br />
<code># vi /etc/sysconfig/network-scripts/ifcfg-eth0</code><br />
Append following config directives for IPv6:</p>
<blockquote><p>IPV6INIT=yes<br />
IPV6ADDR=&lt;IPv6-IP-Address&gt;<br />
IPV6_DEFAULTGW=&lt;IPv6-IP-Gateway-Address&gt;</p></blockquote>
<p>Here is my sample file with mix of IPv4 and IPv6 assigned to eth0:</p>
<blockquote><p>DEVICE=eth0<br />
BOOTPROTO=static<br />
ONBOOT=yes<br />
HWADDR=00:30:48:33:bc:33<br />
IPADDR=202.54.1.5<br />
GATEWAY=202.54.1.3<br />
NETMASK=255.255.255.248<br />
IPV6INIT=yes<br />
IPV6ADDR=2607:f0d0:1002:0011:0000:0000:0000:0002<br />
IPV6_DEFAULTGW=2607:f0d0:1002:0011:0000:0000:0000:0001</p></blockquote>
<p>Where,</p>
<ul>
<li><strong>NETWORKING_IPV6=yes|no</strong> &#8211;  Enable or disable global IPv6 initialization.</li>
<li><strong>IPV6INIT=yes</strong> &#8211;  Enable or disable IPv6 configuration for all interfaces.</li>
<li><strong>IPV6ADDR=2607:f0d0:1002:0011:0000:0000:0000:0002</strong> &#8211;   Specify a primary static IPv6 address here.</li>
<li><strong>IPV6_DEFAULTGW=2607:f0d0:1002:0011:0000:0000:0000:0001</strong> &#8211; Add a default route through specified gateway.</li>
</ul>
<p>Save and close the file. Restart networking:<br />
<code># service network restart</code><br />
Verify your configuration by pinging ipv6 enabled site such as ipv6.google.com:<br />
<code>$ ping6 ipv6.google.com</code><br />
Sample output:</p>
<blockquote><p>PING ipv6.google.com(2001:4860:b002::68) 56 data bytes<br />
64 bytes from 2001:4860:b002::68: icmp_seq=1 ttl=59 time=93.2 ms<br />
64 bytes from 2001:4860:b002::68: icmp_seq=2 ttl=59 time=95.0 ms<br />
64 bytes from 2001:4860:b002::68: icmp_seq=3 ttl=59 time=94.2 ms<br />
64 bytes from 2001:4860:b002::68: icmp_seq=4 ttl=59 time=95.2 ms<br />
64 bytes from 2001:4860:b002::68: icmp_seq=5 ttl=59 time=94.8 ms<br />
64 bytes from 2001:4860:b002::68: icmp_seq=6 ttl=59 time=95.1 ms<br />
64 bytes from 2001:4860:b002::68: icmp_seq=7 ttl=59 time=93.3 ms<br />
64 bytes from 2001:4860:b002::68: icmp_seq=8 ttl=59 time=93.8 ms</p>
<p>&#8212; ipv6.google.com ping statistics &#8212;<br />
8 packets transmitted, 8 received, 0% packet loss, time 7010ms<br />
rtt min/avg/max/mdev = 93.268/94.376/95.268/0.799 ms</p></blockquote>
<p>Traces path to a network host, enter:<br />
<code>$ traceroute6 ipv6.google.com</code><br />
Print default IPv6 routing table, enter:<br />
<code>$ route -n -A inet6</code><br />
Sample output:</p>
<blockquote><p>Kernel IPv6 routing table<br />
Destination                                 Next Hop                                Flags Metric Ref    Use Iface<br />
::1/128                                     ::                                      U     0      42531       1 lo<br />
::62.41.14.144/128                          ::                                      U     0      0        1 lo<br />
::127.0.0.1/128                             ::                                      U     0      0        1 lo<br />
::/96                                       ::                                      U     256    0        0 sit0<br />
2001:470:1f04:55a::2/128                    ::                                      U     0      15201       1 lo<br />
2001:470:1f04:55a::/64                      ::                                      U     256    0        0 sit1<br />
fe80::4833:22f4/128                         ::                                      U     0      0        1 lo<br />
fe80::212:3fff:fe75:fa0d/128                ::                                      U     0      0        1 lo<br />
fe80::/64                                   ::                                      U     256    0        0 eth0<br />
fe80::/64                                   ::                                      U     256    0        0 sit1<br />
ff00::/8                                    ::                                      U     256    0        0 eth0<br />
ff00::/8                                    ::                                      U     256    0        0 sit1<br />
::/0                                        ::                                      U     1      0        0 sit1
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/red-hat-centos-ipv6-network-configuration/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RedHat / Centos Disable IPv6 Networking</title>
		<link>http://redhatvn.net/redhat-centos-disable-ipv6-networking</link>
		<comments>http://redhatvn.net/redhat-centos-disable-ipv6-networking#comments</comments>
		<pubDate>Thu, 26 Aug 2010 04:25:56 +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>

		<guid isPermaLink="false">http://redhatvn.net/?p=1251</guid>
		<description><![CDATA[Our policy and network configuration does not requires IPv6 support in RHEL / CentOS / Fedora Linux. How do I prevent the kernel module from loading at boot time and disable IPv6 networking? You can easily prevent the kernel module from loading by updating the following two files: /etc/modprobe.conf &#8211; Kernel driver configuration file. /etc/sysconfig/network [...]]]></description>
			<content:encoded><![CDATA[<p>Our policy and network configuration  does not requires IPv6 support in RHEL / CentOS / Fedora Linux. How do I  prevent the kernel module from loading at boot time and disable IPv6  networking?<br />
You can easily prevent the kernel module from loading by updating the following two files:</p>
<ol>
<li>/etc/modprobe.conf &#8211; Kernel driver configuration file.</li>
<li>/etc/sysconfig/network &#8211; RHEL / CentOS networking configuration file.</li>
</ol>
<p><span id="more-1251"></span></p>
<h2>/etc/modprobe.conf</h2>
<p>Edit /etc/modprobe.conf, enter:<br />
<code># vi /etc/modprobe.conf</code><br />
Append the following line:</p>
<blockquote><p>install ipv6 /bin/true</p></blockquote>
<p>Save and close the file.</p>
<h2>/etc/sysconfig/network</h2>
<p>Edit /etc/sysconfig/network, enter:<br />
<code># vi /etc/sysconfig/network</code><br />
Update / add as follows:</p>
<blockquote><p> <br />
NETWORKING_IPV6=no<br />
IPV6INIT=no
</p></blockquote>
<p>Save and close the file. Restart networking service<br />
<code># service network restart<br />
# rmmod ipv6</code><br />
Alternatively, simple reboot the box:<br />
<code># reboot</code><br />
Verify IPv6 is disabled, enter:<br />
<code># lsmod | grep ipv6<br />
# /sbin/ifconfig</code></p>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/redhat-centos-disable-ipv6-networking/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing password via a script</title>
		<link>http://redhatvn.net/changing-password-via-a-script</link>
		<comments>http://redhatvn.net/changing-password-via-a-script#comments</comments>
		<pubDate>Mon, 16 Aug 2010 07:04:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=1242</guid>
		<description><![CDATA[Method 1: passwd Conventionally the command use to change password on Linux based system is passwd , the option related to this command is â€“stdin ,an this is all done throughout a pipe. echo -e "new_password\nnew_password" &#124; (passwd --stdin $USER) Method 2: chpasswd Another alternative is to use the chpasswd, explain as below: echo "password:name" [...]]]></description>
			<content:encoded><![CDATA[<h3>Method 1: passwd</h3>
<p>Conventionally the command use to change password on Linux based system is <strong>passwd</strong><br />
, the option related to this command is <strong>â€“stdin </strong>,an this is all done throughout a <strong>pipe</strong>.<br />
<code>echo -e "new_password\nnew_password" | (passwd --stdin $USER)</code></p>
<h3>Method 2: chpasswd</h3>
<p>Another alternative is to use the <strong>chpasswd</strong>, explain as below:<br />
<code>echo "password:name" | chpasswd</code><br />
Note that the first method can be use to change psssword on Samba based system:<br />
<code>echo -e "new_password\nnew_password" | (smbpasswd -a -s $USER)</code></p>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/changing-password-via-a-script/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Random password generator in shell script</title>
		<link>http://redhatvn.net/random-password-generator-in-shell-script</link>
		<comments>http://redhatvn.net/random-password-generator-in-shell-script#comments</comments>
		<pubDate>Mon, 16 Aug 2010 06:55:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell script]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=1237</guid>
		<description><![CDATA[#!/bin/bash MAXSIZE=62 array1=( q w e r t y u i o p a s d f g h j k l z x c v b n m Q W E R T Y U I O P A S D F G H J K L Z X C V B N M [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>#!/bin/bash<br />
MAXSIZE=62<br />
array1=(<br />
q w e r t y u i o p a s d f g h j k l z x c v b n m Q W E R T Y U I O P A S D<br />
F G H J K L Z X C V B N M 1 2 3 4 5 6 7 8 9 0 \! \@ \# \$ \% \^ \&amp; \* \( \)<br />
\! \@ \# \$ \% \^ \&amp; \* \( \) \! \@ \# \$ \% \^ \&amp; \* \( \) \! \@ \# \$ \%<br />
)<br />
MODNUM=${#array1[*]}<br />
pwd_len=0<br />
while [ $pwd_len -lt $MAXSIZE ]<br />
do<br />
index=$(($RANDOM%$MODNUM))<br />
echo -n &#8220;${array1[$index]}&#8221;<br />
((pwd_len++))<br />
done<br />
echo<br />
exit 0
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/random-password-generator-in-shell-script/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! -->