블로그 이미지
규미

Rss feed Tistory
카테고리 없음 2011. 8. 1. 18:58

APM Compile Installation

PHP
http://www.php.net/downloads.php

MySQL
http://www.mysql.com/downloads/mysql/#downloads

Apache HTTP
http://httpd.apache.org/download.cgi

pre-installation : gcc,gcc-c++,termcap,libtool,zlib, linpng-devel, freetype, libjpeg-devel, gd,libxml2-devel

install flow: mysql > apache > php

MySQL compile & installation
#./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --sysconfdir=/etc --without-debug --with-charset=utf8 --with-extra-charsets=all --with-plugins=innobase

#make & make install
(make -j(cpu+1) & make install  컴파일 속도 최적화)

/*
/bin/rm: cannot remove `libtoolT': No such file or directory  에러 발생시
#autoreconf --force --install
#libtoolize --automake --force
#automake --force --add-missing
*/

#chown -R mysql.mysql /usr/local/mysql/data/
#/usr/local/mysql/bin/mysql_install_db
#/usr/local/mysql/bin/mysqld_safe &
#/usr/local/mysql/bin/mysqladmin -u root -p 패스워드

Apache compile & installation
MPM(Muti-processing Modules) prefork와 worker 어떤 것을 선택 할 것인지 판단하여 수정
//worker는 통신량이 많은 경우 사용, 리소스 경합 가능성 존재
//prefork는 apache.org default

#vi server/mpm/prefork/prefork.c 
     #define DEFAULT_SERVER_LIMIT 256
     //MAX PROCESS 수 mpm prefork 사용시 (최대 프로세스 수 prefork는 process fork)
#vi server/mpm/prefork/worker.c
     #define DEFAULT_SERVER_LIMIT 64
     #define DEFAULT_THREAD_LIMIT 128
     //MAX PROCESS 수 mpm worker 사용시 (최대 프로세스 수 worker는 프로세서에서 thread 생성)

#./configure --prefix=/usr/local/apache --enable-module=so --enable-rewrite --with-mpm=prefork
(worker방식 사용시 configuration에서 --with-mpm=worker 변경 )
#vi /usr/local/apache/conf/extra/httpd-mpm.conf     //MaxClient 수정
#make -j 5 & make install
#vi /usr/local/apache/conf/httpd.conf
     DirectoryIndex index.html index.htm index.php     (수정)
     AddType application/x-httpd-php .php4 .php3 .php .htm .html     (추가)
     AddType application/x-httpd-php-source .phps     (추가)
#cp /usr/local/apache/bin/apachectl /etc/init.d/httpd
#/etc/init.d/httpd start



PHP compile & installation
#./configure  --prefix=/usr/local/php --with-exec-dir=/usr/bin  --with-apxs2=/usr/local/apache/bin/apxs  --with-apache-install=/usr/local/apache --with-mysql=/usr/local/mysql --with-config-file-path=/etc --disable-debug --enable-safe-mode --enable-track-vars --enable-sockets --enable-exif --with-png-dir=/usr/lib --with-freetype-dir=/usr/local/lib --with-mod_charset --with-xml --enable-mailparse --enable-calender --enable-sysvsem=yes --enable-sysvshm=yes --enable-ftp --enable-magic-quotes --enable-gd-native-ttf --enable-versioning --enable-url-includes --enable-trans-id --enable-inline-optimization --enable-bcmath --with-jpeg --with-png --with-zlib --with-jpeg-dir=/usr --with-gd --with-ttf --with-gettext --enable-sigchild --enable-module=so --with-libxml-dir=/usr/lib --enable-mbstring --with-language=korean --with-charset=utf_8
#make -j 5 & make install
#cp php.ini-production /etc/php.ini


TEST
#vi /usr/local/apache/htdocs/phpinfo.php
     <? phpinfo() ?> 작성후 wq
#/usr/local/apache/bin/apachectl start
웹브라우저에 http://ip/phpinfo.php 접속

,
TOTAL TODAY