正在检查登录状态... | 繁體中文 | 设为首页 | 加入收藏
点击:497 | 评论:0 | 辅助功能: 复制 | 打印 | 字体: | |

lighttpd 1.4.23 with modcache v1.8.0 安装指南

作者: 蓝天下云层上 发表于 最后更新于
版权声明:转载请征求作者同意,转载时必以超链接形式标明文章原始出处和作者信息及版权声明。
/blog/weblog-19431-1.html
cd /tmp
wget http://lighttpd-improved.googlec ... .4.23.v1.8.0.tar.gz
tar -zxvf lighttpd-1.4.23.v1.8.0.tar.gz
cd lighttpd-1.4.23
./configure -prefix=/opt/lighttpd --sysconfdir=/opt/lighttpd/conf --disable-ipv6 --with-memcache --with-fam --without-bzip2
make
make install


使用--with-fam
注意gamin-devel包的安装
rpm -ivh gamin-devel-0.1.7-8.el5.i386.rpm

mkdir /opt/lighttpd/conf
cp doc/lighttpd.conf /opt/lighttpd/conf
mkdir /opt/lighttpd/logs

# 安装文件下的启动脚本
cp doc/rc.lighttpd.redhat /etc/init.d/lighttpd
chkconfig lighttpd on
  
修改/etc/init.d/lighttpd,将配置文件变量更改为:
vi /etc/init.d/lighttpd
#LIGHTTPD_CONF_PATH="/etc/lighttpd/lighttpd.conf"
LIGHTTPD_CONF_PATH=/opt/lighttpd/conf/lighttpd.conf
#lighttpd="/usr/sbin/lighttpd"
lighttpd="/opt/lighttpd/sbin/lighttpd"

配置
vi /opt/lighttpd/conf/lighttpd.conf
增加mod_mem_cache

修改
server.document-root = "/srv/www/htdocs/"

server.document-root = "/opt/"

server.errorlog = "/var/log/lighttpd/error.log"

server.errorlog = "/opt/lighttpd/logs/error.log"

accesslog.filename = "/var/log/lighttpd/access.log"

accesslog.filename = "/optlighttpd/logs/access.log"

#server.port = 81

#server.port = 8081

#server.pid-file = "/var/run/lighttpd.pid"

server.pid-file = "/var/run/lighttpd.pid"

#status.status-url = "/server-status"
#status.config-url = "/server-config"

status.status-url = "/server-status"
status.config-url = "/server-config"

mkdir /opt/imx_images/lighttpd
chmod 777 /opt/imx_images/lighttpd

启动
/opt/lighttpd/sbin/lighttpd -f /opt/lighttpd/conf/lighttpd.conf
或是
service lighttpd start

性能优化
server.event-handler = "linux-sysepoll"
server.network-backend = "linux-sendfile"
server.stat-cache-engine = "fam" # either fam, simple or disabled


日志轮询
$HTTP["host"] == "www.test.org " {
...
server.errorlog = "/opt/lighttpd/logs/test/error.log"
# accesslog.filename = "/opt/lighttpd/logs/test/access.log"
accesslog.filename = “|/usr/sbin/cronolog /opt/lighttpd/logs/test/access_log.%Y%m%d”
}

此日志的引用通告 URL:
http://www.imx365.net/blog/tb.cgi/19431

其实我一直都不知道您在想些什么,有什么感触。说真的,您的评论对于我来说很重要...

还没有人评论过

发表评论
  • (地址不公开)

(访客)