쉶썝媛엯| 븘씠뵒/鍮꾨踰덊샇
 
蹂댁븞꽌踰(SSL) 援ъ텞븯湲- apache 1.3 + mod_ssl

    mysql, gd, imap벑쓽 뙣궎吏뒗 씠誘 源붾젮 엳뒗 긽깭씠硫, 紐⑤뱺 뙣궎吏뒗 /usr/local/src/ 뵒젆넗由 븞뿉 떎슫濡쒕뱶 諛쏆 긽깭濡 꽕移섎 떆옉븳떎.


    1. 냼뒪瑜 떎슫 諛쏆 뵒젆넗由щ줈 씠룞

    [root@localhost root]# cd /usr/local/src


    2. 븬異 湲

    [root@localhost src]# tar xvzf apache_1.3.33.tar.gz
    [root@localhost src]# tar xvzf mod_ssl-2.8.22-1.3.33.tar.gz
    [root@localhost src]# tar xvzf php-4.3.10.tar.gz
    [root@localhost src]# tar xvzf ZendOptimizer-2.6.2-linux-glibc21-i386.tar.gz


    3. mod_ssl configure

    [root@localhost src]# cd mod_ssl-2.8.22-1.3.33
    [root@localhost mod_ssl-2.8.22-1.3.33]# ./configure --with-apache=../apache_1.3.33


    4. apache 꽕移

    - apache瑜 꽕移섑븯湲곗쟾뿉, source 뵒젆넗由щ궡쓽 src/include/httpd.h 뙆씪뿉꽌 #define HARD_SERVER_LIMIT 遺遺꾩쓣 1024濡 닔젙 븳떎.  뵒뤃듃媛 256쑝濡 而댄뙆씪 븯寃 릺硫, 븘뙆移 뜲紐ъ씠 理쒕 256媛 源뚯 諛뽰뿉 쑑닔 뾾寃 맂떎, 씠윴 寃쎌슦뒗 꽌踰꾩쓽 젒냽웾씠 留롮쓣寃쎌슦 꽌踰꾩쓽 옄썝씠 궓븘룄 뜑 씠긽쓽 뜲紐ъ쓣 쓣슦吏 紐삵빐꽌 꽌踰꾧 뒓젮吏寃 맂떎.

    [root@localhost mod_ssl-2.8.22-1.3.33]# cd /usr/local/src/apache_1.3.33
    [root@localhost apache_1.3.33]# SSL_BASE=/path-to-openssl (ex : SSL_BASE=/usr)
    [root@localhost apache_1.3.33]# ./configure --prefix=/usr/local/apache --enable-module=so --enable-shared=max --enable-module=ssl
    [root@localhost apache_1.3.33]# make
    [root@localhost apache_1.3.33]# make certificate

    - make certificate 떎뻾떆 뿬윭媛吏 젙蹂대 臾쇱뼱蹂닿쾶 맂떎. 쉶궗, 二쇱냼, 遺꽌 씠硫붿씪벑 ssl 씤利앺궎 諛쒓툒뿉 븘슂븳 젙蹂닿 엯젰맂 csr 肄붾뱶瑜 깮꽦븯뒗뜲 븘슂븳 젙蹂대뱾씠湲 븣臾몄뿉 젙솗븳 젙蹂대 엯젰븳떎. 留덉留됱뿉 뙣뒪썙뱶 꽕젙 遺遺꾩 n 쓣 몢踰 엯젰.(y瑜 꽑깮븷寃쎌슦 apachectl startssl 떎뻾떆 뙣뒪썙뱶瑜 臾쇱뼱蹂몃떎)

    - make certificate 떎뻾떆 븘臾 젙蹂대 엯젰븯吏 븡怨 뿏꽣궎留 엯젰븳썑 留덉留됱쓽 뙣뒪썙뱶 꽕젙遺遺꾨쭔 n 쓣 꽑깮빐꽌 꽕移섎 吏꾪뻾빐룄 맖. 씠 寃쎌슦뒗 apache+mod_ssl+php 쓽 꽕移섍 셿猷뚮맂 썑 openssl 紐낅졊쑝濡 csr 肄붾뱶瑜 옱깮꽦 븷 닔 엳떎.

    [root@localhost apache_1.3.33]# make install

    +--------------------------------------------------------+
    | You now have successfully built and installed the      |
    | Apache 1.3 HTTP server. To verify that Apache actually |
    | works correctly you now should first check the         |
    | (initially created or preserved) configuration files   |
    |                                                        |
    |   /usr/local/apache/conf/httpd.conf
    |                                                        |
    | and then you should be able to immediately fire up     |
    | Apache the first time by running:                      |
    |                                                        |
    |   /usr/local/apache/bin/apachectl start
    |                                                        |
    | Or when you want to run it with SSL enabled use:       |
    |                                                        |
    |   /usr/local/apache/bin/apachectl startssl
    |                                                        |
    | Thanks for using Apache.       The Apache Group        |
    |                                http://www.apache.org/  |
    +--------------------------------------------------------+

    - 쐞 媛숈씠 異쒕젰릺硫 꽕移 셿猷. httpd.conf 뙆씪쓣 닔젙븳 썑 apache 뜲紐 떎뻾. 꽕移섏쨷뿉 뙣뒪썙뱶 꽕젙쓣 븯떎硫, 뙣뒪썙뱶瑜 엯젰븯怨 뜲紐ъ쓣 떎뻾븳떎. ssl 꽌踰꾨줈 떆옉븯湲 쐞빐꽌 startssl 紐낅졊쑝濡 떆옉.

    [root@localhost apache_1.3.33]# /usr/local/apache/bin/apachectl startssl


    5. PHP 꽕移 (DB,imap,gd,apache)

    [root@localhost apache_1.3.33]# cd /usr/local/src/php-4.3.10
    [root@localhost php-4.3.10]# ./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/bin/apxs --enable-sysvshm=yes --enable-sysvsem=yes --enable-debug=no --enable-track-vars=yes --enable-url-fopen-wrapper=yes --with-ttf --with-png-dir=/usr --with-zlib-dir --with-jpeg-dir=/usr --with-gdbm=/usr --enable-ftp --with-tiff-dir=/usr --enable-memory-limit --enable-mbstring --with-expat-dir=/usr --enable-sockets --enable-wddx --with-freetype-dir=/usr --enable-bcmath --enable-mbstr-enc-trans --enable-mbregex --enable-exif --with-gd --enable-gd-native-ttf --enable-gd-imgstrttf --enable-calendar --with-openssl=/usr

    - php configure떆뿉 뿉윭媛 諛쒖깮븯뒗 寃쎌슦뒗 꽌踰꾩뿉 븘슂븳 뙣궎吏媛 꽕移섎릺뼱 엳吏 븡湲 븣臾몄씠嫄곕굹 븘슂븳 뙣궎吏쓽 踰꾩쟾씠 궙븘꽌 諛쒖깮븯뒗 寃쎌슦媛 遺遺꾩씠떎. 뼱뼡뙣궎吏瑜 泥댄겕븯뒗 遺遺꾩뿉꽌 뿉윭媛 諛쒖깮븯뒗吏 솗씤 븳 썑 yum install 紐낅졊쑝濡 븘슂븳 뙣궎吏瑜 꽕移 븳 썑 떎떆 configure 븯嫄곕굹, 븘슂븯吏 븡뒗 뙣궎吏씪 寃쎌슦 configure 샃뀡뿉꽌 궘젣븯怨 configure瑜 떎떆 떎뻾븳떎.
    [root@localhost php-4.3.10]# make
    [root@localhost php-4.3.10]# make install
    [root@localhost php-4.3.10]# cp php.ini-dist /usr/local/php/lib/php.ini


    6. ZendOptimizer 꽕移

    [root@localhost php-4.3.10]# cd ZendOptimizer-2.6.2-linux-glibc21-i386
    [root@localhost ZendOptimizer-2.6.2-linux-glibc21-i386]# ./install.sh

    - install.sh 뙆씪쓣 떎뻾븳 썑 apache php愿젴맂 젙蹂대 엯젰븳 썑 꽕移섎 셿猷뚰븳떎.


    7. httpd.conf 뙆씪 닔젙썑 apache 由ъ뒪듃

    - httpd.conf 뙆씪뿉 php媛 씤떇릺룄濡 븘옒 援щЦ쓣 異붽븳떎.

       #################################################
        AddType application/x-httpd-php .php .html .htm
        AddType application/x-httpd-php-source .phps
       #################################################

    - httpd.conf 닔젙썑 apache 뜲紐ъ 옱떎뻾븳떎. ssl 꽌踰꾨줈 떆옉븯湲 쐞빐꽌 startssl 紐낅졊쑝濡 떆옉.

    [root@localhost ZendOptimizer-2.6.2-linux-glibc21-i386]# cd /usr/local/apache/conf
    [root@localhost conf]# /usr/local/apache/bin/apachectl stop
    [root@localhost conf]# /usr/local/apache/bin/apachectl startssl