[lighttpd] lighttpd的安装配置。。。
生活随笔
收集整理的這篇文章主要介紹了
[lighttpd] lighttpd的安装配置。。。
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
下午沒事的時候裝了一下lighttpd,和大家分享一下!
首先安裝lighttpd之前先安裝pcre包
確認libtool是否已經(jīng)安裝,如果沒有安裝的話,則先安裝libtool
yum -y install libtool
分別執(zhí)行以下三條命令:
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
出現(xiàn)這個錯誤就直接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
然后執(zhí)行:
make && make install
cp doc/config/lighttpd.conf /usr/local/lighttpd/
有的配置文件在doc下,有的就在doc/config下
最后就是根據(jù)你自己的設(shè)置來更改配置文件了!
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之前先安裝pcre包
確認libtool是否已經(jīng)安裝,如果沒有安裝的話,則先安裝libtool
yum -y install libtool
分別執(zhí)行以下三條命令:
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
出現(xiàn)這個錯誤就直接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
然后執(zhí)行:
make && make install
cp doc/config/lighttpd.conf /usr/local/lighttpd/
有的配置文件在doc下,有的就在doc/config下
最后就是根據(jù)你自己的設(shè)置來更改配置文件了!
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
?
轉(zhuǎn)載于:https://blog.51cto.com/make2008/546870
總結(jié)
以上是生活随笔為你收集整理的[lighttpd] lighttpd的安装配置。。。的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Ubuntu中设置环境变量PATH
- 下一篇: 《设计模式》杂记之里氏替换原则