現在遊びの環境としてCentOSを使っています。
しかし、CentOS標準リポジトリにはLIGHTTPDが用意されていませんので、
Fedora EPEL リポジトリを設定
#wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-2.noarch.rpm
# rpm -ivh epel-release-5-2.noarch.rpm
そして、このままでは有効にはなりませんので、
以下のように。
vi /etc/yum.repos.d/epel.repo
enableを 0 ⇒ 1 する。
のち、
#yum install -y lighttpd lighttpd-fastcgi
か、または
#yum install -y –enablerepo=epel lighttpd lighttpd-fastcgi
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
lighttpd-fastcgi i386 1.4.18-3.el5 epel 45 k
Installing for dependencies:
lighttpd i386 1.4.18-3.el5 epel 373 k
lua i386 5.1.2-1.el5 epel 225 k
Transaction Summary
=============================================================================
Install 3 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 644 k
Downloading Packages:
(1/3): lua-5.1.2-1.el5.i3 100% |=========================| 225 kB 00:00
(2/3): lighttpd-1.4.18-3. 100% |=========================| 373 kB 00:00
(3/3): lighttpd-fastcgi-1 100% |=========================| 45 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: lua ######################### [1/3]
Installing: lighttpd ######################### [2/3]
Installing: lighttpd-fastcgi ######################### [3/3]
Installed: lighttpd-fastcgi.i386 0:1.4.18-3.el5
Dependency Installed: lighttpd.i386 0:1.4.18-3.el5 lua.i386 0:5.1.2-1.el5
Complete!
ここではやる気持ちを抑えつつ、LIGHTTPDを起動しようとすると、
# service lighttpd start
lighttpd を起動中: 2009-01-16 20:30:48: (network.c.300) can’t bind to port: 80 Address already in use
[失敗]
となり、httpdは止めます。
# service httpd stop
httpd を停止中: [ OK ]
# service lighttpd start
lighttpd を起動中: [ OK ]
LIGHTTPD 起動です。
そして、fast-cgiを使うために、以下のようにconfファイルを編集します。
# vi /etc/lighttpd/lighttpd.conf
以下コメントアウト
## modules to load
# at least mod_access and mod_accesslog should be loaded
# all other module should only be loaded if really neccesary
# – saves some time
# – saves memory
server.modules = (
# “mod_rewrite”,
# “mod_redirect”,
# “mod_alias”,
“mod_access”,
# “mod_cml”,
# “mod_trigger_b4_dl”,
# “mod_auth”,
# “mod_status”,
# “mod_setenv”,
“mod_fastcgi”, #コメントアウト
# “mod_proxy”,
# “mod_simple_vhost”,
# “mod_evhost”,
# “mod_userdir”,
# “mod_cgi”,
# “mod_compress”,
# “mod_ssi”,
# “mod_usertrack”,
# “mod_expire”,
# “mod_secdownload”,
# “mod_rrdtool”,
“mod_accesslog” )
~~~~
#### fastcgi module
## read fastcgi.txt for more info
## for PHP don’t forget to set cgi.fix_pathinfo = 1 in the php.ini
fastcgi.server = ( “.php” => #コメントアウト
( “localhost” => #コメントアウト
( #コメントアウト
“socket” => “/var/run/lighttpd/php-fastcgi.socket”, #コメントアウト
“bin-path” => “/usr/bin/php-cgi” #コメントアウト
) #コメントアウト
) #コメントアウト
) #コメントアウト
いい感じです。

« 閉じる