ÀÛ¼ºÀÚ ±â¼úÁö¿øºÎ ±è »ï ¼ö
Apache_2.x + Mysql + Php + Zend + OpenSSL ¼³Ä¡ ( 1 ) Source ÆÄÀÏ ´Ù¿î·Îµå ( 2 ) Source ÆÄÀÏ ¾ÐÃàÇØÁ¦ ( 3 ) Apache2 ¼³Ä¡ ( 4 ) Mysql ¼³Ä¡ ( 5 ) GD ¼³Ä¡ ( 6 ) PHP ¼³Ä¡ ( 7 ) ZendOptimizer ¼³Ä¡ ( 8 ) SSL ¼³Á¤ ---------------------------------------------------------------------------------------------- ( 1 ) Source ÆÄÀÏ ´Ù¿î·Îµå wgetÀº À¥¿¡¼ ÀÚµ¿ÀûÀ¸·Î ÆÄÀÏÀ» ¹Þ¾Æ¿À´Âµ¥ »ç¿ëµÇ´Â À¯Æ¿¸®Æ¼À̸ç HTTP, HTTPS, FTP ÇÁ·ÎÅäÄÝÀ» Áö¿øÇÕ´Ï´Ù. ¨ç httpd-2.2.4.tar.gz ´Ù¿î·Îµå »çÀÌÆ® : http://httpd.apache.org/download.cgi [root@nextline ~]# wget http://mirror.apache-kr.org/httpd/httpd-2.2.4.tar.gz ¨è mysql-4.1.22.tar.gz ´Ù¿î·Îµå »çÀÌÆ® : ftp://mysql.byungsoo.net/pub/mysql/ [root@nextline ~]# wget ftp://mysql.byungsoo.net/pub/mysql/Downloads/MySQL-4.1/mysql4.1.22.tar.gz
¨é php-5.2.3.tar.gz ´Ù¿î·Îµå »çÀÌÆ® : http://www.php.net/downloads.php [root@nextline ~]# wget http://www.php.net/get/php-5.2.3.tar.gz/from/kr2.php.net/mirror
¨ê gd-2.0.35.tar.gz ´Ù¿î·Îµå »çÀÌÆ® : http://www.libgd.org/releases/ [root@nextline ~]# wget http://www.libgd.org/releases/gd-2.0.35.tar.gz ¨ë ZendOptimzer-3.3.0-linux-glibc21-i386.tar.gz ´Ù¿î·Îµå »çÀÌÆ® : http://www.zend.com/ ´Ù¿î·Îµå ¹ÞÀº ZendOptimzerÀ» ftpÀ» ÀÌ¿ëÇÏ¿© ¾÷·Îµå ÇÕ´Ï´Ù. ---------------------------------------------------------------------------------------------- ( 2 ) Source ÆÄÀÏ ¾ÐÃàÇØÁ¦ [tar ¸í·É¾î ¿É¼Ç] tar ¸í·É¾î´Â ÆÄÀÏÀ» ¹°Å³ª Ç® ¶§ »ç¿ëµÇ´Â ¸®´ª½º ¸í·É¾î ÀÔ´Ï´Ù. c : tar ÆÄÀÏÀ» »ý¼ºÇÒ ¶§(¿©·¯ °³ÀÇ ÆÄÀÏÀ» ÇϳªÀÇ ÆÄÀÏ·Î ¹À» ¶§) v : ¹À» ¶§³ª Ç®¾îÁÙ ¶§ ÆÄÀϵéÀÇ ³»¿ëÀ» ÀÚ¼¼ÇÏ°Ô º¸·Á°í ÇÒ ¶§. z : gzip°ú °ü·ÃÇÏ¿© ¾ÐÃàÀ̳ª ÇØÁ¦¸¦ ÇѲ¨¹ø¿¡ ÇÏ·Á°í ÇÒ ¶§ »ç¿ë. x : ÁÖ¾îÁø À̸§ÀÇ ÆÄÀÏ¿¡ ´ëÇÏ¿© ÃßÃâ »ç¿ë¹ý: tar [¿É¼Ç] ÆÄÀÏ¸í ¨ç httpd-2.2.4.tar.gz [root@nextline ~]# tar zxvf httpd-2.2.4.tar.gz ¨è mysql-4.1.22.tar.gz [root@nextline ~]# tar zxvf mysql-4.1.22.tar.gz ¨é gd-2.0.35.tar.gz [root@nextline ~]# tar zxvf gd-2.0.35.tar.gz ¨ê php-5.2.3.tar.gz [root@nextline ~]# tar zxvf php-5.2.3.tar.gz
¨ë ZendOptimizer-3.3.0-linux-glibc21-i386.tar.gz [root@nextline ~]# tar zxvf ZendOptimizer-3.3.0-linux-glibc21-i386.tar.gz ¾ÐÃàÇØÁ¦À» ÇØÁ¦ÇÏ¸é ¾Æ·¡¿Í °°ÀÌ ÆÐÅ°Áöº° ¼Ò½ºµð·ºÅ丮°¡ »ý¼ºµË´Ï´Ù. ZendOptimizer-3.3.0-linux-glibc21-i386 mysql-4.1.22 gd-2.0.35 php-5.2.3 httpd-2.2.4 ¨ì OpenSSL ¼³Ä¡»óÅ ȮÀÎ [root@nextline ~]# rpm -qa | grep openssl openssl-0.9.7a-43.8 xmlsec1-openssl-1.2.6-3 openssl-devel-0.9.7a-43.8 À§¿Í °°ÀÌ opensslÀÌ rpm À¸·Î ¼³Ä¡µÇ¾î ÀÖ´ÂÁö È®ÀÎ ÈÄ ¼³Ä¡°¡ µÇ¾îÀÖÁö ¾ÊÀ» ¼ö rpm¹öÀüÀ̳ª Source ¹öÀüÀ¸·Î ¼³Ä¡ÇÏ¼Å¾ß ÇÕ´Ï´Ù. ---------------------------------------------------------------------------------------------- ( 3 ) Apache2 ¼³Ä¡ ¨ç ÄÄÆÄÀÏ È¯°æ¼³Á¤ [root@nextline ~]# cd httpd-2.2.4 [root@nextline httpd-2.2.4]# ./configure \ --prefix=/usr/local/apache \ --enable-ssl \ --enable-rule=SHARED_CORE \ --enable-shared=max \ --enable-module=so \
[ÄÄÆÄÀÏ ¿É¼Ç] ¾ÆÆÄÄ¡°¡ ¼³Ä¡µÉ °æ·Î¸¦ ÁöÁ¤ÇÕ´Ï´Ù. --prefix=/usr/local/apache mod_ssl À» ¸ðµâÀ» ¾ÆÆÄÄ¡¿¡ ¿Ã¸®±âÀ§ÇÑ ¿É¼ÇÀÔ´Ï´Ù. --enable-ssl DSO ¹æ½ÄÀ¸·Î ¾ÆÆÄÄ¡¸¦ ÄÄÆÄÀÏ ÇϱâÀ§ÇÑ ¿É¼ÇÀÔ´Ï´Ù. --enable-rule=SHARED_CORE --enable-shared=max --enable-module=so ¨è ÄÄÆÄÀÏ [root@nextline httpd-2.2.4]# make ¨é ¼³Ä¡ [root@nextline httpd-2.2.4]# make install ¨ê httpd.conf ÆÄÀÏÆíÁý [vi ¿¡µðÅÍ »ç¿ë¹ý] »ç¿ëÇü½Ä: vi [¿É¼Ç] [»ý¼ºÇÒ ÆÄÀϸí/ÆíÁýÇÒ ÆÄÀϸí] vi ¿¡µðÅÍ´Â ÀԷ¸ðµå, ¸í·É¸ðµå, ½ÇÇà¸ðµå·Î ±¸ºÐµË´Ï´Ù. ÀԷ¸ðµå: vi ÆíÁýȸ鿡¼ ¹®ÀÚ¸¦ ÀÔ·ÂÇÒ ¼ö ÀÖ´Â ¸ðµå·Î¼ ÀԷ¸ðµå·Î ÁøÀÔÇϱâ À§Çؼ´Â i, a, o, I, A, O, RµîÀÌ ÀÖ½À´Ï´Ù. Áï Ãʱâ vi ÆíÁý±â ¸ðµå´Â ¸í·É¾î ¸ðµå·Î ÁøÀÔÀ» Çϱ⶧¹®¿¡ ¹®ÀÚ¸¦ ÀÔ·ÂÇϱâ Àü¿¡ ¾ÕÀÇ ´ÜÃàÅ°Áß Çϳª¸¦ ¸ÕÀú ÀÔ·ÂÇØ¾ß ¿øÇÏ´Â ¹®ÀÚ¸¦ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù. ¸í·É¸ðµå: Ä¿¼À̵¿/¹®ÀÚ»èÁ¦/¹®ÀÚ(¿)±³Ã¼/¹®ÀÚ¿°Ë»ö µîÀ» ÇÒ¼ö ÀÖ´Â ¸ðµå·Î¼ ÀԷ¸ðµå¿¡¼ ÆíÁýÀÌ ¿Ï·áµÇ¸é EscÅ°¸¦ ´·¯ ¸í·É¸ðµå·Î ÁøÀÔÇÏ¸é µË´Ï´Ù. ½ÇÇà¸ðµå: Ưº°ÇÑ ¸í·É¾î¸¦ ½ÇÇàÇÏ´Â ¸ðµå·Î¼ ¸í·É¾î¸ðµå¿¡¼ ":"(ÄÝ·Ð)¸¦ ´©¸£¸é vi ȸé ÇÏ´Ü ÁÂÃø¿¡ vi Ư¼ö¸í·É¾î¸¦ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù. [½ÇÇà¸ðµåÀÇ ÀϹÝÀûÀ¸·Î ¾²À̴ Ư¼ö ¸í·É¾î] q : ¼öÁ¤ ÀÛ¾÷ÀÌ ÀÌ·ç¾îÁöÁö ¾ÊÀº »óÅ¿¡¼ vi ÆíÁý±â¿¡¼ ºüÁ®³ª¿É´Ï´Ù. q! : ¼öÁ¤ ÀÛ¾÷ÀÌ ÀÌ·ç¾îÁø ºÎºÐÀ» Àû¿ë½ÃÅ°Áö ¾Ê°í vi ÆíÁý±â¸¦ °Á¦·Î ºüÁ®³ª¿É´Ï´Ù. w : ¼öÁ¤µÈ ÀÛ¾÷À» ÀúÀåÇÕ´Ï´Ù. wq : ¼öÁ¤µÈ ÀÛ¾÷À» ÀúÀåÇÏ°í vi ÆíÁý±â¿¡¼ ºüÁ®³ª¿É´Ï´Ù. Ãʱ⠸í·É¾î¸ðµå-> ÀԷ¸ðµåÁøÀÔ -> ÆíÁý -> ¸í·É¾î¸ðµå -> ½ÇÇà¸ðµå -> Á¾·á [root@nextline httpd-2.2.4]# vi /usr/local/apache/conf/httpd.conf ¨ë ServerName ¼³Á¤ ServerName ºÎºÐ¿¡ ¾ÆÀÌÇÇ È¤Àº µµ¸ÞÀÎÀ» ±âÀÔÇÕ´Ï´Ù. ServerName xxx.xxx.xxx.xxx ¨ì °¡»óÈ£½ºÆ® ¼³Á¤ÆÄÀÏ ÆíÁý ¨í VirtualHost ÆíÁý
¨î Apache µ¥¸ó ½ÃÀÛ [root@nextline httpd-2.2.4]# /usr/local/apache/bin/apachectl start [root@nextline httpd-2.2.4]# netstat -anp | grep httpd tcp 0 0 :::80 :::* LISTEN 10775/httpd ----------------------------------------------------------------------------------------------
( 4 ) Mysql ¼³Ä¡ ¨ç ÄÄÆÄÀÏ È¯°æ¼³Á¤ [root@nextline ~]# cd mysql-4.1.22 [root@nextline mysql-4.1.22]# ./configure --prefix=/usr/local/mysql \ --with-charset=euckr \ [ÄÄÆÄÀÏ ¿É¼Ç] Mysql ÀÌ ¼³Ä¡µÉ °æ·Î¸¦ ÁöÁ¤ÇÏ´Â ¿É¼ÇÀÔ´Ï´Ù. --prefix=/usr/local/mysql ¹®ÀÚ¼ÂÀ» Çѱ¹¾î·Î ¼³Á¤ÇÏ´Â ¿É¼ÇÀÔ´Ï´Ù. --with-charset=euckr ¨è ÄÄÆÄÀÏ [root@nextline mysql-4.1.22]# make ¨é ¼³Ä¡ [root@nextline mysql-4.1.22]# make install ¨ê mysql µ¥ÀÌÅÍ µð·ºÅ丮»ý¼º [root@nextline mysql-4.1.22]# /usr/local/mysql/bin/mysql_install_db ¨ë µ¥ÀÌÅÍ µð·ºÅ丮ȮÀÎ [root@nextline mysql-4.1.22]# ls /usr/local/mysql µ¥ÀÌÅÍ µð·ºÅ丮 [var] ¨ì mysql °èÁ¤»ý¼º [root@nextline mysql-4.1.22]#usradd –M –s /sbin/nologin mysql; passwd mysql New UNIX password : [mysql Æнº¿öµå¸¦ ÁöÁ¤ÇÕ´Ï´Ù] Retype new UNIX password : [mysql Æнº¿öµå¸¦ Àç ÀÔ·ÂÇÕ´Ï´Ù] ¨í mysql µð·ºÅ丮 ¼ÒÀ¯±Çº¯°æ chown - ¸®´ª½ºÀÇ ¼ÒÀ¯±Ç º¯°æ ¸í·É¾î ÀÔ´Ï´Ù. -R ¿É¼Ç - ÇÏÀ§ µð·ºÅ丮±îÁö ¸ðµÎ Àû¿ëÇÕ´Ï´Ù. [root@nextline mysql-4.1.22]#chown –R mysql.mysql /usr/local/mysql ¨î mysql µ¥¸ó±¸µ¿ mysql¸¦ ¹é±×¶ó¿îµå·Î ±¸µ¿ÇÕ´Ï´Ù. [root@nextline mysql-4.1.22]#/usr/local/mysql/bin/mysqld_safe & ¨ï mysql µ¥¸ó ±¸µ¿È®ÀÎ [root@nextline mysql-4.1.22]# netstat -anp | grep mysqld tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 1809/mysqld ¨ð mysql root Æнº¿öµå¼³Á¤ [root@nextline mysql-4.1.22]#/usr/local/mysql/bin/mysqladmin –u root password ¡®xxxxxx' ¨ñ mysql Á¢¼ÓÈ®ÀÎ [root@nextline mysql-4.1.22]#mysql –u root –p Á¢¼ÓÀÌ Á¤»óÀûÀ¸·Î ÀÌ·ç¾îÁö¸ç mysql ¼³Ä¡°¡ ¿Ï·áµÈ ȸéÀÔ´Ï´Ù. ---------------------------------------------------------------------------------------------- ( 5 ) GD ¼³Ä¡
¨ç ÄÄÆÄÀÏ È¯°æ¼³Á¤ [root@nextline ~]# cd gd-2.0.35 [root@nextline gd-2.0.35]# ./configure --prefix=/usr/local/gd2 [ÄÄÆÄÀÏ ¿É¼Ç] GD°¡ ¼³Ä¡µÉ °æ·Î¸¦ ÁöÁ¤ÇÏ´Â ¿É¼ÇÀÔ´Ï´Ù. --prefix=/usr/local/gd2 ¨è ÄÄÆÄÀÏ [root@nextline gd-2.0.35]# make ¨é ¼³Ä¡ [root@nextline gd-2.0.35]# make install ¨ê ¼³Ä¡È®ÀÎ [root@nextline gd-2.0.35]# ls /usr/local/ ---------------------------------------------------------------------------------------------- ( 6 ) PHP ¼³Ä¡
¨ç ÄÄÆÄÀÏ È¯°æ¼³Á¤ [root@nextline ~]# cd php-5.2.3 [root@nextline php-5.2.3]# ./configure --prefix=/usr/local/php \ > --with-apxs2=/usr/local/apache/bin/apxs \ > --with-config-file-path=/usr/local/lib \ > --with-mysql=/usr/local/mysql \ > --with-gd=/usr/local/gd2 \ > --enable-gd-native-ttf \ > --with-freetype-dir=/usr \ > --with-zlib \ > --with-iconv \ > --with-imap \ > --with-imap-ssl \ > --with-kerberos \ > --enable-mbstring \ > --enable-track-vars \ > --enable-ftp \ > --disable-debug [ÄÄÆÄÀÏ ¿É¼Ç] --prefix=/usr/local/php php ¼³Ä¡°æ·Î¸¦ ÁöÁ¤ÇÕ´Ï´Ù. --with-apxs=/usr/local/apache/bin/apxs °øÀ¯µÈ apache ¸ðµâÀ» ¿¬µ¿Çϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù. --with-config-file-path=/usr/local/lib php¼³Á¤ÆÄÀÏ php.iniÆÄÀÏÀÌ Á¸ÀçÇÒ À§Ä¡¸¦ ÁöÁ¤ÇÕ´Ï´Ù. --with-mysql=/usr/local/mysql Mysql°ú ¿¬µ¿Çϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù. --with-gd=/usr/local/gd2 php¿¡¼ gd¶óÀ̺귯¸®°ü·Ã ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© gd¸¦ Áö¿øÇϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù. --enable-gd-native-ttf GD ¶óÀ̺귯¸®¿¡¼ FreeType¸¦ ÇÔÇÏ´Â ¿É¼ÇÀÔ´Ï´Ù. –-with-freetype-dir=/usr freetype2¸¦ Áö¿øÇϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù. --with-zlib µ¥ÀÌÅ;ÐÃà ¶óÀ̺귯¸®·Î¼ php¿¡¼ zlibÀ» Áö¿øÇϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù. --with-iconv ÀÎÄÚµù º¯È¯ÇÁ·Î±×·¥À¸·Î iconv¸¦ Áö¿øÇϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù. --with-imap pop °ú ÇÔ²² ¸ÞÀϼö½Åµ¥¸óÀ¸·Î »ç¿ëµÇ´Â ¼ºñ½º·Î¼ imap¸¦ Áö¿øÇϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù. --with-kerberos Kerberos´Â Ŭ¶óÀ̾ðÆ® ¼¹ö ¾ÖÇø®ÄÉÀ̼ÇÀÇ ÀÔÁõÀ» Á¦°øÇϱâ À§ÇÏ¿© »óĪÀûÀÎ ¾ÏÈ£¹ýÀ» ÀÌ¿ëÇÏ´Â ³×Æ®¿öÅ© ÀÎÁõ ÇÁ·ÎÅäÄݷμ kerberos¸¦ Áö¿øÇϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù. --enable-mbstring multi-byte¹®ÀÚ¸¦ Áö¿øÇϱâ À§ÇÑ ¿É¼ÇÀ¸·Î ¸¹Àº ¾ð¾î¸¦ Ç¥ÇöÇϱâ À§ÇÏ¿© ÀÌ¿ëµÇ¸ç, php¿¡¼ mbstring¸¦ Áö¿øÇϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù. --enable-track-vars HTTP_GET_VARS, HTTP_POST_VARS, HTTP_COOKIE_VARS ¹è¿¿¡ µé¾îÀÖ´Â GET / POST / cookie º¯¼öµéÀÌ ¾îµð·ÎºÎÅÍ ¿Ô´ÂÁö ±â¾ïÇÏ°Ô ¸¸µì´Ï´Ù. ÀÌ ¿É¼ÇÀº ´ÜÁö Default °ª À» Á¤ÇÏ´Â °Í»ÓÀ̸ç, ÈÄ¿¡ configuration fileÀÇ track_vars Áö½ÃÀÚ¿¡ ÀÇÇØ Enable/Disable ÇÒ ¼ö ÀÖ½À´Ï´Ù. --enable-ftp php¿¡¼ ftp°ü·Ã ÇÔ¼ö¸¦ Áö¿øÇϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù. --enable-debug Zend Optimizer¸¦ »ç¿ëÇϱâ À§Çؼ´Â debuggingÀ» »ç¿ëÇÏÁö ¾Ê½À´Ï´Ù. [±×¿Ü ¿É¼Ç] --enable-sockets ¼ÒÄÏ(socket) ÆÄÀÏÀ» »ç¿ëÇϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù. --with-language-korean Çѱ¹¾î¸¦ »ç¿ëÇϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù. --enable-dba=shared DBA¸¦ µ¿ÀûÀ¸·Î ÀûÀçÇÒ ¼ö ÀÖ´Â °øÀ¯ ¸ðµâ ÇüÅ·Π¸¸µå´Â ¿É¼ÇÀÔ´Ï´Ù. --enable-gdbm[=DIR] GDBM Áö¿øÀ» Æ÷ÇÔÇÏ´Â ¿É¼ÇÀÔ´Ï´Ù. --enable-memory-limit php¿¡¼ ¸Þ¸ð¸® Á¦ÇÑ ±â´ÉÀ» Áö¿øÇÏ´Â ¿É¼ÇÀÔ´Ï´Ù. ¨è ÄÄÆÄÀÏ [root@nextline php-5.2.3]#make ¨é ¼³Ä¡ Å×½ºÆ® [root@nextline php-5.2.3]#make test ¨ê report ¹Þ±â ¼³Ä¡ Å×½ºÆ® ÆÄÀÏÀ» ¸ÞÀÏ·Î ¹Þ±â ¿øÇϽøé ȸé°ú °°ÀÌ ¸ÞÀÏÁÖ¼Ò¸¦ ÀÔ·ÂÇÕ´Ï´Ù. Å×½ºÆ®ÆÄÀÏÀÌ ÇÊ¿äÇÏÁö ¾ÊÀ¸½Ã¸é [n] ÀÔ·ÂÇÕ´Ï´Ù. ¨ë ¼³Ä¡ [root@nextline php-5.2.3]#make install ¨ì php ¼³Á¤ÆÄÀÏ º¹»ç [root@nextline php-5.2.3]#cp php.ini-dist /usr/local/lib/php.ini ¨í ¾ÆÆÄÄ¡ ¼³Á¤ÆÄÀÏ ÆíÁý [root@nextline php-5.2.3]#vi /usr/local/apache/conf/httpd.conf ¨î PHP À妽ºÆÄÀÏ ¼³Á¤
DirectoryIndex index.html index.htm index.php index.jsp
¨ï AddType ¼³Á¤ AddType application/x-httpd-php .php .php4 .php3 ¨ð ¼³Á¤ÆÄÀÏ Àû¿ë [root@nextline php-5.2.3]#/usr/local/apache/bin/apachectl restart ---------------------------------------------------------------------------------------------- ( 7 ) ZendOptimizer ¼³Ä¡ ¨ç install.sh ½ÇÇà [root@nextline ~]# cd ZendOptimizer-3.3.0-linux-glibc21-i386 [root@nextline ZendOptimizer-3.3.0-linux-glibc21-i386]# ./install.sh ¨è OK ¨é Zend Optimizer ¶óÀ̼¾½º ȸéÀÔ´Ï´Ù. [EXIT] ¨ê ¶óÀ̼¾½º µ¿ÀÇ È¸éÀÔ´Ï´Ù. [Yes] ¨ë Zend ¼³Ä¡°æ·Î¸¦ ÁöÁ¤Çϴ ȸéÀÔ´Ï´Ù. /usr/local/Zend(Àý´ë°æ·Î) È®ÀÎ ÈÄ ¸¦ ¼±ÅÃÇÕ´Ï´Ù. Zend Optimizer ¼³Ä¡ °æ·Î°¡ ÀÚµ¿ ÁöÁ¤µÇÁö ¾ÊÀ» ½Ã ¼öµ¿À¸·Î /usr/local/Zend °æ·Î¸¦ ÁöÁ¤ÇØ ÁÖ½Ã¸é µË´Ï´Ù. (Linux OSÀÇ ÀÀ¿ëÇÁ·Î±×·¥Àº ±âº» /usr/local¿¡ ¼³Ä¡µÇ±â ¶§¹®¿¡ /usr/local/Zend·Î ÁöÁ¤ÇÕ´Ï´Ù.) [OK] ¨ì php.iniÀÇ °æ·Î¸¦ ÁöÁ¤Çϴ ȸéÀÔ´Ï´Ù. php¼³Ä¡ ½Ã php.ini ÆÄÀÏÀÌ /usr/local/lib¿¡ »ý¼ºµÇ±â ¶§¹®¿¡ /usr/local/lib(Àý´ë°æ·Î) ÁöÁ¤ÇÕ´Ï´Ù. [OK] ¨í Zend Optimizer + Apache ¿¬µ¿ÇÒ °ÍÀÎÁö¸¦ ¹¯´Â ȸéÀÔ´Ï´Ù [Yes] ¨î apaachectlÀÇ °æ·Î¸¦ ÁöÁ¤Çϴ ȸéÀÔ´Ï´Ù. [OK] ¨ï php.ini ÆÄÀÏÀÇ php.ini-zend_optimizer.bak ¹é¾÷ÆÄÀÏÀ» »ý¼ºÇϴ ȸéÀ̸ç, »ý¼ºÀ§Ä¡´Â php.ini ÆÄÀÏÀÌ Á¸ÀçÇÏ´Â /usr/local/lib °æ·Î¿¡ »ý¼ºµË´Ï´Ù. [OK] ¨ð Zend Optimizer ¼³Ä¡¿Ï·á ȸéÀÔ´Ï´Ù [OK] ¨ñ apache Àç ½ÃÀÛÀ» ¹¯´Â ȸéÀÔ´Ï´Ù [Yes] ¨ò Apache Àç ½ÃÀÛ ¼º°ø [OK] ¨ó phpinfo ÆÄÀÏ»ý¼º [root@nextline ~]#vi /usr/local/apache/htdocs/php_test.php ¨ô phpinfo Äڵ弳Á¤ phpinfo(); ?> ¨õ APM ¿¬µ¿È®ÀÎ http://¾ÆÀÌÇÇ/php_test.php ---------------------------------------------------------------------------------------------- ( 8 ) SSL ¼³Á¤
¨ç °³ÀÎÅ° »ý¼º [root@nextline ~]# cd /usr/local/src 1024¹ÙÀÌÆ®ÀÇ ¾ÏÈ£È °³ÀÎÅ°¸¦ »ý¼ºÇÕ´Ï´Ù. [root@nextline src]# openssl genrsa 1024 > nextline.co.kr.key ¨è CSR »ý¼º [root@nextline src]# openssl req –new –key nextline.co.kr.key > nextline.co.kr.csr
¨é CSR Á¤º¸ÀÔ·Â Country Name (±¹°¡ÄÚµåÀÔ·Â) [GB]:KR State or Province Name (½Ã/µµÀÇ ÀüüÀ̸§ ÀÔ·Â) [Berkshire]: Seongnam Gyeonggi-do Locality Name (½Ã,±¸,±º µîÀÇ À̸§ ÀÔ·Â) [Newbury]: Yatap-dong Bundang-gu Organization Name (ȸ»çÀ̸§ ÀÔ·Â) [My Company Ltd]:nextline Organizational Unit Name (ºÎ¼¸í) []:Technological Support Department Common Name (ÀÎÁõ¹ÞÀ» µµ¸ÞÀÎ ÀÔ·Â) []:nextline.co.kr Email Address (¹ß±Þ ÀÎÁõ¼¸¦ ¼ö½ÅÇÒ À̸ÞÀÏ ÀÔ·Â)[]:ask@nextline.co.kr Ãß°¡Á¤º¸´Â ÀÔ·ÂÀº ¼±ÅûçÇ×À̹ǷΠÀÔ·ÂÀ» ÇÏÁö ¾ÊÀ¸½Ã·Á¸é Enter ÀÔ·Â Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: Enter An optional company name []: Enter [CSR Ç׸ñ¿¡ ´ëÇÑ ¼³¸í] Country Name : ÀÌ°ÍÀº µÎ ÀÚ·Î µÈ ISO Çü½ÄÀÇ ±¹°¡ ÄÚµåÀÔ´Ï´Ù. State or Province Name : ½Ã À̸§À» ÀÔ·ÂÇØ¾ß ÇÏ¸ç ¾à¾î¸¦ »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù. Locality Name : ÀÌ Çʵå´Â ´ëºÎºÐÀÇ °æ¿ì »ý·«ÀÌ °¡´ÉÇÏ¸ç ¾÷ü°¡ À§Ä¡ÇÑ °÷¸¦ ³ªÅ¸³À´Ï´Ù. Organization : »ç¾÷ÀÚ µî·ÏÁõ¿¡ Àִ ȸ»ç¸í°ú ÀÏÄ¡µÇ´Â ¿µ¹®È¸»ç¸íÀ» ÀÔ·ÂÇÏ½Ã¸é µË´Ï´Ù. Organization Unit : "¸®´ª½º °ü¸®ÆÀ", "À©µµ¿ì °ü¸®ÆÀ" µî°ú °°ÀÌ ¾÷üÀÇ ºÎ¼¸¦ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù. Common Name : ÀÎÁõ¹ÞÀ» µµ¸ÞÀÎÁÖ¼Ò¸¦ ÀÔ·ÂÇÏ½Ã¸é µË´Ï´Ù. ÀÌ Á¤º¸·Î À¥ »çÀÌÆ®¸¦ ½Äº°ÇϹǷΠȣ½ºÆ® À̸§À» º¯°æÇÒ °æ¿ì ´Ù¸¥ µðÁöÅÐ ID¸¦ ¿äûÇØ¾ß ÇÕ´Ï´Ù. È£½ºÆ®¿¡ ¿¬°áÇϴ Ŭ¶óÀ̾ðÆ® ºê¶ó¿ìÀú°¡ µðÁöÅÐ IDÀÇ À̸§°ú URLÀÌ ÀÏÄ¡ÇÏ´ÂÁö¸¦ È®ÀÎÇÕ´Ï´Ù. [CSR Ç׸ñ ÀԷ½à ÁÖÀÇ»çÇ×] Common Name ¿¡´Â ÀÎÁõ¼¸¦ ¼³Ä¡ÇÒ »çÀÌÆ®ÀÇ µµ¸ÞÀÎÀÇ À̸§À» Á¤È®ÇÏ°Ô ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù. Common Name ¿¡´Â IP ÁÖ¼Ò, Æ÷Æ®¹øÈ£, °æ·Î¸í, http:// ³ª https:// µîÀº Æ÷ÇÔÇÒ ¼ö ¾ø½À´Ï´Ù. CSR Ç׸ñ¿¡´Â < > ~ ! @ # $ % ^ * / \ ( ) ? µîÀÇ Æ¯¼ö 68 ¹®ÀÚ¸¦ ³ÖÀ» ¼ö ¾ø½À´Ï´Ù. CSR »ý¼ºÈÄ ¼¹ö¿¡ °³ÀÎÅ° (Private Key) °¡ »ý¼ºµË´Ï´Ù. °³ÀÎÅ°¸¦ »èÁ¦Çϰųª ºÐ½ÇÇÒ °æ¿ì ÀÎÁõ¼¸¦ ¹ß±Þ¹Þ¾Æµµ ¼³Ä¡°¡ ºÒ°¡ÇÕ´Ï´Ù. µû¶ó¼ ²À °³ÀÎÅ°¸¦ ¹é¾÷¹Þ¾Æ µÎ¼Å¾ß ÇÕ´Ï´Ù. Á¤º¸ÀԷ°úÁ¤ ¸¶Áö¸·¿¡ ³ª¿À´Â A challenge password ¿Í An optional company name µÎ Ç׸ñÀº ÀÔ·ÂÇÏÁö ¸¶½Ã°í Enter ¸¸ ´©¸£°í ³Ñ¾î°¡¾ß ÇÕ´Ï´Ù. µÎ Á¤º¸°¡ ÀÔ·ÂµÉ °æ¿ì À߸øµÈ CSR »ý¼ºµÉ ¼ö ÀÖ½À´Ï´Ù. ¨ê CRT »ý¼º [root@nextline src]# openssl req –x509 –key nextline.co.kr.key –in nextline.co.kr.csr > nextline.co.kr.crt ¨ë »ý¼ºÅ° È®ÀÎ ¨ì »ý¼ºÅ°¸¦ ÀúÀåÇÒ µð·ºÅ丮 »ý¼º [root@nextline src]#mkdir /usr/local/apache/conf/ssl.crt [root@nextline src]#mkdir /usr/local/apache/conf/ssl.key [CRT/KEY] Å° °ªÀ» À§¿¡¼ »ý¼ºÇÑ µð·ºÅ丮 °æ·Î·Î À̵¿ÇÕ´Ï´Ù. [root@nextline src]#mv nextline.co.kr.crt /usr/local/apache/conf/ssl.crt/ [root@nextline src]# mv nextline.co.kr.key/usr/local/apache/conf/ssl.key ¨í ¾ÆÆÄÄ¡ ¼³Á¤ÆÄÀÏ ÆíÁý [root@nextline src]#vi /usr/local/apache/conf/httpd.con ¨î SSL ¼³Á¤ÆÄÀÏ ÁÖ¼®Á¦°Å # Secure (SSL/TLS) connections Include conf/extra/httpd-ssl.conf ¨ï SSL ¼³Á¤ÆÄÀÏ ÆíÁý [root@nextline src]#vi /usr/local/apache/conf/extra/httpd-ssl.conf ¨ð VirtualHost µµ¸ÞÀμ³Á¤
DocumentRoot "/home/nextline/public_html" ServerName nextline.co.kr SSLCertificateFile /usr/local/apache/conf/ssl.crt/nextline.co.kr.crt [ÀÎÁõ¼ ÆÄÀÏ°æ·Î] SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/nextline.co.kr.key [°³ÀÎÅ° ÆÄÀÏ°æ·Î] httpd-ssl.conf ±âº»¼³Á¤³»¿ë
DocumentRoot "/home/nextline/public_html" ServerName nextline.co.kr SSLEngine on SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL SSLCertificateFile /usr/local/apache/conf/ssl.crt/nextline.co.kr.crt SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/nextline.co.kr.key
SSLOptions +StdEnvVars
SSLOptions +StdEnvVars
BrowserMatch ".*MSIE.*" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 CustomLog /usr/local/apache/logs/ssl_request_log \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
¸ðµç º¸¾È °¡»ó È£½ºÆ®µéÀº ´ë°³ httpd.conf ÆÄÀÏÀÇ ³¡ºÎºÐ¿¡ À§Ä¡ÇÑ ¿Í »çÀÌ¿¡ Æ÷ÇԵǾî¾ß ÇÕ´Ï´Ù. SSL¿¡ ´ëÇÑ °¡Àå Áß¿äÇÑ Áö½Ã´Â SSLEngine on, SSLCertiFficateFile, SSLCertificateKeyFile°ú ¸¹Àº °æ¿ì¿¡ ÀÖ¾î SSLCACertificateFile Áö½ÃÀÚÀÔ´Ï´Ù. SSL ¿£Áø SSLEngine on ÀÌ Áö½Ã´Â SSLÀ» ±¸µ¿ÇÏ´Â ModSSLÀÇ ¸í·ÉÀÔ´Ï´Ù. SSLCertificateFile SSLCertificateFileÀº ÀÎÁõ¼ À§Ä¡¿Í ±× À̸§À» ¾ÆÆÄÄ¡¿¡°Ô ¾Ë·ÁÁÝ´Ï´Ù. SSLCertificateKeyFile SSLCertificateKeyFileÀº ºñ¹ÐÅ° À̸§°¡ ±× À§Ä¡¸¦ ¾ÆÆÄÄ¡¿¡°Ô ¾Ë·ÁÁÖ¸ç ¿©±â¼ Á¤ÀÇµÈ µð·ºÅ丮´Â ´ÜÁö ·çÆ®¿¡°Ô¸¸ Àбâ/¾²±â Çã°¡±ÇÀÌ ÁÖ¾îÁ®¾ß ÇÏ¸ç ´Ù¸¥ ´©±¸µµ ÀÌ µð·ºÅ丮¿¡ ¾×¼¼½ºÇÏÁö ¸øÇØ¾ß ÇÕ´Ï´Ù. SSLCACertificateFile SSLCACertificateFileÁö½Ã´Â Intermediate(root) ÀÎÁõ¼ À§Ä¡¸¦ ¾ÆÆÄÄ¡¿¡°Ô ¾Ë·ÁÁÝ´Ï´Ù. ¨ñ SSL ¼³Á¤ÆÄÀÏ Àû¿ë [root@nextline src]#vi /usr/local/apache/bin/apachectl restart ¨ò SSL 443 Æ÷ƮȮÀÎ [root@nextline src]# netstat -anp | grep httpd tcp 0 0 :::80 :::* LISTEN 2215/httpd tcp 0 0 :::443 :::* LISTEN 2215/httpd ¨ó https Á¢¼ÓÅ×½ºÆ® https://nextline.co.kr Á¢¼ÓÀ» ÇÏ½Ã¸é ¾Æ·¡¿Í°°ÀÌ º¸¾È°æ°í âÀÌ º¸¿©Áý´Ï´Ù. [¿¹] – [Enter] ¨ô SSL º¸¾ÈÀû¿ë ȸé SSL Àû¿ëÀÌ ¿Ï·áµÇ¾úÀ¸¹Ç·Î °øÀÎÀÎÁõ¼¾Å͸¦ ÀÌ¿ëÇÏ¿© ÀÎÁõ¼¸¦ ¹ß±ÞÇÕ´Ï´Ù.
|
|