<?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; Debian</title>
	<atom:link href="http://www.zhujun.org/tag/debian/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zhujun.org</link>
	<description>邪恶获得胜利的唯一条件，就是善良的人们保持沉默。</description>
	<lastBuildDate>Sun, 05 Feb 2012 06:34:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Debian系统下LNMP环境搭建笔记（二）</title>
		<link>http://www.zhujun.org/web/debian-lnmp-2/</link>
		<comments>http://www.zhujun.org/web/debian-lnmp-2/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 14:04:54 +0000</pubDate>
		<dc:creator>朱俊</dc:creator>
				<category><![CDATA[网络开发]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[LNMP]]></category>
		<category><![CDATA[Nginx配置]]></category>

		<guid isPermaLink="false">http://www.zhujun.org/?p=25</guid>
		<description><![CDATA[记录了Linux（Debian）系统下面，搭建LNMP-Linux+Nginx+MySQL+PHP+eAcelerator的操作要点和心得笔记的文章之二。]]></description>
			<content:encoded><![CDATA[<h3>3. 配置LNMP</h3>
<p>Nginx由于没有免费的控制面板支持，所以需要修改 /usr/local/nginx/conf/nginx.conf 这个文件来实现服务器性能、特性的配置。<br />
上传下载配置文件建议使用Winscp这个工具，同样基于SSH协议，比Ftp安全。</p>
<p>在 <a rel="external nofollow" href="http://wiki.nginx.org/NginxConfiguration">http://wiki.nginx.org/NginxConfiguration</a> 有很多配置文件的文档和例子。</p>
<p class="b4list">默认的配置文件也不错，有以下几点需要注意：</p>
<ul>
<li>每次修改配置文件并上传后，需要测试配置文件是否正确，命令如下：<br />
<code class="command">/usr/local/nginx/sbin/nginx -t</code></li>
<li>修改配置后，必须重启Nginx才能生效，Nginx进程无缝重启命令如下：<br />
<code class="command">kill -HUP `cat /usr/local/nginx/logs/nginx.pid`</code></li>
<li>Nginx 默认不开启SSI（Server Side Include），需要手工开启，而官网给出的例子却无法正常工作，我是用如下配置代码实现SSI的：<br />
<code>location ~ .*\.(shtm|shtml)?$ {<br />
ssi on;<br />
ssi_silent_errors on;<br />
ssi_types text/shtml;<br />
}</code></li>
</ul>
<p><span id="more-25"></span><br />
MySQL的配置因为有PhpMyAdmin的存在，变得非常简单，也可以选择MySQL-Front这个客户端软件，实现对MySQL的远程配置、备份等操作。</p>
<p>PHP也是默认就配置好的，而且这个LNMP一键安装包选择的PHP FastCGI进程管理器是PHP-FPM（PHP FastCGI Process Manager），据说要比Lighttpd 的 spawn-fcgi 好许多。<br />
另外，默认情况下，eAcelerator是没有安装的，可以执行 ./eaccelerator.sh 自动安装，加速以后，PHP代码被预编译，大约可以节约一半的执行速度。以这个博客为例，加速前WordPress的处理时间大约在0.2秒，加速以后处理时间在0.1秒左右。</p>
<p>关于vsftp，个人感觉配置比较麻烦，我弄了半天，最后换成proftpd了事，后者配置相对简单。<br />
除非有多用户需求且权限要求比较严格，如果只是自己使用的话，Winscp完全可以满足上传下载的需求了。</p>
<p>经过最近的实践，感觉Linux（Debian）下使用LNMP搭建Web服务环境并没有想象中的困难，也不会比Windows下IIS的配置复杂多少。新手一至二天可以入门，完成安装、配置并投入生产环境。</p>
<p>（完）</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zhujun.org/web/debian-lnmp-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Debian系统下LNMP环境搭建笔记（一）</title>
		<link>http://www.zhujun.org/web/debian-lnmp/</link>
		<comments>http://www.zhujun.org/web/debian-lnmp/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 13:08:04 +0000</pubDate>
		<dc:creator>朱俊</dc:creator>
				<category><![CDATA[网络开发]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[LNMP]]></category>

		<guid isPermaLink="false">http://www.zhujun.org/?p=12</guid>
		<description><![CDATA[记录了Debian5.03系统下面，搭建LNMP-Nginx+PHP+MySQL+eAcelerator的操作要点和心得笔记的第一篇文章。]]></description>
			<content:encoded><![CDATA[<p>2009年岁末入手了一台美帝的VPS，虽然建立大中华局域网的传言四起，但还是无法阻挡我在互联网上用脚投票，“夯实”了美帝经济复苏的基础。</p>
<p>服务提供商是<a href="http://fhpp.futurehosting.biz/idevaffiliate.php?id=161" rel="external nofollow">FutureHosting</a>，WHT上口碑最好的几家公司之一，开通过程就像我们传说中的经济一样“又好又快”，我晚上十点左右下的单，第二天早上起来就已经帮我弄好了，实际开通时间应该是北京时间凌晨一、二点左右。</p>
<p>服务器操作系统国外一般就流行两种，CentOS和Debian，Ubuntu算作Debian的桌面版，一般不当服务器用，MS的Windows虽然方便，而且还能远程桌面进去，在里面开个IE，就可以自由上网冲浪，但无奈太贵，按月收钱，每个月要10多美元，难怪被人叫做M$。最终的选择是Debian5，虽然Debian的中文名字不太好听（大便），但人家号称又大，又方便，就选它吧。</p>
<p>Linux远程管理的必备工具是Putty，类似于Telnet的一个工具，区别是Putty基于SSH协议，安全加密。SSH在国内还有其他大用处，Google一下你就知道。</p>
<p>言归正传，正式开始LNMP环境的搭建，以下内容如果你不是技术银可以忽略不计。<span id="more-12"></span></p>
<p>所谓LNMP，就是Linux+Nginx+MySQL+PHP的缩写，类似的还有LAMP（Linux+Apache+MySQL+PHP）。Linux我选的Debian，Nginx是网页服务器，相当于IIS和Apache，但比上述两者都轻量、高效，MySQL是免费的数据库服务程序，PHP是最流行的网页动态语言中的一种。</p>
<h3>1. 更新Debian系统</h3>
<p>更新Bebian很简单，目前最新的稳定版本应该是5.03，只要打下面两行命令就可以了：<br />
<code class="command">sudo apt-get update<br />
sudo apt-get dist-upgrade</code></p>
<p>如果你有root权限，sudo命令都不需要，只要打：<br />
<code class="command">apt-get update<br />
apt-get dist-upgrade<br />
</code><br />
需要注意的是，apt-get默认从 http://ftp.de.debian.org/ 下载更新包，如果你的服务器在国外，那么几百兆的数据最多几分钟而已，如果你的服务器在国内，则可以修改/etc/apt/sources.list 文件，换成国内的更新源，以解决网络出口的瓶颈问题。</p>
<h3>2. 安装LNMP</h3>
<p>安装LNMP其实也很简单，因为已经有很多热心人帮你整合好了，用google搜索LNMP一键安装包就有好多。<br />
我使用的是<a rel="external nofollow" href="http://blog.licess.cn/lnmp/">http://blog.licess.cn/lnmp/</a> 这家，附带了phpMyAdmin、eAcelerator和Zend，都是好东西。<br />
安装命令如下：<br />
<code class="command">wget http://soft.vpser.net/lnmp/lnmp0.3.tar.gz<br />
tar zxvf lnmp0.3.tar.gz<br />
cd lnmp0.3<br />
./debian.sh （64位系统执行./debian64.sh ）</code><br />
大约几分钟后输入MySQL密码即可。</p>
<p>（未完待续）</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zhujun.org/web/debian-lnmp/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

