转载自:http://qikangwei.blog.51cto.com/2282397/806469
lighttpd安装:
1.安装
yum -y install bzip2-devel pcre-devel
tar zxvf /home/lighttpd-1.4.30.tar.gz -C /usr/src/
cd /usr/src/lighttpd-1.4.30/
./configure --prefix=/usr/local/lighttpd/
make
make install
2.配置
mkdir /usr/local/lighttpd/etc
cp doc/config/lighttpd.conf /usr/local/lighttpd/etc/
cp doc/config/modules.conf /usr/local/lighttpd/etc/
cp -rf doc/config/conf.d /usr/local/lighttpd/etc/
mkdir /usr/local/lighttpd/logs/
mkdir /usr/local/lighttpd/htdocs
useradd lighttpd
chown -R lighttpd:lighttpd /usr/local/lighttpd/
vi /usr/local/lighttpd/etc/lighttpd.conf
var.log_root = "/usr/local/lighttpd/logs"
//
var.server_root = "/usr/local/lighttpd"
//
var.home_dir = "/usr/local/lighttpd/lib"
//这里为修改部分
var.conf_dir = "/usr/local/lighttpd/etc"
//
server.use-ipv6 = "disable"
//
/usr/local/lighttpd/sbin/lighttpd -t -f /usr/local/lighttpd/etc/lighttpd.conf
//测试配置文件是否正确
3.启动
/usr/local/lighttpd/sbin/lighttpd -f /usr/local/lighttpd/etc/lighttpd.conf
OK,在htdocs目录下建个index.html文件随便输点内容,如果http://IP能访问到就可以了....
注:这里用的版本是1.4.30,不同版本可能配置不同...
本文出自 “我的青春我做主” 博客,请务必保留此出处http://qikangwei.blog.51cto.com/2282397/806469