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能访问到就可以了….
转载请注明:IT运维空间 » linux » lighttpd安装
发表评论