http://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&wr_id=46636
zlib-1.2.3.tar.gz
ibpng-1.2.10.tar.gz
freetype-2.2.1.tar.gz
jpegsrc.v6b.tar.gz
gd-2.0.33.tar.gz
ibxml2-2.6.24.tar.gz
ibiconv-1.9.2.tar.gz
mysql-5.0.21.tar.gz
httpd-2.2.2.tar.gz
php-5.1.4.tar.gz
ZendOptimizer-3.0.0-linux-glibc21-i386.tar.gz
설치전에 꼭 밑의 두줄을 생성한다. 이것때문에 설치 중 문제가 발생하는 경우가 있다... 필수!!!
싫으면 말고..ㅡㅡ;; 후회할것이다.
왠만하면... /usr/local 경로에서 설치를 시작해라..ㅡㅡ;;
#rdate -s time.bora.net
#mkdir /usr/local/man/man1
-----------------------------------------------
Step 0 : Install Packages
-----------------------------------------------
0.1 ZLIB 설치
#tar xvfz zlib*
#cd zlib*
#./configure
#make
#make install
#cd ..
#rm -rf zlib*
-----------------------------------------------
0.2 LIBPNG 설치
#tar xvfz libpng*
#cd libpng*
#cp scripts/makefile.linux makefile
#make test
#make install
#cd ..
#rm -rf libpng*
-----------------------------------------------
0.3 FREETYPE 설치
#tar xvfz freetype*
#cd freetype*
#./configure
#make
#make install
#cd ..
#rm -rf freetype*
-----------------------------------------------
0.4 JPEGSRC 설치
#tar xvfz jpegsrc*
#cd jpeg-6b
#./configure --enable-shared --enable-static
#make
#make test
#make install
#make install-lib
#make install-headers
#cd ..
#rm -rf jpegsrc*
-----------------------------------------------
0.5 GD 설치
#tar xvfz gd*
#cd gd*
#./configure
#make
#make install
#cd ..
#rm -rf gd*
-----------------------------------------------
0.6 LIBXML2 설치
#tar xvfz libxml2*
#cd libxml2*
#./configure
#make
#make install
#cd ..
-----------------------------------------------
0.7 LIBICONV 설치
#tar xvfz libiconv*
#cd libiconv*
#./configure --prefix=/usr/local
#make
#make install
#ln -s /usr/local/lib/libiconv.so.2 /usr/lib/libiconv.so.2 (php 멍청한게.. /usr/lib 에서 찾는다.. /usr/local/lib 라고 해도 말이다..)
#cd ..
-----------------------------------------------
-----------------------------------------------
Step 1 : Install APM
-----------------------------------------------
1.1 MYSQL5 설치
#tar xvfz mysql*
#cd mysql*
#
./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
#cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
#/usr/local/mysql/bin/mysql_install_db
-----------------------------------------------
1.2 APACHE2 설치
#tar xvfz httpd*
#cd httpd*
#./configure --prefix=/usr/local/apache2 --enable-modules=so --enable-so --enable-rewrite
#make
#make install
-----------------------------------------------
1.3 PHP5 설치
#vi /etc/ld.so.conf (라이브러리 인식시키기..)
* 다음라인을 추가
/lib
/usr/lib
/usr/local/lib
/usr/local/mysql/lib/mysql
#ldconfig
#tar xvfz php*
#mv php* /usr/local/php (폴더명을 변경... tar.gz 를 조심...)
#cd /usr/local/php
#
./configure \
--prefix=/usr/local/php \
--with-mysql=/usr/local/mysql \
--with-apxs2=/usr/local/apache2/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 \
--with-iconv=/usr/local \
--with-xml --with-xmlrpc
#make
#make install
#cp php.ini-dist /usr/local/lib/php.ini
-----------------------------------------------
1.4 ZendOptimizer3 설치
#tar xvfz Zend*
#cd Zend*
#./install.sh
-----------------------------------------------
-----------------------------------------------
Step 2 : Setting APM
-----------------------------------------------
2.1 Apache2
#vi /usr/local/apache2/conf/httpd.conf
CustomLog logs/access_log common << 이 부분을 수정
SetEnvIfNoCase Request_URI (gif|png|jpg|css|js|bmp|jpeg|swf)$ IMAGE=1
CustomLog /usr/local/apache2/logs/access_log common env=!IMAGE
//있는지 확인후 없으면 추가
LoadModule php5_module modules/libphp5.so
// php파일을 웹서버에서 인식하기 위해 아래두줄 추가
AddType application/x-httpd-php .php .html .htm .inc
AddType application/x-httpd-php-source .phps
// 처음페이지로 인식할 파일명설정
DirectoryIndex index.html index.htm index.php
-----------------------------------------------
2.2 MySQL5
#ln -s /usr/local/mysql/bin/mysql /usr/bin/
#ln -s /usr/local/mysql/bin/mysqldump /usr/bin/
비밀번호 설정
#/usr/local/mysql/bin/mysqladmin -u root password "비밀번호"
//mysql 커멘드에서 디비서버에 계정을 생성
//GRANT all privileges on dbname.* TO id@localhost IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)
-----------------------------------------------
2.3 RC.LOCAL
vi /etc/rc.d/rc.local
/usr/local/apache2/bin/apachectl start >&/dev/null
/usr/local/mysql/bin/mysqld_safe --user=root & >&/dev/null
위 두줄을 추가한다.
-----------------------------------------------
Posted by 홍반장