歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux管理 >> Linux維護 >> CentOS系統Lighttpd安裝技巧

CentOS系統Lighttpd安裝技巧

日期:2017/3/2 10:29:12   编辑:Linux維護

Lighttpd是一款開源web服務器軟件,不少朋友在安裝的時候遇到了不少麻煩,下面小編給大家詳細介紹下Lighttpd載CentOS下的安裝,安裝失敗的朋友可以來參考下。

CentOS lighttpd安裝

wget http://www.lighttpd.net/download/lighttpd-1.4.19.tar.gz

tar zxvf lighttpd*

cd lightt*

。/configure --prefix=/usr/local/lighttpd --with-pcre

CentOS lighttpd安裝這時候說缺少pcre-devel

yum install pcre-devel

。/configure --with-pcre

make

make install

在Ubuntu下用apt-get install lighttpd來安裝,方便了很多,CentOS lighttpd安裝就要自己配置了。

cp doc/sysconfig.lighttpd /etc/sysconfig/lighttpd

mkdir /etc/lighttpd

然後copy默認的配置文件

cp doc/lighttpd.conf /etc/lighttpd/lighttpd.conf

cp doc/rc.lighttpd.RedHat /etc/init.d/lighttpd

然後用whereis lighttpd找到位置在/usr/local/sbin/lighttpd

在用vim /etc/init.d/lighttpd,找到prog=“lighttpd”節,注釋掉默認的,添加:

lighttpd=“/usr/local/sbin/lighttpd”

在/var/log/下mkdir lighttpd,再創建兩個文件access.log和error.log

默認的網站目錄配置是:

server.document-root = “/srv/www/htdocs/”

上面就是CentOS安裝Lighttpd的方法介紹了,本文針對Lighttpd安裝時遇到的問題作了講解,如果你遇到一樣的問題可以試試本文介紹的方法。

Copyright © Linux教程網 All Rights Reserved