<?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; linux</title>
	<atom:link href="http://www.jiucool.com/cat/linux-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jiucool.com</link>
	<description>Say That What I Can Say!</description>
	<lastBuildDate>Thu, 12 Jan 2012 23:09:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom:link rel='hub' href='http://www.jiucool.com/?pushpress=hub'/>
		<item>
		<title>Kloxo 日志文件不可小视</title>
		<link>http://www.jiucool.com/kloxo-log-file/</link>
		<comments>http://www.jiucool.com/kloxo-log-file/#comments</comments>
		<pubDate>Fri, 17 Sep 2010 14:08:50 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[kloxo log]]></category>
		<category><![CDATA[kloxo 日志]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/kloxo-log-file/</guid>
		<description><![CDATA[前几天帮一位朋友装了kloxo控制面板，都配置好了！ 每天流量大概在近2万PV吧，运行起来512内存负载基本保持在0.02-0.06左右！看来PV到十几万也不成问题！

然后今天看了下，日志文件居然已经近3G了，平均每天产生日志文件近一个G，非常恐怖，必须进行处理，否则几天的时候你的服务器就会因为空间满而无法访问了！

 

 

所以先登录SSH手动删除之，然后写一个脚本每天指定时间自动清理一次日志吧！ 

<span class="readmore"><a href="http://www.jiucool.com/kloxo-log-file/" title="Kloxo 日志文件不可小视">Read More: 193 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>前几天帮一位朋友装了kloxo控制面板，都配置好了！ 每天流量大概在近2万PV吧，运行起来512内存负载基本保持在0.02-0.06左右！看来PV到十几万也不成问题！</p>
<p>然后今天看了下，日志文件居然已经近3G了，平均每天产生日志文件近一个G，非常恐怖，必须进行处理，否则几天的时候你的服务器就会因为空间满而无法访问了！</p>
<p><a href="http://pic.jiucool.com/2010/09/kloxo.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="kloxo日志文件" border="0" alt="kloxo日志文件" src="http://pic.jiucool.com/2010/09/kloxo_thumb.jpg" width="554" height="270" /></a> </p>
<p><a href="http://pic.jiucool.com/2010/09/kloxo2.jpg"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="kloxo日志文件2" border="0" alt="kloxo日志文件2" src="http://pic.jiucool.com/2010/09/kloxo2_thumb.jpg" width="399" height="157" /></a> </p>
<p>所以先登录SSH手动删除之，然后写一个脚本每天指定时间自动清理一次日志吧！ </p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/kloxo-log-file/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/kloxo-log-file/#comments">33 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/kloxo-log/" rel="tag">kloxo log</a>, <a href="http://www.jiucool.com/tag/kloxo-%e6%97%a5%e5%bf%97/" rel="tag">kloxo 日志</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/kloxo-log-file/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>Ubuntu one 云存储(及与dropbox比较)</title>
		<link>http://www.jiucool.com/ubuntu-one-cloud-storage-compare-with-dropbox/</link>
		<comments>http://www.jiucool.com/ubuntu-one-cloud-storage-compare-with-dropbox/#comments</comments>
		<pubDate>Wed, 05 May 2010 09:06:47 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[dropbox]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ubuntu one]]></category>
		<category><![CDATA[云存储]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/?p=7647</guid>
		<description><![CDATA[Ubuntu one 是什么?

Ubuntu One是由 Ubuntu 背后的公司 Canonical 所推出的一项网络服务。该服务能够存储你的文件，并允许你在多台电脑上同步，还可以与好友分享这些文件。你只需指定欲分享用户的Email地址，该用户就 会受到邀请邮件，接受验证后改文件就会自动出现在其“Shared With Me”文件夹中。 (网址为: http://www.ubuntuone.com/ )

<span class="readmore"><a href="http://www.jiucool.com/ubuntu-one-cloud-storage-compare-with-dropbox/" title="Ubuntu one 云存储(及与dropbox比较)">Read More: 1203 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<h3><span ><strong><a href="http://www.jiucool.com/tag/ubuntu/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ubuntu">Ubuntu</a> one 是什么?</strong></span></h3>
<p><a href="http://www.jiucool.com/ubuntu-one-cloud-storage-compare-with-dropbox/" target="_blank">Ubuntu One</a>是由 Ubuntu 背后的公司 Canonical 所推出的一项网络服务。该服务能够存储你的文件，并允许你在多台电脑上同步，还可以与好友分享这些文件。你只需指定欲分享用户的Email地址，该用户就 会受到邀请邮件，接受验证后改文件就会自动出现在其“Shared With Me”文件夹中。 (网址为: <a href="http://www.ubuntuone.com/" target="_blank">http://www.ubuntuone.com/</a> )</p>
<h3><strong><strong><span>Ubuntu one 存储容量为多少?</span><br />
</strong></strong></h3>
<p>Ubuntu One 为免费用户提供 2GB 空间，更多空间需要付费才能获得。 目前可以扩展到50G空间大小,月付金额为10USD.相信以后容量会有所提升.</p>
<p><a href="http://pic.jiucool.com/2010/05/sendpix0.jpg" target="_blank"><img style="display: block; float: none; margin-left: auto; margin-right: auto; border-width: 0px;" title="Ubuntu one " src="http://pic.jiucool.com/2010/05/sendpix0_thumb.jpg" border="0" alt="Ubuntu one " width="442" height="188" /></a></p>
<h3><span ><strong><strong><strong><strong>Ubuntu one 使用:</strong></strong></strong></strong></span></h3>
<p><a href="http://www.jiucool.com" target="_blank">我</a>安装的系统为ubuntu 10.04,系统安装好后,已经集成ubuntu one功能,不用另外安装客户端软件,直接填写好你注册的ubuntu one 帐号即可使用. 设置好后ubuntu one会跟dropbox一样,生成一个ubuntu one文件夹目录,你将需要与云端同步的文件或者文件夹放进来即可自动同步.</p>
<p><a href="http://pic.jiucool.com/2010/05/sendpix2.jpg" target="_blank"><img style="display: block; float: none; margin-left: auto; margin-right: auto; border-width: 0px;" title="Ubuntu one " src="http://pic.jiucool.com/2010/05/sendpix2_thumb.jpg" border="0" alt="Ubuntu one " width="504" height="324" /></a></p>
<p>在云端的web界面上同时可以完成文件夹的新增，文件上传、删除，还有，可 以向其它<a href="http://www.jiucool.com/ubuntu-one-cloud-storage-compare-with-dropbox/" target="_blank">Ubuntu One</a>用户发送共享。</p>
<p>另外ubuntu one 支持各种型号的手机进行同步,包括apple,balckberry,LG,Motorola,Nokia,Samsung,Sony Ericsson 以及还有N多国外手机.</p>
<h3><strong><strong><strong><strong><strong><strong><strong><strong>Ubuntu one 与dropbox比较:</strong></strong></strong></strong></strong></strong></strong></strong></h3>
<p>ubuntu one 与dropbox 是两款具有类似功能的产品,下面我们进行下比较:</p>
<p><strong>平台: </strong>相比较而言,dropbox可以在linux, mac,windows下使用,而Canonical公司表示没有计划开发Windows和Mac OS X本地<a href="http://www.jiucool.com/ubuntu-one-cloud-storage-compare-with-dropbox/" target="_blank">Ubuntu One</a>客户端。这点我们也是可以理解的,自己有自己的系统,为什么要为其他系统开发软件增加其用户量呢?</p>
<p><strong>容量: </strong>Ubuntu One与dropbox初始容量都为2G,但dropbox可以通过邀请好友机制最大扩容到8G容量大小.</p>
<p><strong>价格比较:</strong> 50G容量付费容量月付价格均为10USD,没啥区别.  但ubuntu one 目前只有一款付费产品,<a href="http://www.jiucool.com/tag/dropbox/" class="st_tag internal_tag" rel="tag" title="Posts tagged with dropbox">dropbox</a> 最大可升级到100GB.</p>
<p><strong>速度比较:</strong> 两款产品速度上感觉还算比较满意,十几M的文件,两分钟左右即同步完毕. 基本可以达到100KB/S左右的速度.  我用的线路为北京歌华2.5带宽.</p>
<p><strong>手机支持:</strong> ubuntu one 支持手机类型在30+以上,好多都是国外没听说过的型号,主流手机apple,balckberry,LG,Motorola,Nokia,Samsung,Sony Ericsson 全部支持,而dropbox 目前只支持 iphone android两款手机.</p>
<p>至于我们该选择哪一家的服务,大家自己斟酌下,  各具优缺点! 貌似现在大家用droxbox占大多数.　个人觉得ubuntu 更注重的是与系统的整合而非单单的数据同步.</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/ubuntu-one-cloud-storage-compare-with-dropbox/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/ubuntu-one-cloud-storage-compare-with-dropbox/#comments">34 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/dropbox/" rel="tag">dropbox</a>, <a href="http://www.jiucool.com/tag/ubuntu/" rel="tag">ubuntu</a>, <a href="http://www.jiucool.com/tag/ubuntu-one/" rel="tag">ubuntu one</a>, <a href="http://www.jiucool.com/tag/%e4%ba%91%e5%ad%98%e5%82%a8/" rel="tag">云存储</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/ubuntu-one-cloud-storage-compare-with-dropbox/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>64位Linux下 flash插件安装</title>
		<link>http://www.jiucool.com/under-the-64-bit-linux-install-flash/</link>
		<comments>http://www.jiucool.com/under-the-64-bit-linux-install-flash/#comments</comments>
		<pubDate>Sun, 02 May 2010 09:54:47 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[64bit linux]]></category>
		<category><![CDATA[flash linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/?p=7628</guid>
		<description><![CDATA[安装了64位Ubuntu 10.04 LTS (Lucid Lynx) 正式版，由于是64位的，N多软件还不兼容，不知这是不是自找麻烦，最主要的flash组件都费了好大劲才找到合适的版本。默认情况你到官网下载的是32位版本，安装后是无法使用的。

借助强大google，好不容易才找到了64全linux下的flash版本，网址是：http://labs.adobe.com/downloads/flashplayer10_64bit.html

<span class="readmore"><a href="http://www.jiucool.com/under-the-64-bit-linux-install-flash/" title="64位Linux下 flash插件安装">Read More: 587 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>安装了64位Ubuntu 10.04 LTS (Lucid Lynx) 正式版，由于是64位的，N多软件还不兼容，不知这是不是自找麻烦，最主要的flash组件都费了好大劲才找到合适的版本。默认情况你到官网下载的是32位版本，安装后是无法使用的。</p>
<p>借助强大google，好不容易才找到了64全linux下的flash版本，网址是：<a href="http://labs.adobe.com/downloads/flashplayer10_64bit.html" target="_blank">http://labs.adobe.com/downloads/flashplayer10_64bit.html</a></p>
<p>我在Ubuntu 10.04 LTS (Lucid Lynx)下是这样安装的（其他系统类同）：<br />
<code>wget http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.42.34.<a href="http://www.jiucool.com/tag/linux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with linux">linux</a>-x86_64.so.tar.gz</code></p>
<p>然后进行解压缩：<br />
<code> tar -zxvf libflashplayer-10.0.42.34.linux-x86_64.so.tar.gz</code></p>
<p>到此解压出来的是一个.so文件，仅此一个文件，然后将其移动至firefox 插件目录下即可：<br />
<code>sudo mv libflashplayer.so /usr/lib64/mozilla/plugins/libflashplayer.so</code></p>
<p>小小总结一下，如果你的电脑内存不是很大（小于3G）最好不要安装64位版本，否则只会带来诸多麻烦。</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/under-the-64-bit-linux-install-flash/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/under-the-64-bit-linux-install-flash/#comments">10 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/64bit-linux/" rel="tag">64bit linux</a>, <a href="http://www.jiucool.com/tag/flash-linux/" rel="tag">flash linux</a>, <a href="http://www.jiucool.com/tag/linux/" rel="tag">linux</a>, <a href="http://www.jiucool.com/tag/ubuntu/" rel="tag">ubuntu</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/under-the-64-bit-linux-install-flash/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>安装Ubuntu 10.04 LTS (Lucid Lynx) 正式版</title>
		<link>http://www.jiucool.com/install-ubuntu-10-04-lts-lucid-lynx-official-version/</link>
		<comments>http://www.jiucool.com/install-ubuntu-10-04-lts-lucid-lynx-official-version/#comments</comments>
		<pubDate>Sun, 02 May 2010 06:57:54 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Ubuntu 10.04 LTS]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/?p=7622</guid>
		<description><![CDATA[Ubuntu 10.04 LTS (Lucid Lynx) 正式版已经发布。于今天进行尝尝鲜。

采用最简单的安装方式，WUBI安装之，整个过程几分钟而已，Ubuntu 10.04 LTS采用了紫色的界面，貌似女孩们都喜欢紫色，难道是说迎合了女孩们的口味？

成功安装之后，进去之后发现，Ubuntu 10.04 LTS已经自带了五笔输入法，试用了一下自带的五笔输入法，用起来很舒服，跟WIN系统下打字速度没啥区别，这一点非常OK。之前每次安装这ubuntu没有五笔输入法很麻烦，还要另外安装。

<span class="readmore"><a href="http://www.jiucool.com/install-ubuntu-10-04-lts-lucid-lynx-official-version/" title="安装Ubuntu 10.04 LTS (Lucid Lynx) 正式版">Read More: 571 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p><a href="http://pic.jiucool.com/2010/05/ubuntu10.04LTS.png"><img class="aligncenter size-full wp-image-7624" title="ubuntu10.04LTS" src="http://pic.jiucool.com/2010/05/ubuntu10.04LTS.png" alt="ubuntu10.04LTS" width="496" height="381" /></a></p>
<p><strong><a href="http://www.jiucool.com/tag/ubuntu/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ubuntu">Ubuntu</a> 10.04 LTS (Lucid Lynx) 正式版已经发布。于今天进行尝尝鲜。</strong></p>
<p><strong>采用最简单的安装方式，WUBI安装之，整个过程几分钟而已，</strong><strong>Ubuntu 10.04 LTS采用了紫色的界面，貌似女孩们都喜欢紫色，难道是说迎合了女孩们的口味？</strong></p>
<p><strong>成功安装之后，进去之后发现，</strong><strong>Ubuntu 10.04 LTS已经自带了五笔输入法，试用了一下自带的五笔输入法，用起来很舒服，跟WIN系统下打字速度没啥区别，这一点非常OK。之前每次安装这ubuntu没有五笔输入法很麻烦，还要另外安装。</strong></p>
<p><strong><a href="http://pic.jiucool.com/2010/05/ubuntu-ibus.png"><img class="aligncenter size-full wp-image-7623" title="ubuntu-ibus－五笔输入法" src="http://pic.jiucool.com/2010/05/ubuntu-ibus.png" alt="ubuntu-ibus－五笔输入法" width="389" height="522" /></a></strong></p>
<p><strong>安装完系统后，除了配置输入法之后，最重要的就是配置如何访问twitter这样的网站才是最重要的，我采用的方法是这样的 </strong><a href="http://www.jiucool.com/blog/transmitted-using-a-remote-server-under-linux/" target="_blank">http://www.jiucool.com/blog/transmitted-using-a-remote-server-under-linux/</a> 然后firefox 上安装 autoproxy，一切OK，感觉ubuntu下“服务器转发形式”访问twitter这样的网站更快，应该不是我的心理作用吧！</p>
<p>我是安装的64位的，这样应该可以识别所有的内存，不过安装后发现内存只显示为3.8G，但总比之前安装32位系统好多了，32位系统只能识别到2.9G内存。</p>
<p><a href="http://pic.jiucool.com/2010/05/ubuntu-monitor.png"><img class="aligncenter size-medium wp-image-7625" title="ubuntu-monitor监视器" src="http://pic.jiucool.com/2010/05/ubuntu-monitor-500x416.png" alt="ubuntu-monitor监视器" width="500" height="416" /></a></p>
<p>现在系统自带了完美的五笔输入法，并且我们也解决了自由访问互联网的问题，那么一切就OK了，尽情享受新的系统吧^_^</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/install-ubuntu-10-04-lts-lucid-lynx-official-version/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/install-ubuntu-10-04-lts-lucid-lynx-official-version/#comments">29 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/ubuntu/" rel="tag">ubuntu</a>, <a href="http://www.jiucool.com/tag/ubuntu-10-04-lts/" rel="tag">Ubuntu 10.04 LTS</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/install-ubuntu-10-04-lts-lucid-lynx-official-version/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>Nginx 升级</title>
		<link>http://www.jiucool.com/nginx-upgrade-2/</link>
		<comments>http://www.jiucool.com/nginx-upgrade-2/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 11:54:37 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[nginx 升级]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/nginx-upgrade-2/</guid>
		<description><![CDATA[2010-02-01&#160; nginx-0.8.33 development and nginx-0.7.65 stable versions have been released. 既然稳定版已经出来了,那么还等啥,升级吧!

我之前有一篇日志,是关于nginx 升级的,Nginx 无缝升级到0.7.62,今天看了看有点小问题,在启动nginx 时会出现如下错误:

 unknown directive “stub_status” in /usr/local/nginx/conf/nginx.conf

<span class="readmore"><a href="http://www.jiucool.com/nginx-upgrade-2/" title="Nginx 升级">Read More: 425 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>2010-02-01&#160; <a href="http://nginx.org/en/download.html" target="_blank">nginx-0.8.33</a> development and <a href="http://nginx.org/en/download.html" target="_blank">nginx-0.7.65</a> stable versions have been released. 既然稳定版已经出来了,那么还等啥,升级吧!</p>
<p>我之前有一篇日志,是关于nginx 升级的,<a href="http://www.jiucool.com/nginx-upgrade/" target="_blank">Nginx 无缝升级到0.7.62</a>,今天看了看有点小问题,在启动nginx 时会出现如下错误:</p>
<p> <code>unknown directive “stub_status” in /usr/local/<a href="http://www.jiucool.com/tag/nginx/" class="st_tag internal_tag" rel="tag" title="Posts tagged with nginx">nginx</a>/conf/<a href="http://www.jiucool.com/tag/nginx/" class="st_tag internal_tag" rel="tag" title="Posts tagged with nginx">nginx</a>.conf</code>
<p>所以在编译时需要加一些参数:</p>
<p> <code>./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module</code>
<p>OK,其他都一样了. 详细请参考<a href="http://www.jiucool.com/nginx-upgrade/" target="_blank">Nginx 无缝升级到0.7.62</a>. </p>
<p>升级到nginx 0.7.65感觉性能更高,同等情况下占用服务器内存更少. 建议升级!</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/nginx-upgrade-2/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/nginx-upgrade-2/#comments">27 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/nginx/" rel="tag">nginx</a>, <a href="http://www.jiucool.com/tag/nginx-%e5%8d%87%e7%ba%a7/" rel="tag">nginx 升级</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/nginx-upgrade-2/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Linux安全之更改ssh端口</title>
		<link>http://www.jiucool.com/change-ssh-port/</link>
		<comments>http://www.jiucool.com/change-ssh-port/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 14:57:58 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ssh 端口]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/change-ssh-port/</guid>
		<description><![CDATA[为啥要更改ssh端口,一个词&#8221;安全&#8221;.

各位合租的同志们注意了,现在咱们的服务器ssh端口已经更改为10***,请更改下端口吧^_^

方法如下:

# 编辑 /etc/ssh/ssh_config

vi /etc/ssh/ssh_config

Port 22

<span class="readmore"><a href="http://www.jiucool.com/change-ssh-port/" title="Linux安全之更改ssh端口">Read More: 361 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>为啥要更改ssh端口,一个词&#8221;安全&#8221;.</p>
<p>各位合租的同志们注意了,现在咱们的服务器ssh端口已经更改为10***,请更改下端口吧^_^</p>
<p>方法如下:</p>
<pre><tt># 编辑 /etc/<a href="http://www.jiucool.com/tag/ssh/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ssh">ssh</a>/ssh_config
vi /etc/<a href="http://www.jiucool.com/tag/ssh/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ssh">ssh</a>/ssh_config
Port 22
Port 10***

# 编辑 /etc/<a href="http://www.jiucool.com/tag/ssh/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ssh">ssh</a>/sshd_config
vi /etc/<a href="http://www.jiucool.com/tag/ssh/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ssh">ssh</a>/sshd_config
#加入新的 Port 值
Port 22
Port 10***

# 保存后，重启 <a href="http://www.jiucool.com/tag/ssh/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ssh">SSH</a> 服务：
service sshd restart</tt></pre>
<p>为啥用两个端口呢?主要是为了防止修改出错导致SSH 再也登不上!更改SSH 客户端的连接端口，测试一下连接，如果新端口能连接成功，则再编辑上面两个文件，删除 Port 22 的配置。如果连接失败，而用 Port 22 连接后再重新配置。</p>
<p>让你们这些扫描程序整天在那儿扫,回家扫扫去.</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/change-ssh-port/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/change-ssh-port/#comments">37 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/ssh-%e7%ab%af%e5%8f%a3/" rel="tag">ssh 端口</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/change-ssh-port/feed/</wfw:commentRss>
		<slash:comments>37</slash:comments>
		</item>
		<item>
		<title>Linux 服务器禁止ping</title>
		<link>http://www.jiucool.com/linux-server-ban-ping/</link>
		<comments>http://www.jiucool.com/linux-server-ban-ping/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 14:26:22 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/linux-server-ban-ping/</guid>
		<description><![CDATA[晚上跟一个朋友聊着,发现他的服务器ping不通,原来服务器禁止喽! 为何禁止,这样可以防止一些扫瞄程序图谋不轨.可以让自己的服务器更安全,何乐而不为呢?所以也给自己服务器设置下.

本服务器为CentOs,方法如下,首先root登录服务器

 echo 1 &#62;/proc/sys/net/ipv4/icmp_echo_ignore_all 

此时服务器已禁止ping 

要开户ping 则

<span class="readmore"><a href="http://www.jiucool.com/linux-server-ban-ping/" title="Linux 服务器禁止ping">Read More: 283 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>晚上跟一个朋友聊着,发现他的服务器ping不通,原来服务器禁止喽! 为何禁止,这样可以防止一些扫瞄程序图谋不轨.可以让自己的服务器更安全,何乐而不为呢?所以也给自己服务器设置下.</p>
<p>本服务器为CentOs,方法如下,首先root登录服务器</p>
<p> <code>echo 1 &gt;/proc/sys/net/ipv4/icmp_echo_ignore_all </code>
<p>此时服务器已禁止ping </p>
<p>要开户ping 则</p>
<p> <code>echo 0 &gt;/proc/sys/net/ipv4/icmp_echo_ignore_all </code>
<p>OK,一切就是这么简单.</p>
<p>我在想是不是ssh 连接端口也要改下?不过还要挨个同志通知&#8230;&#8230;&#8230;&#8230;大家说呢?</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/linux-server-ban-ping/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/linux-server-ban-ping/#comments">14 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/linux/" rel="tag">linux</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/linux-server-ban-ping/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>SSH 基础教程(就是Linux常用命令啦)</title>
		<link>http://www.jiucool.com/ssh-based-tutorial-common-commands/</link>
		<comments>http://www.jiucool.com/ssh-based-tutorial-common-commands/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 13:27:46 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/?p=7114</guid>
		<description><![CDATA[自己整理会很累,直接把大猫的这文章转过来,很简单也很实用.这是大猫给他MT用户的指导文章,当然在咱这Linode 用户及所有开通SSH的主机也适用,哈哈&#8230;&#8230;.

对于已经非常熟悉的朋友完全可以跳过,对于以前linux命令接触不多的,我觉得还是很有帮助,起码简单的问题完全可以自己解决了.

大猫原文文章请进入:http://ooxx.me/common-ssh-commands.orz&#160; 

<span class="readmore"><a href="http://www.jiucool.com/ssh-based-tutorial-common-commands/" title="SSH 基础教程(就是Linux常用命令啦)">Read More: 2618 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>自己整理会很累,直接把大猫的这文章转过来,很简单也很实用.这是大猫给他MT用户的指导文章,当然在咱这Linode 用户及所有开通SSH的主机也适用,哈哈&#8230;&#8230;.</p>
<p>对于已经非常熟悉的朋友完全可以跳过,对于以前linux命令接触不多的,我觉得还是很有帮助,起码简单的问题完全可以自己解决了.</p>
<p>大猫原文文章请进入:<a title="http://ooxx.me/common-ssh-commands.orz" href="http://ooxx.me/common-ssh-commands.orz" target="_blank">http://ooxx.me/common-ssh-commands.orz</a>&#160; </p>
<p>适用范围: 有SSH权限的空间     <br />难度: easy     <br />学习时间: 5分钟     <br />工具: 推荐 <a href="http://jy.newhua.com/soft/20089.htm" target="_blank">SSH Secure Shell Client</a>     <br /><font color="#ff0000">红色为<a href="http://www.jiucool.com/" target="_blank">jiucool</a>补充</font></p>
<h5>1. 基础命令</h5>
<p><strong>A.显示文件源代码</strong>     <br /><code>cat ooxx.php</code>     <br />没错, cat 是一个常用查看源代码的命令,优点是很方便很可爱,缺点是会直接刷刷刷显示所有源代码,文件太长只能看到屁股后面的那坨代码</p>
<p><strong>B. 查看当前目录</strong>     <br /><code>pwd</code>     <br />pwd不是password,而是查看当前目录,会输出完整的路径</p>
<p><strong>C. 更改目录 Change Directory (cd)</strong>     <br /><code>cd /path/to/directory/</code>     <br />有DOS基础的同学应该会淫荡的一笑吧,路径可以用相对也可以用绝对</p>
<p><strong>D. 列出文件/子目录 Listing Files/SubFolders(ls)</strong>     <br /><code>ls</code>     <br />默认只显示文件名,你也可以带个参数玩,比如     <br /><code>ls -alh</code>     <br />带 -alh 输出会很爽&#8230; 自己试试, 大猫喜欢把 ls -alh 颜射为 ll     <br />-a显示全部文件     <br />-l比较详细的列表     <br />-h人类能看懂的比如把1024显示为1K</p>
<p><strong>E.帮助</strong>     <br /><code>命令 --help</code>     <br />任何命令后面带一个 &#8211;help 都会显示一个简洁版的帮助,记不住参数就查一下</p>
<p><strong>F.获取远程文件 wget</strong>     <br /><code>wget http://ooxx.me/me.jpg</code>     <br />就会获取远程的me.jpg文件到当前目录,一般搬家的时候用这个     <br />让服务器去获取另一个服务器的数据,速度会快的完全不像男人</p>
<p><strong>G.压缩解压缩</strong>     <br /><code>unzip wordpress.zip</code>     <br />如果文件是zip形式的,比如刚从wordpress主站wget了一个压缩包过来,只需要输入unzip 文件名,就可以解压缩到当前目录了     <br /><code>tar -czvf ooxx.tar.gz *</code>     <br />把当前目录所有文件以tar命令打包为ooxx.tar.gz文件     <br />-c创建     <br />-z用gzip压缩方式     <br />-v显示压缩过程     <br />-f搞成一坨file     <br /><code>tar -xzvf ooxx.tar.gz</code>     <br />解压缩 ooxx.tar.gz 里的文件到当前目录     <br />-x解压缩     <br />-z用gzip压缩方式     <br />-v显示压缩过程     <br />-f搞成一坨file</p>
<h5>2. 文件系统命令</h5>
<p><strong>A.显示磁盘使用率</strong>     <br /><code>df</code>     <br />显示整个主机的总容量以及比率</p>
<p><strong>B.列表文件/子目录使用率 (du)</strong>     <br /><code>du</code>     <br />会列出所有文件以及子目录的大小,不是人看的&#8230;     <br /><code>du -sh</code>     <br />-s就是summary,只输出当前文件夹总容量     <br />-h一般在linux就是human给人看的意思,会把1048580b转换为1mb显示     <br /><code>du -h --max-depth=1</code>     <br />嘿,只列出当前文件夹和第一级子目录占用大小</p>
<p><strong>C.删除文件 Remove files (rm) 少儿不宜的命令,总是需要确认</strong>     <br /><code>rm -vf miao.in</code>     <br />强制删除miao.in这个文件并不需确认,列出删除文件列表</p>
<p>强制删除,不要执行,除非你知道你在干嘛&#8230;    <br />-v一般v参数都是显示过程的意思     <br />-f 强奸的单词会不会拼? F-U-C-K的缩写,不确认直接F-word了     <br /><code>rm -rf ooxx</code>     <br />删除ooxx这个文件夹,包含它的子文件和子文件夹</p>
<p>删除文件用上面的命令,但删除文件夹的时候就需要跑下遍历了    <br />-r 比较本土化,是&quot;日&quot;的缩写,在所有命令里都是 recursive 的意思,有些命令是大写的 R 需要注意</p>
<p><strong>D. 拷贝文件 (cp)</strong>     <br /><code>cp ooxx.me /home/jiucool      <br /></code>复制ooxx.me这个文件到/home/jiucool 文件夹下     <br /><font color="#ff0000">cp&#160; –a&#160; /home/lovelygirl&#160; /home/jiucool      <br />复制lovelygirl 文件夹到 /home/jiucool 文件夹下</font></p>
<p><strong>E. 移动文件/重命名 (mv)</strong>     <br /><code>mv ooxx.me miao.in</code>     <br />重命名ooxx.me为miao.in     <br />如果加路径,就是移动到某个路径并重命名为miao.in     <br />和DOS不一样,移动文件和重命名换个思路,其实是一个套路,不是么?     <br /><font color="#ff0000">mv jiucool /home/jiucool      <br />将jiucool 移动到/home/jiucool文件夹下</font></p>
<p><strong>F. 创建空文件 (touch)</strong>     <br /><code>touch miao.in</code>     <br />这个很色情的命令,就是创建一个 miao.in 的空文件     <br />如果touch了已有的文件,则会更新那个文件的日期为当前     <br />如果touch次数多了,会high</p>
<h5>3. 文件权限</h5>
<p><strong>A. 更改文件权限 (chmod)</strong>     <br /><code>chmod 777 miao.in</code>     <br />默认文件为644,文件夹为755     <br /><font color="#ff0000">chmod&#160; -cfvR&#160; 777&#160; /home/jiucool.com      <br />将/home/jiucool.com 文件夹及下面所有文件权限修改为777</font></p>
<blockquote><p>TIP:      <br />1st digit=Owner; 2nd=Group; 3rd=Other       <br />(-rwxrwxwrx = 777, -rwxr-xr-x = 755, -rw-r&#8211;r&#8211; = 644, etc.)       <br />7 = Read + Write + Execute       <br />6 = Read + Write       <br />5 = Read + Execute       <br />4 = Read       <br />3 = Write + Execute       <br />2 = Write       <br />1 = Execute       <br />0 = All access denied</p>
</blockquote>
<h5>4. 高级命令</h5>
<p><strong>A. 查找. 常用命令,让我们来找一下10MB以上的文件吧</strong>     <br /><code>find . -type f -size +10000k -exec ls -lh {} \; | awk '{ print $5 &quot;: &quot; $9 }' |sort -n</code></p>
<p><strong>B. Grep, 手里握着大西瓜 </strong>    <br /><code>ls -alh | grep ooxx</code>     <br />只显示含有ooxx的那几列,当然你在cat的时候配合这个用找文件里的某些字段很方便</p>
<p><strong>C. 分页 (Less/More)</strong>     <br /><code>less miao.php</code>     <br />如果源代码很长,则会分页显示,上下箭头滚动,输入q退出     <br /><code>tail -n 1000 /var/log/httpd/error_log | more</code>     <br />可以用 | more 参数来滚动显示页面或行</p>
<h5>5. <a href="http://www.jiucool.com/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with mysql">MYSQL</a> 数据库</h5>
<p><strong>导出数据库</strong>     <br /><code>mysqldump -u 数据库用户名 -p 数据库名 &gt; db_ooxx.<a href="http://www.jiucool.com/tag/sql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sql">sql</a></code>     <br />导出数据库为db_ooxx.sql</p>
<p><strong>导入数据库</strong>     <br /><code>mysql -u 数据库用户名 -p 数据库名 &lt; db_ooxx.sql --default-character-set=utf8 </code>    <br />把当前目录的 db_ooxx.sql 以 utf8 编码导入,当然你原来是gbk就改成gbk     <br />中文blog经常遇到这个情况,一不小心就 ??? 满脑子都问号了</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/ssh-based-tutorial-common-commands/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/ssh-based-tutorial-common-commands/#comments">29 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/ssh/" rel="tag">ssh</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/ssh-based-tutorial-common-commands/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>Linode IP规则</title>
		<link>http://www.jiucool.com/linode-ip-rules/</link>
		<comments>http://www.jiucool.com/linode-ip-rules/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 05:58:35 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[linode IP]]></category>
		<category><![CDATA[linode 主机]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/linode-ip-rules/</guid>
		<description><![CDATA[默认情况下linode 只配有一个独立IP,当然你要另外添加也是可以的,但是你要另外添加除了配置系统文件外,你还要重启系统,这点比较烦人,重启过程可能要20S-50S左右的时间.

linode规定默认情况给你配一个独立IP,另外购买的话只允许你再购买一个IP,1USD一个月,如果要第三个IP或者更多的话,那么你就要给客服发送ticket 说明你为什么需要那么多IP?需要IP的理由是什么!通过后才会给你添加IP.

<span class="readmore"><a href="http://www.jiucool.com/linode-ip-rules/" title="Linode IP规则">Read More: 341 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>默认情况下linode 只配有一个独立IP,当然你要另外添加也是可以的,但是你要另外添加除了配置系统文件外,你还要重启系统,这点比较烦人,重启过程可能要20S-50S左右的时间.</p>
<p>linode规定默认情况给你配一个独立IP,另外购买的话只允许你再购买一个IP,1USD一个月,如果要第三个IP或者更多的话,那么你就要给客服发送ticket 说明你为什么需要那么多IP?需要IP的理由是什么!通过后才会给你添加IP.</p>
<p>第三,购买IP一个月1USD,如果你这个IP不要了,删除IP的同时会给你重启系统以生效.并且删除IP的同时要另外扣你0.97USD的费用.这点比较郁闷. 我刚买了一个IP,只是想试试删除有什么反应,一下2USD没有了.真折腾&#8230;&#8230;OH,my god,my money……..</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/linode-ip-rules/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/linode-ip-rules/#comments">12 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/ip/" rel="tag">IP</a>, <a href="http://www.jiucool.com/tag/linode-ip/" rel="tag">linode IP</a>, <a href="http://www.jiucool.com/tag/linode-%e4%b8%bb%e6%9c%ba/" rel="tag">linode 主机</a>, <a href="http://www.jiucool.com/tag/vps/" rel="tag">vps</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/linode-ip-rules/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Linode VPS 添加IP方法</title>
		<link>http://www.jiucool.com/linode-vps-tian-jia-ip-fang-fa/</link>
		<comments>http://www.jiucool.com/linode-vps-tian-jia-ip-fang-fa/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 19:43:44 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[centos]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/linode-vps-tian-jia-ip-fang-fa/</guid>
		<description><![CDATA[默认情况下,Linode VPS 是采用DHCP(DHCP解释见维基百科http://zh.wikipedia.org/zh/DHCP)方式分配IP,如果你购买了新的IP是不生效的.你要指定静态地址才行.

由于我这里装的是centos 这里只说下centos 5.4 &#38;Fedora 下面添加新的IP的设置方法吧.

首先VI 编辑File: /etc/sysconfig/network-scripts/ifcfg-eth0

<span class="readmore"><a href="http://www.jiucool.com/linode-vps-tian-jia-ip-fang-fa/" title="Linode VPS 添加IP方法">Read More: 1129 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>默认情况下,Linode <a href="http://www.jiucool.com/tag/vps/" class="st_tag internal_tag" rel="tag" title="Posts tagged with vps">VPS</a> 是采用DHCP(DHCP解释见维基百科<a title="http://zh.wikipedia.org/zh/DHCP" href="http://zh.wikipedia.org/zh/DHCP" target="_blank">http://zh.wikipedia.org/zh/DHCP</a>)方式分配IP,如果你购买了新的IP是不生效的.你要指定静态地址才行.</p>
<p>由于我这里装的是centos 这里只说下centos 5.4 &amp;Fedora 下面添加新的IP的设置方法吧.</p>
<p><strong>首先VI 编辑File:</strong> <em>/etc/sysconfig/network-scripts/ifcfg-eth0</em></p>
<pre># Configuration for eth0
DEVICE=eth0
BOOTPROTO=none

# This line ensures that the interface will be brought up during boot.
ONBOOT=yes 

# eth0 - This is the main <a href="http://www.jiucool.com/tag/ip/" class="st_tag internal_tag" rel="tag" title="Posts tagged with IP">IP</a> address that will be used for most outbound connections.
# The address, netmask and gateway are all necessary.
IPADDR=12.34.56.78  (这里是你的第一个IP地址)
NETMASK=255.255.255.0 (这里是子网掩码)
GATEWAY=12.34.56.1 (网关)</pre>
<p><strong>添加第二个IP,  File:</strong> <em>/etc/sysconfig/network-scripts/ifcfg-eth0:0</em></p>
<pre># Configuration for eth0:0
DEVICE=eth0:0
BOOTPROTO=none

# This line ensures that the interface will be brought up during boot.
ONBOOT=yes

# eth0:0
IPADDR=34.56.78.90
NETMASK=255.255.255.0
GATEWAY=12.34.56.1
</pre>
<p><strong>添加第三个IP File:</strong> <em>/etc/sysconfig/network-scripts/ifcfg-eth0:1</em></p>
<pre># Configuration for eth0:1
DEVICE=eth0:1
BOOTPROTO=none

# This line ensures that the interface will be brought up during boot.
ONBOOT=yes

# eth0:1 - Private IPs have no gateway (they are not publicly routable) so all you need to
# specify is the address and netmask.
IPADDR=192.168.133.234
NETMASK=255.255.128.0
GATEWAY=12.34.56.1</pre>
<p>当然这一切配置完之后,执行 service network restart即可.</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/linode-vps-tian-jia-ip-fang-fa/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/linode-vps-tian-jia-ip-fang-fa/#comments">12 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/centos/" rel="tag">centos</a>, <a href="http://www.jiucool.com/tag/linux/" rel="tag">linux</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/linode-vps-tian-jia-ip-fang-fa/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Nginx 网站绑定独立IP</title>
		<link>http://www.jiucool.com/nginx-binding-independent-ip/</link>
		<comments>http://www.jiucool.com/nginx-binding-independent-ip/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 17:09:31 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[nginx.conf]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/nginx-binding-independent-ip/</guid>
		<description><![CDATA[在google里还是其他搜索引擎查找nginx绑定独立IP的信息都没找到. google也有不懂的东西嘛,哈.

最后还是查看nginx官方文档才得以解决.一般nginx添加网站后默认是这样的(官方示例):

http {

  server {

    listen          80;

    server_name     www.domain1.com;

<span class="readmore"><a href="http://www.jiucool.com/nginx-binding-independent-ip/" title="Nginx 网站绑定独立IP">Read More: 790 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>在google里还是其他搜索引擎查找<a href="http://www.jiucool.com/nginx-binding-independent-ip/" target="_blank">nginx</a>绑定独立IP的信息都没找到. google也有不懂的东西嘛,哈.</p>
<p>最后还是查看nginx官方文档才得以解决.一般nginx添加网站后默认是这样的(官方示例):</p>
<pre>http {
  server {
    listen          80;
    server_name     www.domain1.com;
    access_log      logs/domain1.access.log main;

    location / {
      index index.html;
      root  /var/www/domain1.com/htdocs;
    }
  }

  server {
    listen          80;
    server_name     www.domain2.com;
    access_log      logs/domain2.access.log main;

    location / {
      index index.html;
      root  /var/www/domain2.com/htdocs;
    }
  }
}</pre>
<p>很多朋友说要绑定<a href="http://www.jiucool.com/nginx-binding-independent-ip/" target="_blank">独立IP</a>直接这样写:</p>
<pre>listen  69.164.196.163:80;</pre>
<p>假如添加一个网站这样是没问题的,但如果你添加两个网站那么问题就来了,会提示端口被占用的错误.所以这样&quot;<a href="http://www.jiucool.com/tag/ip/" class="st_tag internal_tag" rel="tag" title="Posts tagged with IP">IP</a>:端口 &quot;的写法对于多网站多IP显然是行不通的.查看了官方文档得出了答案,官方地址为:<a title="http://wiki.nginx.org/NginxHttpCoreModule#listen" href="http://wiki.nginx.org/NginxHttpCoreModule#listen" target="_blank">http://wiki.nginx.org/NginxHttpCoreModule#listen</a></p>
<p>写法有如下几种</p>
<pre>listen 127.0.0.1:8000;
listen 127.0.0.1;
listen 8000;
listen *:8000;
listen localhost:8000;</pre>
<p>但是看到官方说If only address is given, the default port is 80.也就是跟&quot;IP:端口&quot;是一样的道理,但加上端口就不行,去掉端口就OK,很是奇怪,不过最终问题得以解决.直接这样写就OK 了</p>
<pre>listen  69.164.196.163;</pre>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/nginx-binding-independent-ip/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/nginx-binding-independent-ip/#comments">9 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/nginx/" rel="tag">nginx</a>, <a href="http://www.jiucool.com/tag/nginx-conf/" rel="tag">nginx.conf</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/nginx-binding-independent-ip/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>直接导入大容量SQL数据库文件</title>
		<link>http://www.jiucool.com/import-big-mysql/</link>
		<comments>http://www.jiucool.com/import-big-mysql/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 10:45:39 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpMyAdmin]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/import-big-mysql/</guid>
		<description><![CDATA[不少朋友备份数据库喜欢直接导出sql文件连压缩也不压缩,这样就导致了一个问题,导入SQL 文件过大.少则十几M ,大则上百M.而用phpmyadmin导入几乎无法导入.phpmyadmin默认导入数据库大小为2M .你这么大SQL文件肯定导入不成功.

那么如果稍大的SQL文件如何导入呢,可以如此进行:



通过FTP把数据库的SQL文件上传到网站的某目录下

登录你的SSH 客户端,进入你上传的数据库所在文件目录.比如你上传的数据库名称为:db.sql.

<span class="readmore"><a href="http://www.jiucool.com/import-big-mysql/" title="直接导入大容量SQL数据库文件">Read More: 477 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>不少朋友备份数据库喜欢直接导出sql文件连压缩也不压缩,这样就导致了一个问题,导入SQL 文件过大.少则十几M ,大则上百M.而用phpmyadmin导入几乎无法导入.phpmyadmin默认导入数据库大小为2M .你这么大SQL文件肯定导入不成功.</p>
<p>那么如果稍大的SQL文件如何导入呢,可以如此进行:</p>
<ol>
<li>通过FTP把数据库的SQL文件上传到网站的某目录下</li>
<li>登录你的SSH 客户端,进入你上传的数据库所在文件目录.比如你上传的数据库名称为:db.<a href="http://www.jiucool.com/tag/sql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sql">sql</a>.</li>
<li>然后在SSH里输入命令: <code><strong>/usr/local/<a href="http://www.jiucool.com/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with mysql">mysql</a>/bin/<tt><a href="http://www.jiucool.com/import-big-mysql/" target="_blank">mysql</a> -uroot -ppassword database &lt; db.sql --default-character-set=utf8 </strong></code>(根据你的数据库编码而定)</tt></li>
<li>OK,完成.</li>
</ol>
<p>其中root表示数据库用户名，password表示你数据库的密码，database表示要导入的数据库的名字，db.sql表示数据库文件的文件名。</p>
<p>这种方法很简便,不过如果你主机不支持SSH的话,那么可能参考这里,点击查看此文章:<a href="http://www.jiucool.com/mysql-database-backup-and-large-import/" target="_blank">Mysql大数据库的备份与导入</a>. 这种方法更为傻瓜化.^_^</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2009. |
<a href="http://www.jiucool.com/import-big-mysql/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/import-big-mysql/#comments">16 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/mysql/" rel="tag">mysql</a>, <a href="http://www.jiucool.com/tag/phpmyadmin/" rel="tag">phpMyAdmin</a>, <a href="http://www.jiucool.com/tag/sql/" rel="tag">sql</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/import-big-mysql/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>vsftpd添加用户后无法登录解决办法</title>
		<link>http://www.jiucool.com/vsftp-add-a-user-can-not-log-in-the-solution/</link>
		<comments>http://www.jiucool.com/vsftp-add-a-user-can-not-log-in-the-solution/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 20:38:44 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[vsftpd 无法登录]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/vsftp-add-a-user-can-not-log-in-after-the-solution/</guid>
		<description><![CDATA[之前一直安装完vsftpd 之后一直只用一个帐号登录!今天晚上跟小狼同学谈论之中我自己也试了下,结果出现成功添加用户但无法登录的情况!如下:

[右] 正在连接到 linode-test -&#62; IP=69.164.198.23 PORT=21

[右] 已连接到 linode-test

[右] 220 Welcome to "jiucool.com" FTP service.

[右] USER jiucool

<span class="readmore"><a href="http://www.jiucool.com/vsftp-add-a-user-can-not-log-in-the-solution/" title="vsftpd添加用户后无法登录解决办法">Read More: 698 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>之前一直安装完vsftpd 之后一直只用一个帐号登录!今天晚上跟<a href="http://www.dfwolf.org" target="_blank">小狼</a>同学谈论之中我自己也试了下,结果出现成功添加用户但无法登录的情况!如下:</p>
<pre>[右] 正在连接到 linode-test -&gt; <a href="http://www.jiucool.com/tag/ip/" class="st_tag internal_tag" rel="tag" title="Posts tagged with IP">IP</a>=69.164.198.23 PORT=21
[右] 已连接到 linode-test
[右] 220 Welcome to "jiucool.com" FTP service.
[右] USER jiucool
[右] 331 Please specify the password.
[右] PASS (隐藏)
[右] <span style="color: #ff0000;">500 OOPS: cannot change directory:/home/jiucool/user0</span>
[右] 连接失败</pre>
<p>网上得到解决办法是:</p>
<pre>在终端输入命令：

setsebool ftpd_disable_trans 1
service vsftpd restart</pre>
<p><strong>其实这样并不能解决我所遇到的问题!</strong></p>
<p>我添加用户方法如下:</p>
<pre>#mkdir /home/jiucool/user0
#useradd -d /home/jiucool/user0 jiucool
(添加用户jiucool至家目录/home/jiucool/user0,开放SSH权限)
#passwd jiucool</pre>
<p>然后登录 FTP是上不去的!为啥呢,我找了下原因,发现是这样的,由于执行上面命令时我是用的root帐户,所以创建的目录所有者是root 所有组也是root ,并且默认权限为700,这样你新添加的用户肯定是登录不上FTP的啦!</p>
<p><strong>如何解决呢?</strong></p>
<p>你只要将user0目录 所有者及所有组修改为你添加的用户即可!就这么简单!</p>
<p><strong>在linux当中目录权限是相当严格的,在使用时大家一定要注意啦!一个小小失误足以让你的帐号无法登录!</strong></p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2009. |
<a href="http://www.jiucool.com/vsftp-add-a-user-can-not-log-in-the-solution/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/vsftp-add-a-user-can-not-log-in-the-solution/#comments">5 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/vsftpd-%e6%97%a0%e6%b3%95%e7%99%bb%e5%bd%95/" rel="tag">vsftpd 无法登录</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/vsftp-add-a-user-can-not-log-in-the-solution/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>VPS 无缝迁移及快速安装</title>
		<link>http://www.jiucool.com/vps-seamless-migration-and-rapid-installation/</link>
		<comments>http://www.jiucool.com/vps-seamless-migration-and-rapid-installation/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 14:06:50 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[VPS搬家]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/vps-seamless-migration-and-rapid-installation-of/</guid>
		<description><![CDATA[之前用的国内某家代理的美国VPS,刚开始感觉速度不错,可后来速度越来越不行!当然不是我个人感觉,也有不少朋友是同学的感觉!

今天晚上咬咬牙,立马又购买了美国一老牌VPS www.linode.com ,这家不论国内还是国外口碑相当不错,国内一般是购买的fremont CA 机房,不过今天我购买的时候这里机房全部卖完,估计与国内形势不好,大家疯狂出国有关!我选择了Newark, NJ 机房,不过我给linode.com 客服发了消息,如果fremont CA 一旦有位置立马给我转移过去,随后立马收到客服回复,已经将我的VPS加入转移队列中,至于文件之类一切自动转移!不过我感觉现在速度也比以前快!

<span class="readmore"><a href="http://www.jiucool.com/vps-seamless-migration-and-rapid-installation/" title="VPS 无缝迁移及快速安装">Read More: 4107 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>之前用的国内某家代理的美国VPS,刚开始感觉速度不错,可后来速度越来越不行!当然不是我个人感觉,也有不少朋友是同学的感觉!</p>
<p>今天晚上咬咬牙,立马又购买了美国一老牌VPS <a href="http://www.jiucool.com/linode" target="_blank">www.linode.com</a> ,这家不论国内还是国外口碑相当不错,国内一般是购买的fremont CA 机房,不过今天我购买的时候这里机房全部卖完,估计与国内形势不好,大家疯狂出国有关!我选择了Newark, NJ 机房,不过我给linode.com 客服发了消息,如果fremont CA 一旦有位置立马给我转移过去,随后立马收到客服回复,已经将我的VPS加入转移队列中,至于文件之类一切自动转移!不过我感觉现在速度也比以前快!</p>
<p>看了下linode.com 的服务器配置,CPU四核 二级缓存6M,比之前的强了不是一个档次!值得使用!</p>
<p>所有网站及VPS安装配置时间不过个把小时,时间够快了吧! 这里要感谢下Licess 小朋友的东东! 详情见:<a title="http://blog.licess.cn/lnmp/" href="http://blog.licess.cn/lnmp/" target="_blank">http://blog.licess.cn/lnmp/</a> 用此包安装速度快,节省了不少时间,如果自己一个包一个包安装不知多长时间才能安装完!</p>
<p>这里也友情宣传下,以下内容来自:<a title="http://blog.licess.cn/lnmp/" href="http://blog.licess.cn/lnmp/" target="_blank">http://blog.licess.cn/lnmp/</a></p>
<p>LNMP Ver0.3软件版本说明(<strong>2009年11月17日更新添加虚拟主机面板程序</strong>)：</p>
<p>Nginx：0.7.63   <br />PHP：5.2.10    <br /><a href="http://www.jiucool.com/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with mysql">MySQL</a>：5.1.35    <br />Zend Optimizer ：3.3.9    <br />eaccelerator：0.9.5.3</p>
<p><strong>使用说明:</strong></p>
<p>如果系统预安装Apahce或你已经安装Apache，请先运行yum remove httpd，删除Apache！</p>
<p>登陆Linux,下载LNMP压缩包，并解压. (一些朋友可能不知道怎么弄，登陆VPS或者主机，</p>
<p>执行命令 wget <a href="http://soft.vpser.net/lnmp/lnmp0.3.tar.gz">http://soft.vpser.net/lnmp/lnmp0.3.tar.gz</a> ,将lnmp0.3.tar.gz下载到VPS中，执行 tar zxvf lnmp0.3.tar.gz 解压LNMP一键安装包)。</p>
<p>执行命令 cd lnmp0.3</p>
<p>然后再执行./centos.sh ，输入要绑定的域名，回车后。程序会自动安装编译Nginx、PHP、MySQL、phpMyAdmin、eAcelerator这几个软件。</p>
<p>注：如果需要安装eAcelerator，执行如下命令：./eaccelerator.sh 就会自动安装。</p>
<p>如需卸载，执行./uninstall.sh 就会自动卸载Nginx、PHP、MySQL。 </p>
<p><strong>自动添加虚拟主机：</strong></p>
<p>如果是11月17日之前下载的lnmp需要修改nginx.conf，再最后一个 }&#160; 前加入include vhost/*.conf;</p>
<p>运行./vhost.sh ,根据提示首先输入域名，再输入目录即可完成添加，直接到创建的目录上传文件即可。</p>
<p><strong>程序安装路径：</strong></p>
<p>MySQL :&#160;&#160; /usr/local/mysql   <br />MySQL数据库:/usr/local/mysql/var    <br />PHP :&#160;&#160;&#160;&#160; /usr/local/php    <br />Nginx :&#160;&#160; /usr/local/nginx    <br />PHPMyAdmin /home/wwwroot/phpmyadmin    <br />Web目录&#160;&#160;&#160; /home/wwwroot</p>
<p>MySQL默认用户名：root 密码：root</p>
<p>手动添加虚拟主机：</p>
<p>修改/usr/local/nginx/conf/nginx.conf 文件</p>
<p>在</p>
<p>server</p>
<p> {</p>
<p>&#160; listen&#160; 80;</p>
<p>&#160; server_name&#160; status.lnmp.org;</p>
<p>&#160; location / {</p>
<p>&#160;&#160; stub_status on;</p>
<p>&#160;&#160; access_log&#160;&#160; off;</p>
<p>&#160; }</p>
<p> }</p>
<p>后面添加上下面代码：</p>
<p>server</p>
<p> {</p>
<p>&#160; listen&#160;&#160;&#160;&#160;&#160;&#160; 80;</p>
<p>&#160; server_name <a href="http://www.lnmp.org">www.lnmp.org</a>;</p>
<p>&#160; index index.html index.htm index.php;</p>
<p>&#160; root&#160; /home/wwwroot/abc;</p>
<p>&#160; location ~ .*\.(php|php5)?$</p>
<p>&#160;&#160; {</p>
<p>&#160;&#160;&#160; fastcgi_pass&#160; unix:/tmp/php-cgi.sock;</p>
<p>&#160;&#160;&#160; #fastcgi_pass&#160; 127.0.0.1:9000;</p>
<p>&#160;&#160;&#160; fastcgi_index index.php;</p>
<p>&#160;&#160;&#160; include fcgi.conf;</p>
<p>&#160;&#160; }</p>
<p>&#160; location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$</p>
<p>&#160;&#160; {</p>
<p>&#160;&#160;&#160; expires&#160;&#160;&#160;&#160;&#160; 30d;</p>
<p>&#160;&#160; }</p>
<p>&#160; location ~ .*\.(js|css)?$</p>
<p>&#160;&#160; {</p>
<p>&#160;&#160;&#160; expires&#160;&#160;&#160;&#160;&#160; 12h;</p>
<p>&#160;&#160; }</p>
<p>&#160; access_log&#160;&#160; off;</p>
<p> }</p>
<p>再执行kill -HUP `cat /usr/local/nginx/logs/nginx.pid`虚拟机就生效了。</p>
<p>通过下面这几个链接查看phpinfo和管理MySQL</p>
<p>phpinfo&#160;&#160;&#160; <a href="http://domain.name/phpinfo.php">http://domain.name/phpinfo.php</a></p>
<p>phpMyAdmin <a href="http://domain.name/phpmyadmin">http://domain.name/phpmyadmin</a></p>
<p>PHP探针：&#160; <a href="http://domain.name/p.php">http://domain.name/p.php</a></p>
<p>此版本为测试版本，已经在<a href="http://www.swvps.com/affiliates/jrox.php?id=1106">SWVPS</a>、<a href="http://www.diavps.cn/client/aff.php?aff=002">DiaVPS</a>、<a href="http://rashost.com/vip008">RASHOST</a>、<a href="http://thenynocportal.com/aff.php?aff=087">thenynoc.com</a>、BoxVPS、VMware CentOS最小化安装 上测试成功。</p>
<p>演示站点：<a href="http://www.vpser.net">http://www.vpser.net</a></p>
<p>有任何问题请到 <a href="http://blog.licess.cn/lnmp/">http://blog.licess.cn/lnmp/</a> 。</p>
<p>QQ交流群：12327692 (已升级高级群，可加) 2群：15762671</p>
<p>交流论坛： <a href="http://bbs.vpser.net/forum-25-1.html">http://bbs.vpser.net/forum-25-1.html</a></p>
<p>下载地址：</p>
<p>集成软件包(所需软件已打包在内)：<a href="http://soft.vpser.net/lnmp/lnmp0.3.tar.gz">http://soft.vpser.net/lnmp/lnmp0.3.tar.gz</a></p>
<p>安装包(程序自动链接网站下载)：<a href="http://soft.vpser.net/lnmp/lnmp0.3.tar.gz">http://soft.vpser.net/lnmp/lnmp0.3.tar.gz</a></p>
<p>友情提示：Linux下操作请注意大小写。</p>
<p>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</p>
<p>LNMP是一个基于CentOS编写的Nginx、MySQL、PHP、phpMyAdmin、eAcelerator一键安装包。可以在VPS、独立主机上轻松的安装LNMP生产环境。</p>
<p>2009年3月27日发布vsftpd已经安装配置包，<a href="http://blog.licess.cn/uploads/200903/vsftpd-for-LNMP.zip">下载</a>。地址：<a href="http://blog.licess.cn/uploads/200903/vsftpd-for-LNMP.zip">http://blog.licess.cn/uploads/200903/vsftpd-for-LNMP.zip</a></p>
<p>2009年3月2日修复执行startup.sh时提示:&#160; /bin/bash^M: bad interpreter: No such file or directory 的错误。</p>
<p>使用说明(2009年3月2日修改):</p>
<p>登陆Linux,<a href="http://blog.licess.cn/uploads/200901/LNMP.zip">下载LNMP压缩包</a>，并解压. (一些朋友可能不知道怎么弄，登陆VPS或者主机，执行命令 wget <a href="http://blog.licess.cn/uploads/200901/LNMP.zip">http://blog.licess.cn/uploads/200901/LNMP.zip</a> ,将LNMP.zip下载到VPS中，执行 unzip LNMP.zip 解压LNMP一键安装包)。</p>
<p>执行./down.sh下载LNMP所要的安装包 ，如果执行后提示：-bash: ./down.sh: Permission denied ，这个是因为权限不够引起的，可以执行命令：chmod +x run.sh 来加上执行权限。</p>
<p>然后再执行./install.sh ，输入要绑定的域名，回车后。程序会自动安装编译Nginx、PHP、MySQL、phpMyAdmin、eAcelerator这几个软件。</p>
<p><strong>安装vsftp：</strong></p>
<p>下载vsftpd-for-LNMP.zip：执行 wget <a href="http://blog.licess.cn/uploads/200903/vsftpd-for-LNMP.zip">http://blog.licess.cn/uploads/200903/vsftpd-for-LNMP.zip</a></p>
<p>unzip vsftpd-for-LNMP.zip</p>
<p>cd vsftpd-for-LNMP</p>
<p>chmod +x installvsftpd.sh</p>
<p>./installvsftpd.sh</p>
<p>安装完毕后即可使用你的SSH的帐号和密码登录，也可以修改/etc/vsftpd.chroot限制用户在家目录里。默认添加了adminftp用户，但是没有设置密码，可以执行passwd adminftp 来设置密码，或者userdel admintpd 删除用户。</p>
<p>执行 adduser -d /web/www/user1 -s /sbin/nologin user1&#160; 来添加一个不能SSH登录的FTP帐号，家目录为/web/www/user1 但是没有限制，添加限制，请修改/etc/vsftpd.chroot 添加要限制的用户。</p>
<p>程序安装路径：</p>
<p>MySQL :&#160;&#160; /usr/local/mysql</p>
<p>PHP :&#160;&#160;&#160;&#160; /usr/local/php</p>
<p>Nginx :&#160;&#160; /usr/local/nginx</p>
<p>PHPMyAdmin /web/www/phpmyadmin</p>
<p>Web目录&#160;&#160;&#160; /web/www</p>
<p>让Nginx开机后手动执行 /root/run.sh 后Nginx会运行 ，开机自动运行可以运行 LNMP目录下面的 startup.sh 文件即可。</p>
<p>opt.sh 为优化文件，如果内存小于128MB可以通过执行 ./opt.sh 添加swap分区，并修改时区为东8区。注：并不一定在所有的VPS上都可以添加swap分区，swvps不可以，其他没有测试。</p>
<p>通过下面这几个链接查看phpinfo和管理MySQL</p>
<p>phpinfo&#160;&#160;&#160; <a href="http://ip/phpinfo.php">http://ip/phpinfo.php</a></p>
<p>phpMyAdmin <a href="http://ip/phpmyadmin">http://ip/phpmyadmin</a></p>
<p>此版本为测试版本，已经在SWVPS、thenynoc.com、VMware CentOS最小化安装 上测试成功。</p>
<p>演示站点：<a href="http://bbs.xlinux.org/">http://bbs.xlinux.org</a></p>
<p>有任何问题请到 <a href="http://blog.licess.cn/lnmp/">http://blog.licess.cn/lnmp/</a> 。</p>
<p>QQ交流群：12327692 (已升级高级群，可加) 2群：15762671</p>
<p>交流论坛： <a href="http://bbs.vpser.net/forum-25-1.html">http://bbs.vpser.net/forum-25-1.html</a></p>
<p>下载地址：<a href="http://blog.licess.cn/uploads/200901/LNMP.zip">http://blog.licess.cn/uploads/200901/LNMP.zip </a></p>
<p><strong>友情提示：Linux下操作请注意大小写。</strong></p>
<p><strong><a href="http://www.vpser.net/build/vps-nginx-mysql-php.html">VPS初始化及Nginx+MySQL+PHP/PHPMyAdmin安装优化</a></strong></p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2009. |
<a href="http://www.jiucool.com/vps-seamless-migration-and-rapid-installation/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/vps-seamless-migration-and-rapid-installation/#comments">29 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/vps%e6%90%ac%e5%ae%b6/" rel="tag">VPS搬家</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/vps-seamless-migration-and-rapid-installation/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>恐怖的MySql-bin.0000X日志文件</title>
		<link>http://www.jiucool.com/terror-mysql-bin-0000x-log-file/</link>
		<comments>http://www.jiucool.com/terror-mysql-bin-0000x-log-file/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 06:45:13 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql-bin 日志]]></category>
		<category><![CDATA[mysql-bin.0000x]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/terror-mysql-bin-0000x-log-file/</guid>
		<description><![CDATA[之前发现自己10G的服务器空间大小,用了几天就剩下5G了,自己上传的文件才仅仅几百M而已,到底是什么东西占用了这么大空间呢?今天有时间彻底来查了一下:



看下上面的目录web根目录是放在/home 里面的,所有文件加起来才不到300M,而服务器上已经占用了近5G空间,恐怖吧,最后经我一步一步查询得知,原来是这个文件夹占了非常多的空间资源:



原来如此,是mysql文件夹下的var目录占用空间最大,那里面是啥 内容呢?我们来看下:

<span class="readmore"><a href="http://www.jiucool.com/terror-mysql-bin-0000x-log-file/" title="恐怖的MySql-bin.0000X日志文件">Read More: 1378 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>之前发现自己10G的服务器空间大小,用了几天就剩下5G了,自己上传的文件才仅仅几百M而已,到底是什么东西占用了这么大空间呢?今天有时间彻底来查了一下:</p>
<p><a title="mysql-log" rel="lightbox" href="http://pic.jiucool.com/2009/MySql_C81A/mysqllog.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="mysql-log" src="http://pic.jiucool.com/2009/MySql_C81A/mysqllog_thumb.jpg" border="0" alt="mysql-log" width="381" height="320" /></a></p>
<p>看下上面的目录web根目录是放在/home 里面的,所有文件加起来才不到300M,而服务器上已经占用了近5G空间,恐怖吧,最后经我一步一步查询得知,原来是这个文件夹占了非常多的空间资源:</p>
<p><a title="mysql-log" rel="lightbox" href="http://pic.jiucool.com/2009/MySql_C81A/mysqllog1.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="mysql-log1" src="http://pic.jiucool.com/2009/MySql_C81A/mysqllog1_thumb.jpg" border="0" alt="mysql-log1" width="422" height="171" /></a></p>
<p>原来如此,是mysql文件夹下的var目录占用空间最大,那里面是啥 内容呢?我们来看下:</p>
<p><a title="mysql-log" rel="lightbox" href="http://pic.jiucool.com/2009/MySql_C81A/mysqllog2.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="mysql-log2" src="http://pic.jiucool.com/2009/MySql_C81A/mysqllog2_thumb.jpg" border="0" alt="mysql-log2" width="527" height="245" /></a></p>
<p>发现了如此多的 <a href="http://www.jiucool.com/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with mysql">mysql</a>-bin.0000X文件,这是什么东西呢?原来这是mysql的操作日志文件.我才几十M的数据库,操作日志居然快3G大小了.</p>
<h2>如何删除mysql-bin.0000X 日志文件呢?</h2>
<p><span style="color: #ff0000;">红色表示输入的命令.</span></p>
<p>[root@jiucool var]# <span style="color: #ff0000;">/usr/local/mysql/bin/mysql -u root -p<br />
</span>Enter password:  (<span style="color: #ff0000;">输入密码</span>)<br />
Welcome to the MySQL monitor.  Commands end with ; or \g.<br />
Your MySQL connection id is 264001<br />
Server version: 5.1.35-log Source distribution</p>
<p>Type &#8216;help;&#8217; or &#8216;\h&#8217; for help. Type &#8216;\c&#8217; to clear the current input statement.</p>
<p>mysql&gt; <span style="color: #ff0000;">reset master; (清除日志文件)<br />
</span>Query OK, 0 rows affected (8.51 sec)</p>
<p>mysql&gt;</p>
<p>好了,我们再来查看下mysql文件夹占用多少空间?</p>
<p>[root@jiucool var]# <span style="color: #ff0000;">du -h &#8211;max-depth=1 /usr/local/mysql/</span><br />
37M     /usr/local/mysql/var<br />
70M     /usr/local/mysql/mysql-test<br />
15M     /usr/local/mysql/lib<br />
448K    /usr/local/mysql/include<br />
2.9M    /usr/local/mysql/share<br />
7.6M    /usr/local/mysql/libexec<br />
17M     /usr/local/mysql/bin<br />
11M     /usr/local/mysql/docs<br />
2.9M    /usr/local/mysql/<a href="http://www.jiucool.com/tag/sql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sql">sql</a>-bench<br />
163M    /usr/local/mysql/</p>
<p>好了,看一下,整个mysql 目录才占用163M大小!OK,没问题,既然mysql-bin.0000X日志文件占用这么大空间,存在的意义又不是特别大,那么我们就不让它生成吧.</p>
<p>[root@jiucool var]# <span style="color: #ff0000;">find / -name my.cnf </span></p>
<p><span style="color: #000000;">找到了my.cnf 即mysql配置文件,我们将log-bin=mysql-bin 这条注释掉即可.</span></p>
<p># Replication Master Server (default)<br />
# binary logging is required for replication<br />
#log-bin=mysql-bin</p>
<p>重启下mysql吧.</p>
<p>OK,至此,操作完成. 以后再不会因为就几十M的数据库大小生成N个G的日志文件啦.</p>
<p>这些个日志文件太恐怖了,我搬到这新VPS来才二十天左右,还不到一个月日志文件居然就近3个G大小,如果一两个月我不清除日志文件这还得了!</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2009. |
<a href="http://www.jiucool.com/terror-mysql-bin-0000x-log-file/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/terror-mysql-bin-0000x-log-file/#comments">48 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/mysql-bin-%e6%97%a5%e5%bf%97/" rel="tag">mysql-bin 日志</a>, <a href="http://www.jiucool.com/tag/mysql-bin-0000x/" rel="tag">mysql-bin.0000x</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/terror-mysql-bin-0000x-log-file/feed/</wfw:commentRss>
		<slash:comments>48</slash:comments>
		</item>
		<item>
		<title>安装vnstat 查看流量统计</title>
		<link>http://www.jiucool.com/install-vnstat-view-traffic-statistics/</link>
		<comments>http://www.jiucool.com/install-vnstat-view-traffic-statistics/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 13:22:50 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[VPS流量统计]]></category>
		<category><![CDATA[安装vnstat]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/install-vnstat-view-traffic-statistics/</guid>
		<description><![CDATA[VPS 上一般没有流量统计必须要自己安装统计软件才行,如果不装你根本不知道你用了多少流量.但一般VPS是有流量限制的.所以安装一款流量统计软件是很有必要的!

我安装的流量统计软件是vnstat,今天可浪费了我不少时间,唉&#8230;&#8230;.还是重在实践啊.人家说安装非常简单,但实际情况总有些不同,一个参数的错误就会导致你安装的失败!

下面说一下安装流程吧:

我是用的32位系统

下载：

<span class="readmore"><a href="http://www.jiucool.com/install-vnstat-view-traffic-statistics/" title="安装vnstat 查看流量统计">Read More: 847 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jiucool.com/tag/vps/" class="st_tag internal_tag" rel="tag" title="Posts tagged with vps">VPS</a> 上一般没有流量统计必须要自己安装统计软件才行,如果不装你根本不知道你用了多少流量.但一般VPS是有流量限制的.所以安装一款流量统计软件是很有必要的!</p>
<p>我安装的流量统计软件是vnstat,今天可浪费了我不少时间,唉&#8230;&#8230;.还是重在实践啊.人家说安装非常简单,但实际情况总有些不同,一个参数的错误就会导致你安装的失败!</p>
<p>下面说一下安装流程吧:</p>
<pre>我是用的32位系统
下载：
wget http://humdi.net/vnstat/vnstat-1.9.tar.gz  (目前最新版本为此)
解压：
tar xvzf vnstat-1.9.tar.gz
进入目录：
cd vnstat-1.9
编译安装：
make
make install</pre>
<p>至此安装成功,不过现在没有可视化界面,只能通过命令来查询你的流量.我们可以到<a href="http://humdi.net/vnstat/">http://humdi.net/vnstat/</a>&#160; 上去下载最新版本的<a href="http://www.sqweek.com/sqweek/index.php?p=1">vnStat PHP frontend</a> 通过php页面图形会显示出你的流量! 安装效果如我的页面: <a href="http://server.jiucool.org/vnstat/" target="_blank">http://server.jiucool.org/vnstat/</a>&#160; 今天刚装上!</p>
<p>接下来我们安装<a href="http://www.jiucool.com" target="_blank">vnstat PHP frontend</a>，</p>
<p>下载地址：<a href="http://www.sqweek.com/sqweek/files/vnstat_php_frontend-1.4.1.tar.gz">http://www.sqweek.com/sqweek/files/vnstat_php_frontend-1.4.1.tar.gz</a></p>
<pre>然后通过
vnstat -u -i eth0
来生成数据库</pre>
<p>然后新建vnstat文件 </p>
<pre>vi /etc/cron.d/vnstat</pre>
<p>手动添加如下代码: </p>
<pre>0-55/5 *        * * *   root   vnstat -u -i eth0
0-55/5 *        * * *   root   vnstat --dumpdb -i eth0 &gt;/var/lib/vnstat/vnstat_dump_eth0</pre>
<p>然后修改&#160; vnstat/config.php 这个文件，将数据目录改为 /var/lib/vnstat/ 即：<br />
  <br />$data_dir = &#8216;/var/lib/vnstat/&#8217;;</p>
<p>过五分钟访问http://www.yourdomain.com/vnstat/&#160; ,OK,搞定 ,一切正常!</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2009. |
<a href="http://www.jiucool.com/install-vnstat-view-traffic-statistics/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/install-vnstat-view-traffic-statistics/#comments">35 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/vps%e6%b5%81%e9%87%8f%e7%bb%9f%e8%ae%a1/" rel="tag">VPS流量统计</a>, <a href="http://www.jiucool.com/tag/%e5%ae%89%e8%a3%85vnstat/" rel="tag">安装vnstat</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/install-vnstat-view-traffic-statistics/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
	</channel>
</rss>

