{"id":152,"date":"2008-11-02T13:29:28","date_gmt":"2008-11-02T13:29:28","guid":{"rendered":"http:\/\/newblog.mix1009.net\/?p=152"},"modified":"2008-11-02T13:29:28","modified_gmt":"2008-11-02T13:29:28","slug":"centos-52%ec%97%90%ec%84%9c-lighttpd-%ec%84%a4%ec%b9%98","status":"publish","type":"post","link":"https:\/\/mix1009.net\/?p=152","title":{"rendered":"CentOS 5.2\uc5d0\uc11c lighttpd \uc124\uce58"},"content":{"rendered":"<p>\uc804\uc5d0 <a href=\"http:\/\/mix1009.net\/59\">CentOS 4\uc5d0\uc11c lighttpd \uc124\uce58\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud55c \uae00<\/a>\uc744 \uc37c\uc5c8\ub294\ub370 5\uc5d0\uc11c\ub294 \uc124\uce58\uac00 \ub9ce\uc774 \ud3b8\ud574\uc84c\ub124\uc694 \ud83d\ude42<\/p>\n<p>\uc800\ub294 CentOS 5.2 x86_64 \ubc84\uc804\uc5d0\uc11c \uc124\uce58\ud558\uc600\uc2b5\ub2c8\ub2e4.<\/p>\n<p>lighttpd\ub294 <a href=\"http:\/\/dag.wieers.com\/rpm\/packages\/lighttpd\/\">http:\/\/dag.wieers.com\/rpm\/packages\/lighttpd\/<\/a> \uc5d0\uc11c \ubc14\uc774\ub108\ub9ac\ub97c \uad6c\ud574\uc11c \uc124\uce58\ud588\uc2b5\ub2c8\ub2e4. 32 \ube44\ud2b8 \ubc84\uc804\uc5d0\uc11c\ub294 i386.rpm\uc744 \ubc1b\uc544\uc11c \uc124\uce58\ud558\uc138\uc694~<\/p>\n<div style=\"padding: 10px; background-color: rgb(201, 237, 255)\"># wget http:\/\/dag.wieers.com\/rpm\/packages\/lighttpd\/lighttpd-1.4.18-1.el5.rf.x86_64.rpm <br \/>\n# wget http:\/\/dag.wieers.com\/rpm\/packages\/lighttpd\/lighttpd-fastcgi-1.4.18-1.el5.rf.x86_64.rpm<br \/>\n# rpm -i lighttpd-1.4.18-1.el5.rf.x86_64.rpm lighttpd-fastcgi-1.4.18-1.el5.rf.x86_64.rpm\n<\/div>\n<p>\nphp\ub294 \ub530\ub85c \ucef4\ud30c\uc77c\ud558\uc9c0 \uc54a\uace0 php-cli \ud328\ud0a4\uc9c0\uc5d0 \ud3ec\ud568\ub41c \/usr\/bin\/php-cgi \ub97c \uc774\uc6a9\ud558\uba74 \ub418\ub354\uad70\uc694. xcache\ub294 \uc18c\uc2a4\ub97c \ubc1b\uc544\uc11c \uc124\uce58\ud588\uc2b5\ub2c8\ub2e4.<\/p>\n<p>lighttpd\uc640 php(php-cli) \uc124\uce58\ud558\uc2dc\uace0 \/etc\/lighttpd\/lighttpd.conf\ub97c \ud3b8\uc9d1\ud569\ub2c8\ub2e4. php fastcgi\uc124\uc815\uacfc sys epoll \uc0ac\uc6a9\ud558\ub3c4\ub85d \uc124\uc815\ud558\ub294\uac74 \ud544\uc218\uc8e0~<\/p>\n<div style=\"padding: 10px; background-color: rgb(208, 255, 157)\">fastcgi.server &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; = ( &#8220;.php&#8221; =&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; ( &#8220;localhost&#8221; =&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; (<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8220;socket&#8221; =&gt; &#8220;\/tmp\/php-fastcgi.socket&#8221;,<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8220;bin-path&#8221; =&gt; &#8220;\/usr\/bin\/php-cgi&#8221;,<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8220;min-procs&#8221; =&gt; 1,<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8220;max-procs&#8221; =&gt; 2,<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8220;max-load-per-proc&#8221; =&gt; 4,<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8220;idle-timeout&#8221; =&gt; 10,<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8220;bin-environment&#8221; =&gt; ( &#8220;PHP_FCGI_CHILDREN&#8221; =&gt; &#8220;16&#8221;,<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &#8220;PHP_FCGI_MAX_REQUESTS&#8221; =&gt; &#8220;2000&#8221; )<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; )<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; )<\/p>\n<p>server.event-handler = &#8220;linux-sysepoll&#8221;<\/p><\/div>\n<p>xcache\ub294 <a href=\"http:\/\/www.howtoforge.com\/xcache-php5-apache2-fedora8-centos5.1\">http:\/\/www.howtoforge.com\/xcache-php5-apache2-fedora8-centos5.1<\/a> \ub97c \ucc38\uace0\ud574\uc11c \uc124\uce58\ud588\uc2b5\ub2c8\ub2e4. \uacfc\uc815\uc774 \ub2e4 \ud544\uc694\ud55c\uc9c0\ub294 \ubaa8\ub974\uaca0\uc9c0\ub9cc \uadf8\ub0e5 \uadf8\ub300\ub85c \ub530\ub77c\ud588\uc2b5\ub2c8\ub2e4.<\/p>\n<div style=\"padding: 10px; background-color: rgb(201, 237, 255)\"># yum install php-devel<br \/>\n# yum groupinstall &#8216;Development Tools&#8217;<br \/>\n# yum groupinstall &#8216;Development Libraries&#8217;<br \/>\n# wget http:\/\/xcache.lighttpd.net\/pub\/Releases\/1.2.2\/xcache-1.2.2.tar.gz<br \/>\n# tar xzvf xcache-1.2.2.tar.gz<br \/>\n# cd xcache-1.2.2<br \/>\n# phpize<br \/>\n# .\/configure &#8211;enable-xcache<br \/>\n# make<br \/>\n# make install<br \/>\n# cp xcache.ini \/etc\/php.d<br \/>\n# vi \/etc\/php.d\/xcache.ini\n<\/div>\n<p>\n\ub9c8\uc9c0\ub9c9 ini \ud30c\uc77c \ud3b8\uc9d1\uc2dc zend_extension\uc740 \ubaa8\ub450 \uc8fc\uc11d\ucc98\ub9ac\ud558\uace0 extension = xcache.so\ub9cc \uc8fc\uc11d\uc744 \ud480\uc5c8\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\ub9c8\uc9c0\ub9c9\uc73c\ub85c \uc2dc\uc2a4\ud15c \uc2dc\uc791\ud560\ub54c lighttpd \uc2e4\ud589\ud560\uc218 \uc788\ub3c4\ub85d, \uc544\ud30c\uce58 \ub300\uc2e0 lighttpd\ub97c \uc2e4\ud589\ub418\ub3c4\ub85d \ud588\uc2b5\ub2c8\ub2e4.<\/p>\n<div style=\"padding: 10px; background-color: rgb(201, 237, 255)\"># \/usr\/sbin\/apachectl stop<br \/>\n# \/sbin\/chkconfig httpd off<br \/>\n# \/sbin\/chkconfig &#8211;add lighttpd<br \/>\n# \/sbin\/chkconfig lighttpd on<br \/>\n# \/etc\/init.d\/lighttpd start\n<\/div>\n<p>\n\ubc29\ud654\ubcbd(iptables)\uc740 \uc124\uce58\ud560\ub54c 22\uc640 80\ubc88 \ud3ec\ud2b8\ub294 \ud480\uc5b4\uc92c\uc5c8\uc2b5\ub2c8\ub2e4. \ud639\uc2dc \ubc29\ud654\ubcbd\uc774 \uc548 \ud480\ub824\uc788\ub2e4\uba74&#8230; \/etc\/sysconfig\/iptables \ud30c\uc77c\uc744 \ud3b8\uc9d1\ud574\uc11c \ub2e4\uc74c \ub77c\uc778\uc744 \uc801\ub2f9\ud55c \uacf3(REJECT \uc774\uc804)\uc5d0 \ub123\uace0&#8230;<\/p>\n<div style=\"padding: 10px; background-color: rgb(208, 255, 157)\">-A RH-Firewall-1-INPUT -m state &#8211;state NEW -m tcp -p tcp &#8211;dport 80 -j ACCEPT\n<\/div>\n<p>\niptables\ub97c \ub2e4\uc2dc \uc2dc\uc791\ud558\uace0 \uc124\uc815\uc744 \uc800\uc7a5~ (\uc800\uc7a5 \uc548\ud558\uba74 \ub9ac\ubd80\ud305\ud558\uba74 \uc124\uc815 \ub0a0\ub77c\uac00\uc694)<\/p>\n<div style=\"padding: 10px; background-color: rgb(201, 237, 255)\"># \/etc\/init.d\/iptables restart<br \/>\n# \/etc\/init.d\/iptables save\n<\/div>\n<p>\n\uadf8\ub9ac\uace0 selinux \uae30\ub2a5\uc744 \uc0ac\uc6a9\uc911\uc774\uace0 \uc77c\ubc18 \uc0ac\uc6a9\uc790 \uacc4\uc815\uc5d0\uc11c \uc6f9\ud398\uc774\uc9c0\uac00 \uc11c\ube44\uc2a4 \ub418\uac8c \ud558\ub824\uba74&#8230;<\/p>\n<div style=\"padding: 10px; background-color: rgb(201, 237, 255)\"># su &#8211; webuser<br \/>\n$ chmod og+x ~<br \/>\n$ chcon -R -t httpd_user_content_t public_html\n<\/div>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc804\uc5d0 CentOS 4\uc5d0\uc11c lighttpd \uc124\uce58\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud55c \uae00\uc744 \uc37c\uc5c8\ub294\ub370 5\uc5d0\uc11c\ub294 \uc124\uce58\uac00 \ub9ce\uc774 \ud3b8\ud574\uc84c\ub124\uc694 \ud83d\ude42 \uc800\ub294 CentOS 5.2 x86_64 \ubc84\uc804\uc5d0\uc11c \uc124\uce58\ud558\uc600\uc2b5\ub2c8\ub2e4. lighttpd\ub294 http:\/\/dag.wieers.com\/rpm\/packages\/lighttpd\/ \uc5d0\uc11c \ubc14\uc774\ub108\ub9ac\ub97c \uad6c\ud574\uc11c \uc124\uce58\ud588\uc2b5\ub2c8\ub2e4. 32 \ube44\ud2b8 \ubc84\uc804\uc5d0\uc11c\ub294 i386.rpm\uc744 \ubc1b\uc544\uc11c \uc124\uce58\ud558\uc138\uc694~ # wget http:\/\/dag.wieers.com\/rpm\/packages\/lighttpd\/lighttpd-1.4.18-1.el5.rf.x86_64.rpm # wget http:\/\/dag.wieers.com\/rpm\/packages\/lighttpd\/lighttpd-fastcgi-1.4.18-1.el5.rf.x86_64.rpm # rpm -i lighttpd-1.4.18-1.el5.rf.x86_64.rpm lighttpd-fastcgi-1.4.18-1.el5.rf.x86_64.rpm php\ub294 \ub530\ub85c \ucef4\ud30c\uc77c\ud558\uc9c0 \uc54a\uace0 php-cli \ud328\ud0a4\uc9c0\uc5d0 \ud3ec\ud568\ub41c \/usr\/bin\/php-cgi \ub97c \uc774\uc6a9\ud558\uba74 \ub418\ub354\uad70\uc694. xcache\ub294 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[54,13],"_links":{"self":[{"href":"https:\/\/mix1009.net\/index.php?rest_route=\/wp\/v2\/posts\/152"}],"collection":[{"href":"https:\/\/mix1009.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mix1009.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mix1009.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mix1009.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=152"}],"version-history":[{"count":0,"href":"https:\/\/mix1009.net\/index.php?rest_route=\/wp\/v2\/posts\/152\/revisions"}],"wp:attachment":[{"href":"https:\/\/mix1009.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mix1009.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mix1009.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}