Use the source code to install Lighttpd in centos 5.6

Source: Internet
Author: User
Document directory
  • Configuration

The Lighttpd documentation mentions that you can use

Yum install lighttd

To install, but I did not succeed in centos5.6, so I had to use the source code for installation.

Download

Download the Lighttpd source code package from the Lighttpd official website.

I downloaded version 1.4.29. If you use version 1.4.27 or earlier, the initialization code will be different. For more information, see the documentation.

Download the Lighttpd source package and unzip the tar zxvf lighttpd-1.4.29.tar.gzcd lighttpd-1.4.29

Install dependency

At the same time, you need to download two packages, which are the minimum package required by Lighttpd. You can also install other packages. For details, see the Lighttpd documentation.


Yum install PCRE-devel
Yum install zlib-devel
Bzip2-devel is optional, if you do not install this package, configure will prompt to add the suffix, simply also installed
Yum install bzip2-devel
Configure./configure

Buildmake

Install make install

Initialization code:

Sed-E's/Foo/Lighttpd/G' DOC/initscripts/rc. Lighttpd. RedHat>/etc/init. d/Lighttpd
Chmod A + Rx/etc/init. d/lighttpdcp-p doc/initscripts/sysconfig. Lighttpd/etc/sysconfig/lighttpdmkdir-P/etc/Lighttpd
cp -R doc/config/conf.d/ doc/config/*.conf doc/config/vhosts.d/ /etc/lighttpd/

chkconfig lighttpd on

If the version is 1.4.27 or earlier, initialize the code

sed -e 's/FOO/lighttpd/g' doc/initscripts/rc.lighttpd.redhat > /etc/init.d/lighttpd
chmod a+rx /etc/init.d/lighttpdcp -p doc/initscripts/sysconfig.lighttpd /etc/sysconfig/lighttpdmkdir -p /etc/lighttpd
install -Dp ./doc/lighttpd.conf /etc/lighttpd/lighttpd.conf

chkconfig lighttpd on

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.