<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://jackxiang.com/post//</link>
<title><![CDATA[[俊龙配置过]lighttpd+PHP(FAST-CGI)+MySQL的学习笔记]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Thu, 13 Nov 2008 10:56:28 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	早就听说lighttpd加PHP的FAST-CGI方式性能不错,抽时间装了下.只是完成了环境的安装,还没具体看性能什么的!<br/><br/>以下是我装lighttpd+PHP(FAST-CGI)+mysql的，如有问题，请给我评论.<br/><br/> <br/><br/>一、先安装MySQL<br/><br/>安装mysql，你可以安装源码包，也可以用编译好的！直接解压拷贝也行.我用的是直接拷贝编译好的！<br/><br/>1.编译源码包<br/><br/>./configure --prefix=/data2/ali --enable-assembler --enable-thread-safe-client --without-debug<br/><br/>make<br/><br/>make install<br/><br/>2.用编译好的压缩包！直接解压拷贝<br/><br/>tar zxf mysql-standard-5.0.27-linux-i686-glibc23.tar.gz<br/><br/>cd mysql-standard-5.0.27-linux-i686-glibc23<br/><br/>cp -rf mysql-standard-5.0.27-linux-i686-glibc23 /usr/local/mysql<br/><br/><br/>//以下是为了启动多个端口<br/><br/>mkdir -p /data2/ali/mysql3308<br/><br/>mkdir -p /data2/ali/mysql3309<br/><br/>./scripts/mysql_install_db --ldata=/data2/ali/mysql3308<br/><br/>cp support-files/my-medium.cnf /data2/ali/mysql3308/my.cnf<br/><br/>vi /data2/ali/mysql3308/my.cnf<br/><br/>修改内容如下:<br/><br/>#<br/><br/>[mysqld]<br/><br/>datadir = /data2/ali/mysql3308/<br/><br/>port = 3308<br/><br/>socket = /tmp/mysql-3308.sock<br/><br/>#<br/><br/><br/>cp /data2/ali/mysql3308/ /data2/ali/mysql3309/<br/><br/>vi /data2/ali/mysql3309/my.cnf<br/><br/>修改内容如下:<br/><br/>#<br/><br/>[mysqld]<br/><br/>datadir = /data2/ali/mysql3309/<br/><br/>port = 3309<br/><br/>socket = /tmp/mysql-3309.sock<br/><br/>#<br/><br/>启动mysql<br/><br/>/usr/local/mysql/bin/mysqld_safe --defaults-file=/data2/ali/mysql3308/my.cnf --user=root &<br/><br/>/usr/local/mysql/bin/mysqld_safe --defaults-file=/data2/ali/mysql3309/my.cnf --user=root &<br/><br/><br/>检查mysql是否启动成功。<br/><br/>ps -ax&#124;grep mysql<br/><br/>20835 pts/3 S 0:00 /bin/sh ./mysqld_safe --defaults-file=/data2/ali/mysql3308/my.cnf --user=root<br/><br/>20862 pts/3 Sl 0:00 /usr/local/mysql/bin/mysqld --defaults-file=/data2/ali/mysql3308/my.cnf --basedir=/usr/local/mysql --datadir=/data2/ali/mysql3308/ --user=root --pid-file=/data2/ali/mysql3308//XD_Blog_Web_132_42.pid --skip-external-locking --port=3308 --socket=/tmp/mysql-3308.sock<br/><br/>20872 pts/3 S 0:00 /bin/sh ./mysqld_safe --defaults-file=/data2/ali/mysql3309/my.cnf --user=root<br/><br/>20903 pts/3 Sl 0:00 /usr/local/mysql/bin/mysqld --defaults-file=/data2/ali/mysql3309/my.cnf --basedir=/usr/local/mysql --datadir=/data2/ali/mysql3309/ --user=root --pid-file=/data2/ali/mysql3309//XD_Blog_Web_132_42.pid --skip-external-locking --port=3309 --socket=/tmp/mysql-3309.sock<br/><br/><br/>连接mysql<br/><br/>mysql -S /tmp/mysql-3108.sock<br/><br/> <br/><br/><br/>二、接着安装php<br/><br/>tar zxf php-5.2.4.tar.gz<br/><br/>cd php-5.2.4<br/><br/>./configure &#92;<br/><br/>--prefix=/usr/local/php-fcgi &#92;<br/><br/>--enable-fastcgi &#92;<br/><br/>--enable-force-cgi-redirect &#92;<br/><br/>--without-iconv &#92;<br/><br/>--enable-mbstring &#92;<br/><br/>--with-mysql=/usr/local/mysql<br/><br/>make<br/><br/>make install<br/><br/><br/>复制参数文件到目标目录:<br/><br/>cp php.ini-dist /usr/local/php-fcgi/lib/php.ini<br/><br/><br/>检查fast-cgi是否安装成功可以运行如下命令<br/><br/>/usr/local/php-fcgi/bin/php-cgi -v<br/><br/>显示如下信息，内容里包含“PHP 5.2.4 (cgi-fcgi)"表示支持fast-cgi了<br/><br/>PHP 5.2.4 (cgi-fcgi) (built: Oct 28 2007 20:08:41)<br/><br/>Copyright (c) 1997-2007 The PHP Group<br/><br/>Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies<br/><br/> <br/><br/>三、最后安装lighttpd<br/><br/>1.安装配置lighttpd<br/><br/><br/>1.1 首先创建运行lighttpd的用户和组<br/><br/><br/># groupadd lighttpd<br/><br/># useradd -g lighttpd -s /sbin/nologin -d /dev/null lighttpd<br/><br/><br/>1.2 开始安装lighttpd<br/><br/><br/># wget http://www.lighttpd.net/download/lighttpd-1.4.8.tar.gz<br/><br/># tar -zxvf lighttpd-1.4.8.tar.gz<br/><br/># cd lighttpd-1.4.8<br/><br/># ./configure --prefix=/usr/local/lighttpd<br/><br/><br/># make<br/><br/># make install<br/><br/><br/># mkdir /usr/local/lighttpd/conf<br/><br/># mkdir /usr/local/lighttpd/log<br/><br/><br/># mv ./doc/lighttpd.conf /usr/local/lighttpd/conf/<br/><br/># cp ./doc/rc.lighttpd.redhat /etc/init.d/lighttpd<br/><br/> <br/><br/><br/>vi conf/lighttpd.conf<br/><br/>将 #”mod_fastcgi”, 的#去掉<br/><br/>server.modules = (<br/><br/>"mod_rewrite",<br/><br/>"mod_redirect",<br/><br/># "mod_alias",<br/><br/>"mod_access",<br/><br/># "mod_cml",<br/><br/># "mod_trigger_b4_dl",<br/><br/># "mod_auth",<br/><br/># "mod_status",<br/><br/># "mod_setenv",<br/><br/>"mod_fastcgi",<br/><br/><br/>找到fastcgi的定义<br/><br/><br/>#### fastcgi module<br/><br/>## read fastcgi.txt for more info<br/><br/>## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini<br/><br/>fastcgi.server = ( ".php" =><br/><br/>( "localhost" =><br/><br/>(<br/><br/>"socket" => "/var/run/lighttpd/php-fastcgi.socket",<br/><br/>"bin-path" => "/usr/local/php-fcgi/bin/php-cgi"<br/><br/>)<br/><br/>)<br/><br/>)<br/><br/><br/>一开始我把配置写"bin-path" => "/usr/local/php-fcgi/bin/php"这样，发现报错，后来改了下以上的配置，发现OK了！<br/><br/>启动lighttpd命令是这样的：<br/><br/>/usr/local/lighttpd/sbin/lighttpd -f conf/lighttpd.conf<br/>我的：<br/>/usr/local/lighttpd/sbin/lighttpd -f /usr/local/lighttpd/conf/lighttpd.conf<br/><br/><br/>最后可以在程序目录下建个test.php,检查一下是否正常!<br/><br/>最后发现在curl这儿：在command模式下可以看到curl php -m可以看到curl模块，但是通过lighttpd就说那个模块不存在。。？？？
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] [俊龙配置过]lighttpd+PHP(FAST-CGI)+MySQL的学习笔记]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>