2007년 2월 17일

Apache2.0.52 + ?PHP5.0.3 + ?MySQL4.1.7 설치하기

[펌] Apache2.0.52 + ?PHP5.0.3 + ?MySQL4.1.7 설치하기 #
php
2006/09/11 10:51
글쓴이 : 김성무 kimsungmoo@paran.com http://sungmoo.org/
감사 : 네로 mail : Nero.kim@gmail.com homepage : http://moyiza.net/

PHP 5.0.3 http://php.net/
MySQL 4.1.7 http://mysql.com/
?ZendOptimizer-2.5.7 http://zend.com/

설치한 OS : Fedora Core2

필요한패키지들 #
zlib - http://www.gzip.org/zlib/
libpng - http://libpng.sourceforge.net/
free type - http://www.freetype.org/
libjpeg - http://www.ijg.org/
gd - http://www.boutell.com/gd/
libxml2 - http://xmlsoft.org/

설치순서 #
Step 0 : Install

Packages #

Zlib 깔기 #
#wget http://www.gzip.org/zlib/zlib-1.2.1.tar.gz // zlib파일 다운로드
#tar -xzvf zlib-1.2.1.tar.gz // 압축해제
#cd zlib-1.2.1 // 압축해제된 폴더로 이동
#./configure // 컴파일 환경설정
#make
#make install
#cd .. //상 위폴더로 이동
#rm -rf zlib* // 다운받은파일과 압축해제된폴더 삭제

libpng 깔기 #
#wget http://optusnet.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.8.tar.gz
#tar -xzvf libpng-1.2.8.tar.gz
#cd libpng-1.2.8
#./configure
#make
#make install
#cd ..
#rm -rf libpng*

freetype 설치하기 #
#wget http://aleron.dl.sourceforge.net/sourceforge/freetype/freetype-1.3.1.tar.gz
#tar -xzvf freetype-1.3.1.tar.gz
#cd freetype-1.3.1
#./configure
#make
#make install
#cd ..
#rm -rf freetype*

libjpeg 설치하기 #
#wget http://www.ijg.org/files/jpegsrc.v6b.tar.gz
#tar -xzvf jpegsrc.v6b.tar.gz
#cd jpeg-6b
#./configure --enable-shared --enable-static
#make
#make install
#make test
#make install
#cd ..
#rm -rf jpeg*

gd설치하기 #
#wget http://www.boutell.com/gd/http/gd-2.0.33.tar.gz
#tar -xzvf gd-2.0.33.tar.gz
#cd gd-2.0.33
#./configure
#make
#make install
#cd ..
#rm -rf gd*

glibxml2 설치하기 #
#wget http://xmlsoft.org/sources/libxml2-2.6.16.tar.gz
#tar -xzvf libxml2-2.6.16.tar.gz
#cd libxml2-2.6.16
#./configure
#make
#make install
#cd ..
#rm -rf libxml*

Step 1 : Install

MySQL #
#wget http://mysql.byungsoo.net/Downloads/MySQL-4.1/mysql-4.1.7.tar.gz
#tar -xzvf mysql-4.1.7.tar.gz
#cd mysql-4.1.7
./configure \
--prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data \
--disable-shared --enable-assembler \
--with-thread-safe-client --with-mysqld-user="mysql" \
--with-client-ldflags=-all-static \
--with-mysqld-ldflags=-all-static \
--with-readline --without-debug \
--without-docs --without-bench \
--with-charset=euckr
#make
#make install
#cd /usr/local/mysql/share/mysql/
#cp my-medium.cnf /etc/my.cnf
#/usr/local/mysql/bin/mysql_install_db

Step 2 : Install

Apache #
#wget http://www.reverse.net/pub/apache/httpd/httpd-2.0.52.tar.gz
#tar -xzvf httpd-2.0.52
#cd httpd-2.0.52
# ./configure --prefix=/usr/local/apache --enable-modules=so --enable-so
#make
#make install

Step 3 : Install

PHP #
#wget http://ftp.superuser.co.kr/pub/php/php-5.0.3.tar.gz
#tar -xzvf php-5.0.3.tar.gz
#mv php-5.0.3 /usr/local/php
#cd /usr/local/php
#./configure \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-zlib --with-gd --with-ttf --with-png \
--with-expat-dir=/usr --with-gmp --with-xml \
--with-mysql=/usr/local/mysql \
--with-language=korean \
--with-charset=euc-kr \
--disable-debug --disable-posix --disable-rpath \
--enable-safe-mode --enable-magic-quotes \
--disable-dmalloc --enable-bcmath \
--enable-dio --enable-gd-native-ttf \
--enable-sysvsem --enable-sysvshm \
--enable-wddx --enable-versioning \
--enable-pic --enable-inline-optimization \
--enable-memory-limit --enable-mbstring \
--enable-mbregex --enable-mbstr-enc-trans \
--enable-ftp --disable-debug --enable-track-vars=yes \
--with-jpeg-dir --with-freetype-dir \
--enable-gd-native-ttf --enable-dl \
--with-imap=shared --with-imap-ssl=/usr/lib --with-kerberos
#make
#make install
#cp php.ini-dist /usr/local/lib/php.ini

Step 4 : Install

?ZendOptimizer #
#tar -xzvf ZendOptimizer-2.5.7-linux-glibc21-i386.tar.gz
#cd ZendOptimizer-2.5.7-linux-glibc21
#./install.sh
[Enter]
[Enter]
[Enter]
[Enter]

설정할 파일들 #

Apache ##vi /usr/local/apache/conf/httpd.conf
// php파일을 웹서버에서 인식하기 위해 아래두줄 추가
AddType application/x-httpd-php .php .phtml .php3 // php파일로 해석할 확장명설정
AddType application/x-httpd-php-source .phps // php 소스로 해석할 확장명설정
// 처음페이지로 인식할 파일명설정
DireactoryIndex index.html index.php

MySQL #// MySQL 디비관리자 비번설정
shell> mysql -u root mysql
mysql> SET PASSWORD FOR root=PASSWORD('new_password');
#cd /usr/local/mysql/bin
// 루트로 로그인
#./mysql -u root -p
// 데이타베이스 생성
mysql> CREATE database DB_NAME;
Query OK, 0 rows affected (0.00 sec)
// 디비서버에 계정을 생성
mysql> GRANT all privileges on DB_NAME.* TO USER_NAME@localhost
> IDENTIFIED BY 'PASSWORD';
Query OK, 0 rows affected (0.00 sec)
mysql> quit // 디비서버 나오기
bye

참고사이트 #
http://www.php.net/manual/kr/install.apache2.php
http://httpd.apache.org/docs-2.0/programs/configure.html
http://phpschool.com/bbs2/inc_view.html?id=11442&code=tnt2&start=0&mode=search&field=title&search_name=&operator=and&period=last1year&category_id=7&s_que=

댓글 없음:

댓글 쓰기