下午没事的时候装了一下lighttpd,和大家分享一下!
首先安装lighttpd之前先安装pcre包
确认libtool是否已经安装,如果没有安装的话,则先安装libtool
yum -y install libtool
分别执行以下三条命令:
autoreconf --force --install
libtoolize --automake --force
automake --force --add-missing
./configure --prefix=/usr/local/lighttpd
make && make install
yum -y install readline-devel
yum -y install ncurses-devel
这两个包也要安装
configure: error: zlib-headers and/or libs where not found, install them or build with –without-zlib
提示以上错误的时候要安装zlib-devel
但是我安装以后不行,所以直接yum -y install zlib-*
同上
configure: error: bzip2-headers and/or libs where not found, install them or build with –without-bzip2
出现这个错误就直接yum -y install bzip2-*
然后在编译lighttpd就可以通过了
成功以后会显示
enabled:
mod_access
mod_accesslog
mod_alias
mod_auth
mod_cgi
mod_compress
mod_dirlisting
mod_evhost
mod_expire
mod_extforward
mod_fastcgi
mod_flv_streaming
mod_indexfile
mod_proxy
mod_redirect
mod_rewrite
mod_rrdtool
mod_scgi
mod_secdownload
mod_setenv
mod_simple_vhost
mod_ssi
mod_staticfile
mod_status
mod_trigger_b4_dl
mod_userdir
mod_usertrack
mod_webdav
disabled:
mod_cml
mod_magnet
mod_mysql_vhost
Features:
enabled:
auth-crypt
compress-bzip2
compress-deflate
compress-gzip
large-files
network-ipv6
regex-conditionals
disabled:
auth-ldap
network-openssl
stat-cache-fam
storage-gdbm
storage-memcache
webdav-locks
webdav-properties
然后执行:
make && make install
cp doc/config/lighttpd.conf /usr/local/lighttpd/
有的配置文件在doc下,有的就在doc/config下
最后就是根据你自己的设置来更改配置文件了!
cd /etc/lighttpd/conf.d
mkdir -p /srv/www/htdocs
mkdir -p /var/log/lighttpd/
cd /var/log/lighttpd/
touch error.log
chown -R lighttpd.lighttpd /var/log/lighttpd
chown -R lighttpd.lighttpd /etc/lighttpd
/usr/local/lighttpd/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
lsof -i:80
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
lighttpd 2352 lighttpd 4u IPv4 125986 TCP *:http (LISTEN)
[root@nagios-server nginx]# curl -i http://192.168.1.252/
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Accept-Ranges: bytes
Content-Length: 18
Date: Fri, 25 Mar 2011 17:55:36 GMT
Server: lighttpd/1.4.27
[lighttpd] lighttpd的安装配置。。。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
如果同事暗中伤害你,应该怎么办?
這個饅頭有餡
2019-02-24 13:59:08
职场中,抱怨越多的员工,越被领导瞧不起!
這個饅頭有餡
2019-02-24 13:59:08
老程序员被裁,应届生却能月薪 1.3 万?这你能忍?
前端高達
2019-02-24 13:48:04
遇到到处蹭吃却从不请客吃饭的主怎么办?
樑軍年
2019-02-24 13:26:35
Linux基本操作命令
wbzjacky
2019-02-24 13:12:38
高标准机房综合配线安装
wbzjacky
2019-02-24 13:12:38
IPsec ***实验
wbzjacky
2019-02-24 13:12:37
真实的模拟***综合实验
wbzjacky
2019-02-24 13:12:37
CISCO路由AAA的Easy ***
wbzjacky
2019-02-24 13:12:37
三层交换机的HSRP、vlan、端口聚合
wbzjacky
2019-02-24 13:12:37
CISCO访问控制列表 企业网络管理的必杀技
wbzjacky
2019-02-24 13:12:37
HSRP和二层交换机的端口聚合、vlan
wbzjacky
2019-02-24 13:12:37