Chinaunix首页 | 论坛 | 博客
  • 博客访问: 158194
  • 博文数量: 25
  • 博客积分: 2045
  • 博客等级: 大尉
  • 技术积分: 290
  • 用 户 组: 普通用户
  • 注册时间: 2007-03-08 18:12
文章分类

全部博文(25)

文章存档

2012年(1)

2009年(8)

2008年(16)

我的朋友

分类: 系统运维

2008-09-18 23:18:05

1.安装
  系统centos5,软件版本 lighttpd-1.4.19.tar.gz
  需安装gamin-devel pcre-devel解决安装时的库依赖问题
  ./configure --prefix=/usr/local/lighttpd --with-fam
  make && make install
  mkdir /usr/local/lighttpd/etc   ###把配置文件放到此目录,根据个人喜好和习惯存放了####
  cp doc/lighttpd.conf  /usr/local/lighttpd/etc
2.配置
  然后根据实际情况修改配置文件lighttpd.conf,通常修改如下三项就可以启动服务了
      server.document-root = "/srv/www/htdocs/"  改为自己网站文件的主目录
      server.errorlog = "/var/log/lighttpd/error.log"  错误日志存放目录
      accesslog.filename = "/var/log/lighttpd/access.log" 访问日志存放目录
其他参数可以根据需要慢慢修改。
3.设置开机启动
命令行下启动服务可以使用
/usr/local/lighttpd/sbin/lighttpd -f /usr/local/lighttpd/etc/lighttpd.conf

如果是redhat系列的,可以修改doc/rc.lighttpd.redhat脚本
第25行   LIGHTTPD_CONF_PATH="/etc/lighttpd/lighttpd.conf" 改为
    --->LIGHTTPD_CONF_PATH="/usr/local/lighttpd/etc/lighttpd.conf"
第29行   lighttpd="/usr/sbin/lighttpd" 改为
    --->lighttpd="/usr/local/lighttpd/sbin/lighttpd"
启动脚本改名 mv rc.lighttpd.redhat lighttpd
拷贝到/etc/init.d/
设为系统服务 chkconfig add lighttpd
开机启动    chkconfig lighttpd on


阅读(682) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~