root@wl ~ # wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.02.tar.gz root@wl ~ # tar xvfz pcre-8.02.tar.gz root@wl ~ # cd pcre-8.02 root@wl ~/pcre-8.02 # ./configure --enable-utf8 --enable-unicode-properties --enable-pcregrep-libz root@wl ~/pcre-8.02 # make root@wl ~/pcre-8.02 # make install
root@wl ~ # wget http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.26.tar.gz root@wl ~ # tar xvfz lighttpd-1.4.26.tar.gz root@wl ~ # cd lighttpd-1.4.26 root@wl ~/lighttpd-1.4.26 # CC=/usr/sfw/bin/gcc ./configure \ --prefix=/usr/local/lighttpd \ --with-mysql=/usr/local/mysql/bin/mysql_config \ --with-ldap \ --with-openssl=/usr/local/ssl \ --with-zlib \ --with-memcache root@wl ~/lighttpd-1.4.26 # make root@wl ~/lighttpd-1.4.26 # make install root@wl ~/lighttpd-1.4.26 # cp doc/lighttpd.conf /etc/lighttpd.conf
root@wl ~ # mkdir -p /var/log/lighttpd
root@wl ~ # mkdir -p /srv/www/htdocs/
root@wl ~ # vi /etc/lighttpd.conf 1)
server.document-root = "/srv/www/htdocs/"
root@wl ~ # /usr/local/lighttpd/sbin/lighttpd -f /etc/lighttpd.conf
root@wl ~ # pkill lighttpd
1) lighttpd.conf 파일이 설정 파일이다. conf 파일에, 사용 가능한 설정을 샘플과 같이 설명하고 있으니, 읽어보면서 설정하면 된다. 아파치와 크게 다르지 않다.
root@wl ~/php-5.2.13 # ./configure \ --prefix=/usr/local/php \ --enable-fastcgi \ ...
root@wl ~ # /usr/local/php/bin/php-cgi -b 127.0.0.1:10001 &
root@wl ~ # vi /etc/lighttpd.conf
server.modules 의 "mod_fastcgi" 주석을 제거
fastcgi.server = ( ".php" =>( "localhost" =>("host" => "127.0.0.1","port" => 10001 )))
root@wl ~ # pkill lighttpd
root@wl ~ # /usr/local/lighttpd/sbin/lighttpd -f /etc/lighttpd.conf
root@wl ~ # vi /srv/www/htdocs/phpi.php <? phpinfo(); ?> root@wl ~ #

|
|
Copyright © 2004-2010 Jo HoSeok. All rights reserved. |