lighttpd(1) 安装过程

原贴: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 <script src="http://hot.tianyaclub.com/hot.js" language="javascript" type="text/javascript"></script>

  注:
  正则表达式需要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 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值