免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1795 | 回复: 0
打印 上一主题 下一主题

Centos+lighttpd+php [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-06-08 15:03 |只看该作者 |倒序浏览
一.安装lighttpd
1.下载安装

http://www.lighttpd.net/
下载,lighttpd-1.4.22.tar.gz
#wget
http://www.lighttpd.net/download/lighttpd-1.4.22.tar.gz

# gzip -cd lighttpd-1.4.22.tar.gz | tar xf -
# cd lighttpd-1.4.22
# ./configure --prefix=/usr/local/lighttpd
# make
# make install
2.Copy conf文件及启动脚本
#cp doc/lighttpd.conf /usr/local/lighttpd
#cp doc/rc.lighttpd.redhat /etc/init.d/lighttpd

3 编辑lighttpd启动脚本
#vi /etc/init.d/lighttpd
1,$s#/etc/lighttpd/lighttpd.conf#/usr/local/lighttpd/lighttpd.conf  ;全局修改配置文件位置
1,$s#/usr/sbin/lighttpd#/usr/local/sbin/lighttpd            ;全局修改lighttpd启动文件
#chkconfig lighttpd on                                              ;添加为服务

3.配置lighttpd.conf
server.document-root        = "/var/www/htdocs/"                ;server.document-root是服务目录
server.errorlog             = "/var/log/lighttpd/error.log"     ;server.errorlog是错误日志目录
4.运行
#/etc/init.d/lighttpd start
二.安装mysql
yum install mysql-*

三.安装php
yum install php
四.修改lighttpd的配置。  把mod_fastcgi去掉注释。
# vi /usr/local/lighttpd/lighttpd.conf

server.modules              = (
                            "mod_fastcgi",
                              )
  
找到fastcgi.server去掉注释
fastcgi.server             = ( ".php" =>
                               ( "localhost" =>
                                 (
                                   "socket" => "/var/run/lighttpd/php-fastcgi.socket",
                                   "bin-path" => "/usr/bin/php-cgi"
                                 )
                               )
                            )

五。php测试页面phpinfo.php放到你的www目录下。


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/14353/showart_1958680.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP