본문으로 바로가기

CentOS APM Setup 2

category 시스템/Linux 2015. 12. 14. 12:39
반응형

centos 5.0 apm source install

## yum 을 통한 라이브러리 설치

yum install gcc
yum install gcc-c++
yum install termcap
yum install libtermcap
yum install libtermcap-devel
yum install gdbm-devel

yum install zlib*
yum install libxml*
yum install freetype*
yum install libpng*
yum install libjpeg*

## MySQL 5.0.X  소스 컴파일

[shell]# ./configure --prefix=/usr/local/mysql-5.0.x --localstatedir=/usr/local/mysql/data --without-readline --with-charset=euckr --enable-thread-safe-client
* mysqli 옵션을 사용하기위해서 --enable-thread-safe-client 옵션을 추가

[shell]# make
[shell]# make install

## Apache 2.2.X 소스 컴파일

[shell]# ./configure --prefix=/usr/local/apache-2.2.6 --enable-proxy --enable-rewrite --enable-so --enable-speling --enable-ssl --enable-vhos
t-alias --with-mpm=worker --enable-mods-shared=all
[shell]# make
[shell]# make install

## Php 5.1.X 소스 컴파일

[shell]# ./configure --prefix=/usr/local/php_5.1.6 --with-apxs2=/usr/local/apache/bin/apxs --with-zlib-dir --with-gd --with-ttf --with-png-dir --with-gmp --with-libxml-dir=/usr/lib --with-xsl  --disable-debug --disable-rpath --with-iconv --enable-safe-mode --enable-magic-quotes --enable-bcmath --enable-gd-native-ttf --enable-sysvsem --enable-sysvshm --enable-wddx --with-pic --enable-inline-optimization --enable-mbstring --enable-ftp --disable-debug --with-jpeg-dir --with-freetype-dir --enable-gd-native-ttf --enable-exif --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-sockets --enable-sigchild --with-oci8=instantclient,/usr/lib/oracle

*  --enable-sigchild 와 --with-oci8=instantclient,/usr/lib/oracle 옵션은 오라클 클라이언트를 사용하기위한 옵션 이므로 오라클 클라이언트를 사용하지 않는다면, 사용할 필요가 없다.
* mysql5와 php5에서만 제공 되어지는 mysqli 를 사용하기위해서는 --with-mysqli=/usr/local/mysql/bin/mysql_config 옵션을 주어야 한다. 

[shell]#make
[shell]#make install


Ps. apache를 실행을 하면 apache error_log 에
/usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/modules/libphp5.so into server: /usr/local/apache/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied
위와 같은 에러 메세지가 뜨는데, 이것은 CentOS5의 SELinux 에서  denied 되어진 것으로

[shell]#vi /etc/sysconfig/selinux
SELINUX=enforcing 를 SELINUX=disabled 로 수정

[shell]#reboot

반응형