<?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>Cpanel中文教程使用指南</title>
	<atom:link href="http://www.cpanelcn.info/feed" rel="self" type="application/rss+xml" />
	<link>http://www.cpanelcn.info</link>
	<description>Cpanel中文教程使用指南</description>
	<lastBuildDate>Thu, 02 Feb 2012 08:27:18 +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>Linux 文件操作常用命令</title>
		<link>http://www.cpanelcn.info/linux-commands.html</link>
		<comments>http://www.cpanelcn.info/linux-commands.html#comments</comments>
		<pubDate>Thu, 02 Feb 2012 08:27:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux服务器优化]]></category>
		<category><![CDATA[文件命令]]></category>

		<guid isPermaLink="false">http://www.cpanelcn.info/?p=96</guid>
		<description><![CDATA[Use this command to find the directories taking up the most space: 查找占空间最大的目录 du -k &#124; sort -nr &#124; more The du command along with the -k switch lists all directories and their respective size in kilobytes. The sort command sorts the output so that the largest directory is shown first in the list. The [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Use this command to find the directories taking up the most space:</strong><br />
<strong>查找占空间最大的目录</strong></p>
<p> <code>du -k | sort -nr | more</code></p>
<p>The du command along with the -k switch lists all directories and their respective size in kilobytes.<br />
The sort command sorts the output so that the largest directory is shown first in the list. The -nr switch reverses the list and uses only numbers when sorting.</p>
<p>Here’s an example of the output:</p>
<p> 12939451  .<br />
 1814892  ./abcdef<br />
 1219582  ./abcde<br />
 839586  ./abcd<br />
 718330  ./abc<br />
 695610  ./ab<br />
 690380  ./a</p>
<p>For human-readable output use the following command:</p>
<p> <code>du -sh /*</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelcn.info/linux-commands.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>安装Selft signed SSL WHM Cpanel</title>
		<link>http://www.cpanelcn.info/installselft-signed-ssl-whm-cpanel.html</link>
		<comments>http://www.cpanelcn.info/installselft-signed-ssl-whm-cpanel.html#comments</comments>
		<pubDate>Thu, 02 Feb 2012 07:32:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cpanel中文教程]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://www.cpanelcn.info/?p=92</guid>
		<description><![CDATA[Installing a self-signed SSL certificate on a cPanel server To install on a cPanel server, you need a reseller or VPS hosting account. You’ll also need a dedicated IP address, to separate the site from others on the shared hosting server. Here at WebHostingBuzz, reseller accounts include dedicated IP address, and you may use one [...]]]></description>
			<content:encoded><![CDATA[<p>Installing a self-signed SSL certificate on a cPanel server</p>
<p>To install on a cPanel server, you need a reseller or VPS hosting account. You’ll also need a dedicated IP address, to separate the site from others on the shared hosting server. Here at WebHostingBuzz, reseller accounts include dedicated IP address, and you may use one of those for your certificate.</p>
<p>Create a self-signed SSL certificate</p>
<p>    Login to WHM.<br />
    Click “Generate a SSL Certificate &#038; Signing Request”.<br />
    Enter “Contact info” with a valid e-mail address.<br />
    Enter or generate a password, making sure it is sufficiently long with a mixture of letters, numbers and symbols.<br />
    Under “Host to make cert for”, enter the domain on which you want the SSL.<br />
    Click “Create”.<br />
    Copy the text displayed for the .key and .crt, and paste them into a text file on your computer. You may need that text in the next steps.</code></p>
<p>Install a self-signed SSL certificate</p>
<p>    In WHM, click “Install an SSL Certificate and Setup the Domain”.<br />
    Enter the domain name, account user name, and IP address for the certificate in the Domain, User, and IP Address fields.<br />
    Click “Fetch” to paste the .key and .crt files for the domain into the available display spaces, if they are currently on your server. (The first time I did this, clicking Fetch automatically pasted the required data into the fields. When I created later certs, the I had to manually paste in the information.)<br />
    Don’t enter anything in CA bundle: there is no Certificate Authority because you are installing a self-signed cert.<br />
    Click “Submit”, then wait for all processes to complete. WHM will display various lines of information and finally display “Finished Install Process.. “<br />
    Point your web browser to https:// followed by the domain, to see your new SSL connection working.</p>
<p>If you don’t see the SSL commands in your WHM, it may be because you don’t have a dedicated IP on your account. Once you have a dedicated IP assigned to a domain, the SSL Certificate links/commands will appear in WHM.</p>
<p>Since I began using self-signed SSL certificates a few years ago, several free and public domain certificate authorities have appeared. They issue certificates similar to those from the large commercial certificate authorities. The drawback is that most of them are not yet automatically trusted by major web browsers, meaning that users would see the same warning as when using a self-signed certificate. If these free issuers eventually get approval from the major web browsers, they would be a good alternative</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelcn.info/installselft-signed-ssl-whm-cpanel.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>安装了Selft signed SSL后WHM Cpanel Restart apache Failed</title>
		<link>http://www.cpanelcn.info/%e5%ae%89%e8%a3%85%e4%ba%86selft-signed-ssl%e5%90%8ewhm-cpanel-restart-apache-failed.html</link>
		<comments>http://www.cpanelcn.info/%e5%ae%89%e8%a3%85%e4%ba%86selft-signed-ssl%e5%90%8ewhm-cpanel-restart-apache-failed.html#comments</comments>
		<pubDate>Thu, 29 Dec 2011 07:22:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cpanel中文教程]]></category>
		<category><![CDATA[SSLCACertificateFile]]></category>

		<guid isPermaLink="false">http://www.cpanelcn.info/?p=88</guid>
		<description><![CDATA[安装了Selft signed SSL后WHM Cpanel Restart apache Failed Apache restart failed. Unable to load pid from pid file and no httpd process found in process list. If apache restart reported success but it failed soon after, it may be caused by oddities with mod_ssl. You should run /usr/local/cpanel/scripts/ssl_crt_status as part of your troubleshooting process. Pass it [...]]]></description>
			<content:encoded><![CDATA[<p>安装了Selft signed SSL后WHM Cpanel Restart apache Failed<br />
<code>Apache restart failed. Unable to load pid from pid file and no httpd process found in process list.<br />
If apache restart reported success but it failed soon after, it may be caused by oddities with mod_ssl.<br />
You should run /usr/local/cpanel/scripts/ssl_crt_status as part of your troubleshooting process. Pass it --help for more details.</code></p>
<p>解决办法：<br />
Commented out the <strong>SSLCACertificateFile</strong> line </p>
<p>restart httpd in whm</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelcn.info/%e5%ae%89%e8%a3%85%e4%ba%86selft-signed-ssl%e5%90%8ewhm-cpanel-restart-apache-failed.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>怎样查看Linux/Centos Raid状态？ Adaptec RAID array Status</title>
		<link>http://www.cpanelcn.info/how-do-i-check-the-health-of-my-adaptec-raid-array-linux.html</link>
		<comments>http://www.cpanelcn.info/how-do-i-check-the-health-of-my-adaptec-raid-array-linux.html#comments</comments>
		<pubDate>Sun, 23 Oct 2011 03:12:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux服务器优化]]></category>
		<category><![CDATA[Linux/Centos Raid状态]]></category>

		<guid isPermaLink="false">http://www.cpanelcn.info/?p=86</guid>
		<description><![CDATA[How do I check the health of my Adaptec RAID array? (LINUX) 怎样查看Linux/Centos Raid状态？ First, you will need the Linux version of Adaptec Storage Manager on your system. Normally, this will install the agent and the manager. On your SoftLayer server it will only install the agent, as this is all that is needed. Please [...]]]></description>
			<content:encoded><![CDATA[<p>How do I check the health of my Adaptec RAID array? (LINUX)<br />
怎样查看Linux/Centos Raid状态？<br />
<span>First, you will need the Linux version of Adaptec Storage Manager on your system. Normally, this will install the agent and the manager. On your SoftLayer server it will only install the agent, as this is all that is needed.</span></p>
<p><span>Please check <a href="http://downloads.service.softlayer.com">http://downloads.service.softlayer.com</a> for the latest 32bit or 64bit version of the Adaptec Storage Manager. VPN&nbsp;access is required to download from that page. </span></p>
</p>
<p><a href="http://downloads.service.softlayer.com/adaptectools/linux/64/asm_linux_x64_v5_20_17414.rpm"><span></span></a></p>
<p>Next you will need to download and install the rpm on your server if it isn’t already installed. (If you used SoftLayer’s install and are not running a custom install, chances are it is already installed, though we will run through it just for the ones that do not have it installed)
</p>
<p>First download the rpm from the link above using wget</p>
<p>At the command prompt type</p>
<p>wget **Link to RPM**<span><br /></span></p>
<p><img title="" alt="" src="http://knowledgelayer.softlayer.com/images/how_do_I_check_the_health_of_my_adaptec_raid_linux/1-wget-asm.JPG" width="764" height="429" align="bottom" border="0"></p>
<p>Next install the rpm,at the command prompt type:</p>
<p>rpm –Uvf asm_linux_v4.30-16038.rpm</p>
<p><img title="" alt="" src="http://knowledgelayer.softlayer.com/images/how_do_I_check_the_health_of_my_adaptec_raid_linux/2-asm-install.JPG" width="764" height="429" align="bottom" border="0"></p>
<p>After the application has been installed and started correctly, from the command prompt you will want to run the <b>arcconf</b> program in order to view the health of your array. </p>
<p><span>/usr/StorMan/arcconf getconfig 1 </span></p>
<p><img title="" alt="" src="http://knowledgelayer.softlayer.com/images/how_do_I_check_the_health_of_my_adaptec_raid_linux/1-degraded.JPG" width="938" height="1005" align="bottom" border="0"></p>
<p>Here you will noticed that Device #1 is Online, while Device #2 is Failed, thus meaning we have a degraded array and a hard disk will need to be replaced. </p>
<p><img title="" alt="" src="http://knowledgelayer.softlayer.com/images/how_do_I_check_the_health_of_my_adaptec_raid_linux/2-degraded.JPG" width="938" height="1037" align="bottom" border="0"></p>
<p>Just open up a SoftLayer support ticket to schedule a maintenance window for the drive replacement.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelcn.info/how-do-i-check-the-health-of-my-adaptec-raid-array-linux.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache基础优化</title>
		<link>http://www.cpanelcn.info/apache%e5%9f%ba%e7%a1%80%e4%bc%98%e5%8c%96.html</link>
		<comments>http://www.cpanelcn.info/apache%e5%9f%ba%e7%a1%80%e4%bc%98%e5%8c%96.html#comments</comments>
		<pubDate>Sun, 31 Jul 2011 04:35:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cpanel使用技巧]]></category>
		<category><![CDATA[apache 基础优化， 负载]]></category>

		<guid isPermaLink="false">http://www.cpanelcn.info/?p=84</guid>
		<description><![CDATA[在WHM 后台可对Apacke进行基础优化。 Service Configuration >> Apache Configuration >> Global Configuration ServerSignature On MaxClients 256 StartServers 5 Timeout 120 KeepAlive On MaxKeepAliveRequests 9999 KeepAliveTimeout 10 StartServers 5 ServerLimit 512 MinSpareServers 10 MaxRequestsPerChild 9999 Keep alive on The Keep-Alive extension to HTTP/1.0 and the persistent connection feature of HTTP/1.1 provide long-lived HTTP sessions which allow multiple requests [...]]]></description>
			<content:encoded><![CDATA[<p>在WHM 后台可对Apacke进行基础优化。<br />
Service Configuration >> Apache Configuration >> Global Configuration</p>
<p><code><br />
ServerSignature On</p>
<p><IfModule prefork.c></p>
<p>MaxClients 256<br />
StartServers 5<br />
Timeout 120</p>
<p>KeepAlive On<br />
MaxKeepAliveRequests 9999<br />
KeepAliveTimeout 10<br />
StartServers 5<br />
ServerLimit 512<br />
MinSpareServers 10<br />
MaxRequestsPerChild 9999</p>
<p></IfModule> </code><br />
Keep alive on<br />
The Keep-Alive extension to HTTP/1.0 and the persistent connection feature of HTTP/1.1 provide long-lived HTTP sessions which allow multiple requests to be sent over the same TCP connection. In some cases this has been shown to result in an almost 50% speedup in latency times for HTML documents with many images. To enable Keep-Alive connections, set KeepAlive On.</p>
<p>For HTTP/1.0 clients, Keep-Alive connections will only be used if they are specifically requested by a client. In addition, a Keep-Alive connection with an HTTP/1.0 client can only be used when the length of the content is known in advance. This implies that dynamic content such as CGI output, SSI pages, and server-generated directory listings will generally not use Keep-Alive connections to HTTP/1.0 clients. For HTTP/1.1 clients, persistent connections are the default unless otherwise specified. If the client requests it, chunked encoding will be used in order to send content of unknown length over persistent connections.</p>
<p>When a client uses a Keep-Alive connection it will be counted as a single &#8220;request&#8221; for the MaxRequestsPerChild directive, regardless of how many requests are sent using the connection.</p>
<p>根据PageSpeed的规则，我们可以从KeepAlive，浏览器缓存，Gzip等方面对Apache进行些调整，从而提高网站性能。</p>
<h2>1. 开启Keep-Alive</h2>
<p>开启Keep-Alive后，可以保证浏览器和服务器之间的连接持久存在，这样如果同一个域名请求很多资源的情况下可以省去建立连接的时间和资源消耗。所以对于静态服务器来说，由于一个域名会请求N多资源，比较宜开启Keep-Alive，但是对于动态服务器，不宜开启Keep-Alive，因为这样会造成很多的空闲进程，浪费内存空间。<br />
配置：</p>
<pre class="brush: plain;">
KeepAlive On #开启KeepAlive
KeepAliveTimeout 5 #保持连接5秒
</pre>
<p><span id="more-24"></span></p>
<h2>2. HTTP缓存设置</h2>
<p>当直接在浏览器中输入一个URL，或者点击一个链接的时候，那么浏览器缓存就会起作用，如果缓存没有过期，那么浏览器会从本地读取资源，不会发起HTTP请求，如果缓存过期，那么浏览器会发起新的浏览器请求。按ctrl+F5，浏览器会情况本地缓存，重新请求资源。<br />
Expires是HTTP/1.0的缓存头， Cache-Control: max-age 是HTTP/1.1是用来进行HTTP缓存的头。Expires指定了资源过期的绝对时间，GMT格式，Cache-Control: max-age指定了资源过期的相对时间，单位是秒。在支持HTTP/1.1的浏览器上，如果发送两个头，那么Cache-Control: max-age会覆盖掉Expires；在支持HTTP/1.0的浏览器上，即使发送了两个头，但是只有Expires会起作用，所以为了兼容老的浏览器，还是要同时发送这两个头。设置HTTP缓存，需要安装expires_module，其会发送Expires和Cache-Control: max-age两个HTTP头。<br />
配置：</p>
<pre class="brush: plain;">
&lt;IfModule expires_module&gt;
ExpiresActive On
ExpiresByType application/x-javascript  &quot;access plus 30 days&quot;

ExpiresByType text/css  &quot;access plus 30 days&quot;
ExpiresByType image/gif  &quot;access plus 30 days&quot;
ExpiresByType image/jpeg  &quot;access plus 30 days&quot;
ExpiresByType image/png  &quot;access plus 30 days&quot;
&lt;/IfModule&gt;
</pre>
<p>ExpiresByType application/x-javascript  &#8220;access plus 30 days&#8221; 表示对js资源设置Expires和Cache-Control: max-age头，其中Expires的值是以客户端访问资源的时间为基准的后30天，Cache-Control: max-age的值是3600x24x30秒。</p>
<p>ExpiresByType application/x-javascript  &#8220;modification plus 30 days&#8221;和上面效果一样，只是Expires的时间是以资源最后修改的时间作为计算的基准。</p>
<h2>3. 开启Gzip压缩，并设置vary头</h2>
<p>Gzip会对文本资源进行压缩，一般能节省40%的大小，二进制内容不需要开启Gzip压缩，因为这些文件是已经压缩过的，如果再进行Gzip压缩反而会增加其大小。静态资源一般都会在代理服务器上进行缓存，而有的浏览器支持Gzip，但是也有不支持Gzip的老旧浏览器，所以需要设置Vary: Accept-Encoding 头，这个头告诉代理缓存服务器要对资源缓存两份，一份压缩过的，一份没有压缩过，然后根据浏览器发送的Accept-Encoding头来返回压缩或者不压缩的内容。设置Gzip压缩，需要安装deflate_module。<br />
配置：</p>
<pre class="brush: plain;">
&lt;IfModule deflate_module&gt;
#对js,html,xml,css,普通文本开启Gzip压缩
AddOutputFilterByType DEFLATE application/x-javascript text/html text/plain text/xml text/css
&lt;/IfModule&gt;
</pre>
<h2>4. 关掉ETag</h2>
<p>Last-Modified与ETag是同样的功能，都是用来标识一个资源是否更改过，Last-Modified的值是资源的时间戳，如果按F5或者刷新按钮则If-Modified-Since头会带着时间戳发送到服务器，如果服务器上资源的最后修改时间&lt;=这个时间，那么返回304 Not Modified，否则返回200 OK 以及新的资源；ETag的值是通过资源的信息（一般为inode，大小，时间戳）而计算出来的一个字符串，如果按F5或者刷新按钮则If-None-Match头会带着这个值发送到服务器，服务器用这个值来和当前资源的值进行比对，如果相等，则返回304 Not Modified，否则返回200 OK 以及新的资源。默认情况下Apache对静态资源会发送Last-Modified和ETage，但是由于ETage的计算会耗费服务器的CPU资源，所以选择关掉，只开启Last-Modified。</p>
<p>配置：</p>
<pre class="brush: plain;">
FileETag None
Header unset ETag
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelcn.info/apache%e5%9f%ba%e7%a1%80%e4%bc%98%e5%8c%96.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux 内存不足的解决办法 &#8211; 增加虚拟内存 Swap Space</title>
		<link>http://www.cpanelcn.info/linux-%e5%86%85%e5%ad%98%e4%b8%8d%e8%b6%b3%e7%9a%84%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95-%e5%a2%9e%e5%8a%a0%e8%99%9a%e6%8b%9f%e5%86%85%e5%ad%98-swap-space.html</link>
		<comments>http://www.cpanelcn.info/linux-%e5%86%85%e5%ad%98%e4%b8%8d%e8%b6%b3%e7%9a%84%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95-%e5%a2%9e%e5%8a%a0%e8%99%9a%e6%8b%9f%e5%86%85%e5%ad%98-swap-space.html#comments</comments>
		<pubDate>Sun, 31 Jul 2011 02:47:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux服务器优化]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[LINUX 内存太低]]></category>

		<guid isPermaLink="false">http://www.cpanelcn.info/?p=79</guid>
		<description><![CDATA[Q. Linux 内存不足， 服务器负载高会导致服务器当机。 在经过被当机多次后， 发现可以通过增加虚拟内存Swap Space的办法来缓解。 I need additional swap space to improve my system performance. How do I add a swap file to Linux system? A. In Linux, as in most other Unix-like operating systems, it is common to use a whole partition of a hard disk for swapping. However, with the 2.6 [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: rgb(255, 0, 0);">Q</span>. Linux 内存不足， 服务器负载高会导致服务器当机。 在经过被当机多次后， 发现可以通过增加虚拟内存Swap Space的办法来缓解。 I need additional swap space to improve my system performance. How do I add a swap file to Linux system?</p>
<p><span style="color: rgb(0, 153, 0);">A.</span> In Linux, as in most other Unix-like operating systems, it is common to use a whole partition of a hard disk for swapping. However, with the 2.6 Linux kernel, swap files are just as fast[7] as swap partitions, although Red Hat recommends using a swap partition. The administrative flexibility of swap files outweighs that of partitions; since modern high capacity hard drives can remap physical sectors, no partition is guaranteed to be contiguous. You can add swap file as a dedicated partition or use following instructions to create a swap file.</p>
<h3>Procedure to add a swap file</h3>
<p>You need to use dd command to create swapfile. Next you need to use mkswap command to set up a Linux swap area on a device or in a file.</p>
<p>a) Login as the root user SSH登录root 账户</p>
<p>b) Type following command to create 2G swap file (1024 * 2048MB =  2097152 block size):</p>
<p><code># dd if=/dev/zero of=/swapfile1 bs=1024 count=2097152</code></p>
<p>c) Set up a Linux swap area:<br />
<code># mkswap /swapfile1</code></p>
<p>d) Activate /swapfile1 swap space immediately:<br />
<code># swapon /swapfile1</code></p>
<p>e) To activate /swapfile1 after Linux system reboot, add entry to /etc/fstab file. Open this file using text editor such as vi:<br />
<code># vi /etc/fstab</code></p>
<p>Append following line:<br />
<code>/swapfile1    swap    swap   defaults 0 0</code></p>
<p>So next time Linux comes up after reboot, it enables the new swap file for you automatically.</p>
<p>g) How do I verify swap is activated or not?<br />
Simply use free command:<br />
<code>$ free -m</code></p>
<p>如果想关闭虚拟内存或者向扩大， 要先disable<br />
<code>swapoff /swapfile1</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelcn.info/linux-%e5%86%85%e5%ad%98%e4%b8%8d%e8%b6%b3%e7%9a%84%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95-%e5%a2%9e%e5%8a%a0%e8%99%9a%e6%8b%9f%e5%86%85%e5%ad%98-swap-space.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>怎样将大Mysql文件导入到远程服务器</title>
		<link>http://www.cpanelcn.info/transer-large-mysql-to-remote-server.html</link>
		<comments>http://www.cpanelcn.info/transer-large-mysql-to-remote-server.html#comments</comments>
		<pubDate>Wed, 16 Mar 2011 03:53:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mysql 教程]]></category>
		<category><![CDATA[大Mysql文件导入]]></category>

		<guid isPermaLink="false">http://www.cpanelcn.info/?p=74</guid>
		<description><![CDATA[首先创建数据库备份 mysqldump -v -u databaseuser -p databasename > db-name.out 然后将备份传送到远程服务器 scp db-name.out root@yourserver.com:/home/user 最后导入数据到新的数据库里 mysql -u newdatabaseuser-p newdatabasename < /home/user/db-name.out]]></description>
			<content:encoded><![CDATA[<p>首先创建数据库备份<br />
<code>mysqldump -v -u databaseuser -p  databasename > db-name.out</code><br />
然后将备份传送到远程服务器<br />
<code>scp db-name.out root@yourserver.com:/home/user</code><br />
最后导入数据到新的数据库里<br />
<code>mysql -u newdatabaseuser-p newdatabasename < /home/user/db-name.out</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelcn.info/transer-large-mysql-to-remote-server.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux服务不记录日志的办法</title>
		<link>http://www.cpanelcn.info/linux%e6%9c%8d%e5%8a%a1%e4%b8%8d%e8%ae%b0%e5%bd%95%e6%97%a5%e5%bf%97%e7%9a%84%e5%8a%9e%e6%b3%95.html</link>
		<comments>http://www.cpanelcn.info/linux%e6%9c%8d%e5%8a%a1%e4%b8%8d%e8%ae%b0%e5%bd%95%e6%97%a5%e5%bf%97%e7%9a%84%e5%8a%9e%e6%b3%95.html#comments</comments>
		<pubDate>Sun, 13 Feb 2011 08:12:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cpanel使用技巧]]></category>
		<category><![CDATA[Linux 技巧]]></category>

		<guid isPermaLink="false">http://www.cpanelcn.info/?p=72</guid>
		<description><![CDATA[We all know that /dev/null acts like a black hole in the universe. Anything you throw at it would be totally gone forever. Any attempts to read or write from it result to nothing. This means any data written to this /dev/null is just discarded and gone. This also mean that any data reads from [...]]]></description>
			<content:encoded><![CDATA[<p>We all know that /dev/null acts like a black hole in the universe. Anything you throw at it would be totally gone forever. Any attempts to read or write from it result to nothing. This means any data written to this /dev/null is just discarded and gone. This also mean that any data reads from this special file always returns end of file (EOF). </p>
<p>However, /dev/null can be quite useful in several ways too. Do not issue any commands mentioned here unless you know what you are doing. You’ve been warned. However, you can continue to read more from below.</p>
<p>How to zap a file without changing file ownership and permission?</p>
<p>From below sample, bigfile is owned by owner1, and you are root, truncating bigfile to a zero sized file without any to file permission and file ownership changes can also be done as follows.</p>
<p># ls -la bigfile<br />
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
-rw-rw-rw- 1 owner1 owner1 123123123123 2007-08-16 19:04 bigfile<br />
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</p>
<p>As root: </p>
<p># cp /dev/null bigfile</p>
<p># ls -la bigfile<br />
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
-rw-rw-rw- 1 owner1 owner1 0 2007-08-16 19:05 bigfile<br />
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</p>
<p>Ofcourse, file time stamps would be modified.</p>
<p>Now, we know that cat command display file contents into your scree. Let us try to suppress stdout. As root</p>
<p># cat bigfile.txt > /dev/null</p>
<p>would show you nothing.</p>
<p>This is applicable also with stderr</p>
<p># rm bigfile.txt 2> /dev/null<br />
(Press Enter)</p>
<p>which obviously gives you nothing.</p>
<p>Now, how about issuing them both at the same time like so</p>
<p># cat bigfile.txt 2> /dev/null > /dev/null</p>
<p>Interpretion:<br />
If bigfile.txt does not exist, there will be no error message output from your screen since we supressed stderr. If bigfile.txt does exist, the file contents will not be displayed to stdout as well. So, you get no output at all using the above command. </p>
<p>Try file copying over or overwriting /dev/null and see how it works</p>
<p># cp bigfile.txt /dev/null</p>
<p>Another alternative use. </p>
<p>We have discussed before of creating file without editing it is by using linux command touch. Instead of using touch to create a zero sized file, we can make use of /dev/null to attain the same file output like so</p>
<p># cat /dev/null > newfile.txt</p>
<p>Thinking wider, logically, this means that any log messages supposedly to be written to, say /var/log/secure can be zapped and suppressed as well, perhaps by an already inside hacker. </p>
<p>Well, it is ONLY here as further usage combination example. As root</p>
<p># cp /dev/null /var/log/secure<br />
# rm -rf /var/log/secure<br />
# ln -s /dev/null /var/log/secure</p>
<p>Any future security messages supposedly to be logged to /var/log/secure would now be thrown to black hole (/dev/null) using the above command. </p>
<p>This is a bad practice and only here to elaborate more usage and security features that would be possible using /dev/null linux command.</p>
<p>Here’s another one.</p>
<p>Let us say you have just downloaded a package installer. You have installed this package before with your previous work or company. And you are very aware that the package when installed asks too many questions answerable yes or no, or with default values. </p>
<p>And you know you’ll just going to press the ENTER key for these question, /dev/null can be helpful here as well.</p>
<p>Execute the package or script like so</p>
<p># ./new-program < /dev/null &#038;<br />
# ./new-program.sh < /dev/null &#038;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelcn.info/linux%e6%9c%8d%e5%8a%a1%e4%b8%8d%e8%ae%b0%e5%bd%95%e6%97%a5%e5%bf%97%e7%9a%84%e5%8a%9e%e6%b3%95.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS5 安装SOCKS5代理教程</title>
		<link>http://www.cpanelcn.info/centos5-%e5%ae%89%e8%a3%85socks5%e4%bb%a3%e7%90%86%e6%95%99%e7%a8%8b.html</link>
		<comments>http://www.cpanelcn.info/centos5-%e5%ae%89%e8%a3%85socks5%e4%bb%a3%e7%90%86%e6%95%99%e7%a8%8b.html#comments</comments>
		<pubDate>Sun, 30 Jan 2011 02:25:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cpanel中文手册]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[socks5]]></category>

		<guid isPermaLink="false">http://www.cpanelcn.info/?p=70</guid>
		<description><![CDATA[安装和配置sock5服务器ss5 最近网络不太平，打算翻墙，但如何翻墙令人头疼，SSH太麻烦，找代理又不安全。想到自己有个VPS，干脆自己来组建个sock5服务器算了。网上找了些资料，一开始打算装最新版，但问题很多，研究了一晚上也没研究出个头绪来，干脆找点老版本安装，主要能用就行- - 不要下载最新版ss5-3.7.8-5，会有严重错误，一般情况下，ss5-3.6.4足够使用了。 安装之前检查下自己有没有安装pam-devel包，如果没有，直接用yum安装： yum -y install pam-devel 开始下载安装： wget http://jaist.dl.sourceforge.net/sourceforge/ss5/ss5-3.6.4-3.tar.gz tar -zxf ss5-3.6.4-3.tar.gz cd ss5-3.6.4 ./configure make&#038;&#038;make install （默认安装在“/etc/opt/ss5/”目录，以后觉得没用了，直接删除该目录即可） 安装完毕，修改配置文件：/etc/opt/ss5/ss5.conf ，找到以下代码：]]></description>
			<content:encoded><![CDATA[<p>安装和配置sock5服务器ss5<br />
最近网络不太平，打算翻墙，但如何翻墙令人头疼，SSH太麻烦，找代理又不安全。想到自己有个VPS，干脆自己来组建个sock5服务器算了。网上找了些资料，一开始打算装最新版，但问题很多，研究了一晚上也没研究出个头绪来，干脆找点老版本安装，主要能用就行- -</p>
<p>不要下载最新版ss5-3.7.8-5，会有严重错误，一般情况下，ss5-3.6.4足够使用了。</p>
<p>安装之前检查下自己有没有安装pam-devel包，如果没有，直接用yum安装：</p>
<p>yum -y install pam-devel</p>
<p>开始下载安装：</p>
<p>wget http://jaist.dl.sourceforge.net/sourceforge/ss5/ss5-3.6.4-3.tar.gz<br />
tar -zxf ss5-3.6.4-3.tar.gz<br />
cd ss5-3.6.4<br />
./configure<br />
make&#038;&#038;make install</p>
<p>（默认安装在“/etc/opt/ss5/”目录，以后觉得没用了，直接删除该目录即可）</p>
<p>安装完毕，修改配置文件：/etc/opt/ss5/ss5.conf ，找到以下代码：</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelcn.info/centos5-%e5%ae%89%e8%a3%85socks5%e4%bb%a3%e7%90%86%e6%95%99%e7%a8%8b.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>一定要记得设置Default email address为Fail</title>
		<link>http://www.cpanelcn.info/%e4%b8%80%e5%ae%9a%e8%a6%81%e8%ae%b0%e5%be%97%e8%ae%be%e7%bd%aedefault-email-address%e4%b8%bafail.html</link>
		<comments>http://www.cpanelcn.info/%e4%b8%80%e5%ae%9a%e8%a6%81%e8%ae%b0%e5%be%97%e8%ae%be%e7%bd%aedefault-email-address%e4%b8%bafail.html#comments</comments>
		<pubDate>Tue, 25 Jan 2011 09:24:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cpanel使用技巧]]></category>
		<category><![CDATA[Cpanel email 设置]]></category>

		<guid isPermaLink="false">http://www.cpanelcn.info/?p=68</guid>
		<description><![CDATA[I stupidly didn’t set the default email address to :fail: on a couple of accounts on my cPanel server and found, while running a remote backup, that there were a few gigs of spam emails that were just sitting in those accounts. But after going through about a dozen of the 500+ pages in Horde [...]]]></description>
			<content:encoded><![CDATA[<p>I stupidly didn’t set the default email address to :fail: on a couple of accounts on my cPanel server and found, while running a remote backup, that there were a few gigs of spam emails that were just sitting in those accounts.</p>
<p>But after going through about a dozen of the 500+ pages in Horde to delete the message I figured there had to be a quicker way. Found it by clicking on the Folders icon in Horde, selecting Inbox, and selecting Empty folder. It prompted me to delete all the messages and a few minutes later they were gone and the disk space was back.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelcn.info/%e4%b8%80%e5%ae%9a%e8%a6%81%e8%ae%b0%e5%be%97%e8%ae%be%e7%bd%aedefault-email-address%e4%b8%bafail.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

