<?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>潘文斌个人博客 &#187; WHM/Cpanel</title>
	<atom:link href="http://www.panwenbin.com/category/whmcpanel/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.panwenbin.com</link>
	<description>记忆不行，只能记录</description>
	<lastBuildDate>Mon, 06 Feb 2012 04:12:38 +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>whmcs根据English.txt的标签，根据别人的已有翻译，生成新的翻译文件</title>
		<link>http://www.panwenbin.com/2010/08/30/whmcs%e6%a0%b9%e6%8d%aeenglish-txt%e7%9a%84%e6%a0%87%e7%ad%be%ef%bc%8c%e6%a0%b9%e6%8d%ae%e5%88%ab%e4%ba%ba%e7%9a%84%e5%b7%b2%e6%9c%89%e7%bf%bb%e8%af%91%ef%bc%8c%e7%94%9f%e6%88%90%e6%96%b0%e7%9a%84/</link>
		<comments>http://www.panwenbin.com/2010/08/30/whmcs%e6%a0%b9%e6%8d%aeenglish-txt%e7%9a%84%e6%a0%87%e7%ad%be%ef%bc%8c%e6%a0%b9%e6%8d%ae%e5%88%ab%e4%ba%ba%e7%9a%84%e5%b7%b2%e6%9c%89%e7%bf%bb%e8%af%91%ef%bc%8c%e7%94%9f%e6%88%90%e6%96%b0%e7%9a%84/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 14:09:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WHM/Cpanel]]></category>

		<guid isPermaLink="false">http://www.panwenbin.com/?p=1254</guid>
		<description><![CDATA[&#60;?php header&#40;'Content-type: text/plain;charset=utf-8'&#41;; eval&#40;file_get_contents&#40;'English.txt'&#41;&#41;; eval&#40;file_get_contents&#40;'Chinese.txt'&#41;&#41;; &#160; $lang=''; foreach&#40;$_LANG as $key=&#62;$value&#41;&#123; $q=strstr&#40;$value,'&#34;'&#41;?&#34;'&#34;:'&#34;'; $lang.='$_LANG[\''.$key.'\'] = '.$q.$value.$q.&#34;;\r\n&#34;; &#125; file_put_contents&#40;'Chinese.txt',$lang&#41;; ?&#62;]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-type: text/plain;charset=utf-8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">eval</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'English.txt'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">eval</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Chinese.txt'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$lang</span><span style="color: #339933;">=</span><span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_LANG</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$key</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$q</span><span style="color: #339933;">=</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&quot;'</span><span style="color: #009900;">&#41;</span>?<span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #339933;">:</span><span style="color: #0000ff;">'&quot;'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$lang</span><span style="color: #339933;">.=</span><span style="color: #0000ff;">'$_LANG[\''</span><span style="color: #339933;">.</span><span style="color: #000088;">$key</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'\'] = '</span><span style="color: #339933;">.</span><span style="color: #000088;">$q</span><span style="color: #339933;">.</span><span style="color: #000088;">$value</span><span style="color: #339933;">.</span><span style="color: #000088;">$q</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #990000;">file_put_contents</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Chinese.txt'</span><span style="color: #339933;">,</span><span style="color: #000088;">$lang</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.panwenbin.com/2010/08/30/whmcs%e6%a0%b9%e6%8d%aeenglish-txt%e7%9a%84%e6%a0%87%e7%ad%be%ef%bc%8c%e6%a0%b9%e6%8d%ae%e5%88%ab%e4%ba%ba%e7%9a%84%e5%b7%b2%e6%9c%89%e7%bf%bb%e8%af%91%ef%bc%8c%e7%94%9f%e6%88%90%e6%96%b0%e7%9a%84/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cpanel创建新用户提示符为bash-3.2$</title>
		<link>http://www.panwenbin.com/2010/08/28/cpanel%e5%88%9b%e5%bb%ba%e6%96%b0%e7%94%a8%e6%88%b7%e6%8f%90%e7%a4%ba%e7%ac%a6%e4%b8%babash-3-2/</link>
		<comments>http://www.panwenbin.com/2010/08/28/cpanel%e5%88%9b%e5%bb%ba%e6%96%b0%e7%94%a8%e6%88%b7%e6%8f%90%e7%a4%ba%e7%ac%a6%e4%b8%babash-3-2/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 13:47:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WHM/Cpanel]]></category>

		<guid isPermaLink="false">http://www.panwenbin.com/?p=1246</guid>
		<description><![CDATA[首先这个提示符是由/etc/profile设置的，默认创建linux用户都会有~/.bash_profile，该文件会调用/etc/profile 这里问题是创建新用户，没有~/.bash_profile ~/bashrc ~/bash_logout文件 linux新建用户，会拷贝/etc/skel下的文件，经检查/etc/skel下有这些文件，然后手动useradd验证linux下添加用户正常，所以问题应该出在cpanel那边 经搜索cpanel论坛，从 http://forums.cpanel.net/f5/ssh-help-145681.html 找到，cpanel创建用户会拷贝的文件在/root/cpanel3-skel/目录 检查/root/cpanel3-skel/下确实没有~/.bash_profile ~/bashrc ~/bash_logout文件 拷贝过去，cp /etc/skel/.bash* /root/cpanel3-skel/ 下面bash可以修复，不过usr.list要自己创建 #!/bin/bash &#160; # fix cpanel bash prompt &#160; for usr in `cat usr.list`;do if [ -d /home/$usr/ ];then cp -f /etc/skel/.bash* /home/$usr/ chown $usr:$usr /home/$usr/.bash* fi done]]></description>
			<content:encoded><![CDATA[<p>首先这个提示符是由/etc/profile设置的，默认创建linux用户都会有~/.bash_profile，该文件会调用/etc/profile</p>
<p>这里问题是创建新用户，没有~/.bash_profile  ~/bashrc  ~/bash_logout文件<br />
linux新建用户，会拷贝/etc/skel下的文件，经检查/etc/skel下有这些文件，然后手动useradd验证linux下添加用户正常，所以问题应该出在cpanel那边</p>
<p>经搜索cpanel论坛，从</p>
<p>http://forums.cpanel.net/f5/ssh-help-145681.html</p>
<p>找到，cpanel创建用户会拷贝的文件在/root/cpanel3-skel/目录<br />
检查/root/cpanel3-skel/下确实没有~/.bash_profile  ~/bashrc  ~/bash_logout文件</p>
<p>拷贝过去，cp /etc/skel/.bash* /root/cpanel3-skel/</p>
<p>下面bash可以修复，不过usr.list要自己创建</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">#!/bin/bash
&nbsp;
# fix cpanel bash prompt
&nbsp;
for usr in `cat usr.list`;do
	if [ -d /home/$usr/ ];then
		cp -f /etc/skel/.bash* /home/$usr/
		chown $usr:$usr /home/$usr/.bash*
	fi
done</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.panwenbin.com/2010/08/28/cpanel%e5%88%9b%e5%bb%ba%e6%96%b0%e7%94%a8%e6%88%b7%e6%8f%90%e7%a4%ba%e7%ac%a6%e4%b8%babash-3-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx For Cpanel and Apache</title>
		<link>http://www.panwenbin.com/2010/06/12/nginx-for-cpanel-and-apache/</link>
		<comments>http://www.panwenbin.com/2010/06/12/nginx-for-cpanel-and-apache/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 20:50:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WHM/Cpanel]]></category>

		<guid isPermaLink="false">http://www.panwenbin.com/2010/06/12/nginx-for-cpanel-and-apache/</guid>
		<description><![CDATA[http://www.silentstreet.net/sq/archives/nginx-for-cpanel-and-apache/ http://icodex.org/2010/02/nginx%E8%87%AA%E5%8A%A8%E5%AE%89%E8%A3%85%E8%84%9A%E6%9C%AC-for-cpanel/]]></description>
			<content:encoded><![CDATA[<p>http://www.silentstreet.net/sq/archives/nginx-for-cpanel-and-apache/</p>
<p>http://icodex.org/2010/02/nginx%E8%87%AA%E5%8A%A8%E5%AE%89%E8%A3%85%E8%84%9A%E6%9C%AC-for-cpanel/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.panwenbin.com/2010/06/12/nginx-for-cpanel-and-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cpanel 自定义php.ini</title>
		<link>http://www.panwenbin.com/2009/01/30/cpanel-%e8%87%aa%e5%ae%9a%e4%b9%89phpini/</link>
		<comments>http://www.panwenbin.com/2009/01/30/cpanel-%e8%87%aa%e5%ae%9a%e4%b9%89phpini/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 19:51:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WHM/Cpanel]]></category>

		<guid isPermaLink="false">http://6km.cn/?p=129</guid>
		<description><![CDATA[经过查资料，类似Lunarpages的自定义php.ini是需要运行在suPHP的 以suPHP运行时，每个目录下都可以自定义php.ini，也可以用在public_html/.htaccess内写如下语句 suPHP_ConfigPath /home/user/public_html/ 来使所有目录包括子目录都应用这个public_html/php.ini，其中user是Cpanel用户名  ]]></description>
			<content:encoded><![CDATA[<p>经过查资料，类似Lunarpages的自定义php.ini是需要运行在suPHP的</p>
<p>以suPHP运行时，每个目录下都可以自定义php.ini，也可以用在public_html/.htaccess内写如下语句</p>
<p>suPHP_ConfigPath /home/user/public_html/</p>
<p>来使所有目录包括子目录都应用这个public_html/php.ini，其中user是Cpanel用户名</p>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.panwenbin.com/2009/01/30/cpanel-%e8%87%aa%e5%ae%9a%e4%b9%89phpini/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

