原贴:http://networld.tianyablog.com/blogger/post_show.asp?BlogID=40003&PostID=9144309&idWriter=0&Key=0
lighttpd(1) 安装过程
作者: 弥勒菩萨 提交日期:2007-4-5 11:43:00
| 分类: | 访问量:200
注:
正则表达式需要prec支持
tar xzvf pcre-6.6.tar.gz
cd pcre-6.6
./configure
make clean
make
make install
tar xzvf lighttpd-1.4.13.tar.gz
cd lighttpd-1.4.13
./configure --prefix=/usr/local/lighttpd
make clean
make
make install
复制lighttpd.conf到指定目录
mkdir /usr/local/lighttpd/etc
cp doc/lighttpd.conf /usr/local/lighttpd/etc
groupadd lighttpd
useradd -g lighttpd lighttpd
mkdir /www
chown -R lighttpd.lighttpd /www
mkdir /lighttpdlogs
chown -R lighttpd.lighttpd /lighttpdlogs
chmod 750 /lighttpdlogs
# 安装文件下的启动脚本
cp doc/rc.lighttpd /etc/init.d/lighttpd
chkconfig lighttpd on
修改/etc/init.d/lighttpd,将配置文件变量更改为:
vi /etc/init.d/lighttpd
# LIGHTTPD_CONFIG=/etc/sysconfig/lighttpd
LIGHTTPD_CONFIG=/usr/local/lighttpd/etc/lighttpd.conf
vi /usr/local/lighttpd/etc/lighttpd.conf
-------------------------------------------------
启用模块
"mod_rewrite",
"mod_redirect",
"mod_proxy",
"mod_expire",
"mod_simple_vhost",
server.document-root = "/www/"
server.errorlog = "/lighttpdlogs/lighttpd.error.log"
accesslog.filename = "/lighttpdlogs/access.log"
server.username = "lighttpd"
server.groupname = "lighttpd"
------------------------------------------------
启动服务
/usr/local/lighttpd/sbin/lighttpd -f /usr/local/lighttpd/etc/lighttpd.conf