ANTON
|
2009-06-28 05:04:39, Á¶È¸ : 290, Ãßõ : 38 |
APACHE+ PHP + MYSQL with GD ¼³Ä¡Çϱâ
ÀÛ¼ºÀÚ : ±èÁö¿õ
ÀÛ¼ºÀÏ : 2004³â 2¿ù 5ÀÏ
Ãâó(¿ø¹®)¹× ¼Ò½º : www.phpschool.com -> °Á¶õÀÇ APM+GD ¼³Ä¡Çϱâ
Âü°í : kldp.org apache.co.kr phpschool.com
APACHE 1.3.2X ¹öÀü
PHP 4.X ¹öÀü
MYSQL 3.5X ¹öÀü ¶Ç´Â Oracle 8i(9i)
0. RPMÀ» Áö¿î´Ù (´ÙÀ½Áß Àڽſ¡°Ô ¼³Ä¡µÈ Ç׸ñ¸¸ Áö¿ì¸éµË´Ï´Ù. )
¿ì¼± apache, mysql, php °ü·Ã RPMÀ» ¸ðµÎ »èÁ¦ÇÑÈÄ.. ´ÙÀ½ Ç׸ñÀ» Âü°íÇÏ¿©.. »èÁ¦ÇÕ´Ï´Ù.
shell>rpm -qa|grep apache
shell>rpm -qa|grep mysql //
shell>rpm -qa|grep php // ÀÌ»óÀÇ ¸í·ÉÀ» ÅëÇØ ÀÚ½ÅÀÇ ¼¹ö¿¡ ¼³Ä¡µÈ Ç׸ñµéÀ» ¾Ë¼ö ÀÖÀ½.
rpm -e --nodeps zlib
rpm -e --nodeps zlib-devel
rpm -e --nodeps curl
rpm -e --nodeps curl-devel
rpm -e --nodeps freetype
rpm -e --nodeps freetype-devel
rpm -e --nodeps freetype-utils
rpm -e --nodeps gd
rpm -e --nodeps gd-devel
rpm -e --nodeps libjpeg
rpm -e --nodeps libjpeg-devel
rpm -e --nodeps mm
rpm -e --nodeps mm-devel
rpm -e --nodeps libpng
rpm -e --nodeps libpng-devel
rpm -e --nodeps libjpegxx // xx ºÎºÐÀº libjpegÀÇ ¹öÀüÀÓ, ÇÊÀÚÀÇ °æ¿ì 6a
rpm -e --nodeps libjpegxx-devel // xx ºÎºÐÀº libjpegÀÇ ¹öÀüÀÓ
rpm -e --nodeps libjpegxx // xx ºÎºÐÀº libjpegÀÇ ¹öÀüÀÓ, ÇÊÀÚÀÇ °æ¿ì 6a
rpm -e --nodeps libungif
rpm -e --nodeps libungif-devel
rpm -e --nodeps libtiff
rpm -e --nodeps libtiff-devel
1.Mysql À» ¼³Ä¡ÇÑ´Ù.
shell>tar -xvzf mysql-3.23.56.tar.gz
shell>cd mysql-3.23.56
shell> ./configure \
--prefix=/usr/local/mysql \
--enable-assembler \
--localstatedir=/usr/local/mysql/data \
--with-charset=euc_kr \
--with-extra-charsets=none \
--with-mysqld-user=mysql \
--without-isam \
--sysconfdir=/etc \
--with-innodb \
--enable-thread-safe-client \
--with-mysqld-ldflags=-all-static \
--with-client-ldflags=-all-static
# ÄÄÆÄÀÏ
shell>make
# ÀνºÅç
shell>make install
# µ¥ÀÌÅͺ£À̽º ¼³Ä¡
/usr/local/mysql/bin/mysql_install_db
# mysql °èÁ¤À» ¸¸µé°í ¼³Ä¡µð·ºÅ丮ÀÇ Æ۹̼Ǻ¯°æ
groupadd mysql
useradd -d /usr/local/mysql -g mysql mysql
chown mysql:mysql /usr/local/mysql –R
# ±âº»È¯°æÆÄÀÏ ¼öÁ¤
# /usr/local/mysql/share/mysql ¿¡ ÀÖ´Â my-huge.cnf, my-large.cnf, my-medium.cnf, my-small.cnf
# 4°³ÀÇ ±âº» ¼³Á¤ ÆÄÀÏÀÌ ÀÖ´Ù. À̰͵é Áß Çϳª¸¦ ¼±Åà Çؼ /etc/my.cnf ·Î º¹»ç, ÆÄÀϼ±ÅÃÀº ¸Þ¸ð¸®¿ë·®¿¡ ±âÁØÇÏ¿© ¼±ÅÃÇÏ¸é µÈ´Ù.
cp /opt/mysql/share/mysql/my-small.cnf /etc/my.cnf
cp /opt/mysql/share/mysql/my-large.cnf /etc/my.cnf
cp /opt/mysql/share/mysql/my-medium.cnf /etc/my.cnf
# /etc/my.cnf ¼öÁ¤ (Çѱۻç¿ëÀ» À§Çؼ [mysqld] ¾Æ·¡¿¡ ´ÙÀ½ÁÙ Ãß°¡)
vi /etc/my.cnf
# Try number of CPU's*2 for thread_concurrency
set-variable = thread_concurrency=4
default-character-set = euc_kr
language = /usr/local/mysql/share/mysql/korean
# ¶óÀ̺귯¸® µî·Ï
echo /opt/mysql/lib/mysql >> /etc/ld.so.conf
ldconfig
# ±¸µ¿ÆÄÀÏ º¹»ç ¹× ±¸µ¿ (Âü°í ::: /opt/mysql/bin/safe_mysqld --log --user=mysql --log-update=update.log -O max_connections=500 -O max_connect_errors=999999999 &)
cp /usr/local/mysql/share/mysql/mysql.server /etc/rc.d/init.d/mysqld
/etc/rc.d/init.d/mysqld start
/etc/rc.d/init.d/mysqld stop
# root ºñ¹Ð¹øÈ£ »ý¼º
/opt/mysql/bin/mysqladmin -u root password 'ºñ¹Ð¹øÈ£'
### root ºñ¹Ð¹øÈ£ ºÐ½Ç½Ã ###
/etc/rc.d/init.d/mysqld stop
/opt/mysql/bin/safe_mysqld --skip-grant &
mysql
mysql> UPDATE user SET Password=PASSWORD('vkvkdltm') WHERE user='root';
mysql> FLUSH PRIVILEGES;
mysql> exit
2. http://www.gzip.org/zlib/ ¿¡¼ zlib À» ´Ù¿î ¹Þ´Â´Ù.
3.
shell>tar -xvzf zlib-1.1.4.tar.gz
shell>mv zlib-1.1.4 zlib
shell>cd zlib
shell>./configure -s // libz.so °ü·Ã¸ðµâ»ý¼º
shell>make
shell>./configure // libz.a »ý¼º
shell>make test
shell>make install
shell>cp libz.so* /usr/local/lib
shell>cd /usr/local/lib
shell>rm -rf libz.so
shell>rm -rf libz.so.1
shell>ln -s libz.so.1.1.4 libz.so
shell>ln -s libz.so.1.1.4 libz.so.1
shell>vi /etc/ld.so.conf
/usr/local/libÃß°¡
shell>ldconfig Àû¿ë¸í·É
4. http://curl.haxx.se/download.html ¿¡¼ curl À» ´Ù¿î ¹Þ´Â´Ù.
5. curl ¼³Ä¡
shell>tar -xvzf curl-7.10.3.tar.gz
shell>cd curl-7.10.3
shell>./configure
shell>make
shell>make install
¡Øcurl ¶óÀ̺귯¸®´Â /usr/local/lib ³ª¸ÓÁö Çì´õ´Â/usr/local/include/curl ·Î µé¾î°£´Ù
6. http://mhash.sourceforge.net/dl ¿¡¼ mhashÀÇ ÃֽŠ¹öÀüÀ» ´Ù¿î ¹Þ´Â´Ù.
7. mhash ¼³Ä¡
shell>tar -xvzf mhash-0.8.13.tar.gz
shell>cd mhash-0.8.13
shell>./configure
shell>make
shell>make install
8. ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/ ¿¡¼ libmcryptÀÇ ÃֽŠ¹öÀüÀ» ´Ù¿î ¹Þ´Â´Ù.
9. libmcrpyt ¼³Ä¡
shell>tar -xvzf libmcrypt-2.5.6.tar.gz
shell>cd libmcrypt-2.5.6
shell>./configure
shell>make
shell>make install
10. http://www.fastio.com ¿¡¼ clibpdfÀÇ ÃֽŠ¹öÀüÀ» ´Ù¿î ¹Þ´Â´Ù.
11. clibpdf ¼³Ä¡
shell>tar xvzf clibpdf202r1.tar.gz
shell>cd ClibPDF
shell>cd source
shell>cp Makefile Makefile.orig
shell>cp Makefile.Linux Makefile
shell>make lib
shell>make install
12. http://www.opaque.net/ming/ ¿¡¼ mingÀÇ ÃֽŠ¹öÀüÀ» ´Ù¿î ¹Þ´Â´Ù.
13. ming ¼³Ä¡
shell>tar -xvzf ming-0.2a.tgz
shell>cd ming-0.2a
shell>make
shell>make install
14. http://www.pdflib.com ¿¡¼ pdflibÀÇ ÃֽŠ¹öÀüÀ» ´Ù¿î ¹Þ´Â´Ù.
15. pdflib ¼³Ä¡
shell>tar -xvzf pdflib-4.0.3.tar.gz
shell>cd pdflib-4.0.3
shell>./configure
shell>make
shell>make install
shell>vi /etc/ld.so.conf
/usr/lib/tcl8.3/pdflib Ãß°¡
shell>ldconfig
16. ftp://ftp.sgi.com/sgi/graphics/grafica/flash ¿¡¼ swfÀÇ ÃֽŠ¹öÀüÀ» ´Ù¿î ¹Þ´Â´Ù.
17. swf ¼³Ä¡
shell>tar -xvzf dist.99.linux.tar.Z
shell>mkdir /usr/local/swf
shell>cd dist
shell>mkdir /usr/local/swf/include
shell>mkdir /usr/local/swf/lib
shell>mkdir /usr/local/swf/fonts
shell>mkdir /usr/local/swf/psfonts
shell>mkdir /usr/local/swf/bin
shell>cp swf.h /usr/local/swf/include
shell>cp libswf.a /usr/local/swf/lib
shell>cp bin/* /usr/local/swf/bin
shell>cp fonts/* /usr/local/swf/fonts
shell>cp psfonts/* /usr/local/swf/psfonts
18. http://www.engelschall.com/sw/mm/ ¿¡¼ mmÀÇ ÃֽŠ¹öÀüÀ» ´Ù¿î ¹Þ´Â´Ù.
19. mm ¼³Ä¡
shell>tar -xvzf mm-1.2.2.tar.gz
shell>cd mm-1.2.2
shell>./configure --disable-shared
shell>make
shell>make install
20. http://www.libpng.org/pub/png/libpng.html ¿¡¼ libpngÀÇ ÃֽŠ¹öÀüÀ» ´Ù¿î ¹Þ´Â´Ù.
21. libpng ¼³Ä¡
shell>tar -xvzf libpng-1.2.5.tar.gz
shell>cd libpng-1.2.5
shell>cp scripts/makefile.linux Makefile
shell>make test
shell>make install
22. http://freetype.sourceforge.net/ ¿¡¼ freetype ÀÇ ÃֽŠ¹öÀüÀ» ´Ù¿î ¹Þ´Â´Ù.
23. freetype ¼³Ä¡
shell>tar -xvzf freetype-2.1.3.tar.gz
shell>cd freetype-2.1.3
shell>./configure
shell>make
shell>make install
24. ftp://ftp.uu.net/graphics/jpeg/ ¿¡¼ jpegÀÇ ÃֽŠ¹öÀüÀ» ´Ù¿î ¹Þ´Â´Ù.
25. jpeg ¼³Ä¡
shell>tar -xvzf jpegsrc.v6b.tar.gz
shell>cd jpeg-6b
shell>./configure --enable-shared --enable-static
shell>make
shell>make test
shell>make install
26. ftp://sunsite.unc.edu/pub/Linux/libs/graphics/ ¿¡¼ libungif¸¦ ´Ù¿î ¹Þ´Â´Ù
26. libungif ¼³Ä¡
shell>tar -xvzf libungif-4.1.0.tar.gz
shell>cd libungif-4.1.0
shell>./configure
shell>make
shell>make install
27. ftp://ftp.remotesensing.org/pub/libtiff/ ¿¡¼ libtiffÀÇ ÃֽŠ¹öÀüÀ» ´Ù¿î ¹Þ´Â´Ù.
28. libtiff ¼³Ä¡
shell>tar -xvzf tiff-v3.5.7.tar.gz
shell>cd tiff-v3.5.7
shell>./configure
...Áß°£¿¡ ¼³Ä¡ÇÏ´Ù ¹°¾îº¸¸é
yesÇÑ´Ù
...
shell>make
shell>make install
29. ftp://sunsite.unc.edu/pub/Linux/libs/graphics/ ¿¡¼ t1libÀ» ´Ù¿î ¹Þ´Â´Ù.
30. t1lib ¼³Ä¡
shell>tar -xvzf t1lib-1.3.1.tar.gz
shell>cd t1lib-1.3.1
shell>./configure
configure finished!
Do: 'make' to compile the t1lib-package.
Do: 'make without_doc' to compile if you do not have LaTeX.
Do: 'make install' to install the t1lib-package.
shell>make without_doc // À§ÀÇ ³»¿ë±×´ë·Î ÇÊÀÚ´Â LaTeX°¡ ¾ø±â¶§¹®¿¡ makeÇÏÁö ¾Ê°í make without_doc·Î Çß½À´Ï´Ù.
shell>make install
31. http://www.boutell.com/gd/http/ ¿¡¼ gd 2.0.7À» ´Ù¿î ¹Þ´Â´Ù.
32. gd ¼³Ä¡
shell>tar xvzf gd-2.0.9.tar.gz
shell>cd gd-2.0.9
shell>./configure
¸¸ÀÏ ttf(Æ®·çŸÀÔÆùÆ® ºÎºÐ)¿¡¼ ¿¡·¯°¡ °è¼Ó ¹ß»ýÇÑ´Ù¸é Makefile¿¡¼ -lttf Á¦°ÅÇϰųª rpmÀ¸·Î ttf ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÏ¸é µÊ.
shell>make
shell>make install
33. ¾ÆÆÄÄ¡ ¼³Á¤
shell>./configure --prefix=/usr/local/apache
34.php¼³Ä¡
./configure --prefix=/usr/local/php \
--with-apache=../apache_1.3.27 \
--with-config-file-path=/usr/local/apache/conf \
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
--with-mysql=/usr/local/mysql \ ©¬--mysql ÀÏ°æ¿ì
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
--with-oci8=/home/oracle \ ©¬-¿À¶óŬ ÀÏ°æ¿ì
--with-oracle=/home/oracle \
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
--with-jpeg-dir=/usr/local/lib \
--with-png-dir=/usr/local/lib \
--with-gif-dir=/usr/local/lib \
--with-zlib-dir=/usr/local/lib \
--with-gd=/usr/local \
--with-freetype-dir=/usr/local/include/freetype2 \
--with-zlib \
--with-ming=/usr/lib \
--with-tiff-dir=/usr/local/lib \
--with-pdflib=/usr/local \
--with-cpdflib \
--with-gettext \
--with-kerberos \
--with-swf=/usr/local/swf \
--with-mm \
--with-mhash=/usr/local/lib \
--with-mcrypt=/usr/local/lib \
--with-mod_charset \
--with-language=korean \
--with-charset=euc_kr \
--with-regex=php \
--with-curl \
--with-ldap \
--with-xml \
--enable-gd-native-ttf \
--enable-ftp \
--enable-sockets \
--disable-debug \
--enable-sysvsem \
--enable-sysvshm \
--enable-shmop \
--enable-track-vars \
--enable-freetype-4bit-antialias-hack \
--enable-calendar \
--enable-sigchild \
--enable-magic-quotes \
--enable-trans-sid \
--enable-inline-optimization \
--enable-bcmath
shell>make
shell>make install
36. ¾ÆÆÄÄ¡ ¼³Ä¡
shell>./configure \
--prefix=/usr/local/apache \
--activate-module=src/modules/php4/libphp4.a \
--enable-module=php4 \
--enable-shared=max \
--enable-rule=SHARED_CORE \
--enable-module=so
shell>make
shell>make install
38. ¾ÆÆÄÄ¡ ȯ°æ¼³Á¤
shell>vi /usr/local/apache/conf/httpd.conf //ȯ°æ¼³Á¤ÆÄÀÏ ÆíÁý
// ´ÙÀ½ php °ü·Ã ³»¿ëÀÌ ¾ÆÆÄÄ¡ ¼³Á¤ ÈÀÏ¿¡ ÀÖ´ÂÁö È®ÀÎ ÇÑ´Ù.
# cat /export/apache/conf/httpd.conf | grep php
LoadModule php4_module libexec/libphp4.so
AddModule mod_php4.c
#
# for PHP 4.x, use:
#
AddType application/x-httpd-php .php .html .htm .inc .lib .phtml .ini .php3
AddType application/x-httpd-php-source .phps
39. ºÎÆýà ½ÇÇàµÇ°Ô ¼³Á¤
shell>cp -p /usr/local/apache/bin/apachectl /etc/rc.d/init.d/apachectl
shell>cp -p /usr/local/mysql/share/mysql/mysql.server /etc/rc.d/init.d/mysqld
shell>cd /etc/rc.d/rc3.d
shell>ln -s /etc/rc.d/init.d/httpd S85httpd
shell>ln -s /etc/rc.d/init.d/mysqld S97mysqld
|
|
|