[설치/설정] centos 5.0 apm source install

centos 5.0 apm source install

시간 맞추기
rdate -s time.bora.net

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*




mysql5.1.22 설치
./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --enable-assembler --with-thread-safe-client --with-mysqld-user="root" --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --with-readline --without-debug --without-docs --without-bench --with-charset=euckr --sysconfdir=/etc

make
make install
cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
/usr/local/mysql/bin/mysql_install_db



APACHE2.2.6 설치
./configure --prefix=/usr/local/apache --enable-modules=so --enable-so --enable-rewrite
make
make install


PHP5.2.5 설치
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache/bin/apxs --enable-sysvshm=yes --enable-sysvsem=yes --enable-debug=no --with-ttf --with-png-dir --with-zlib-dir --with-jpeg-dir --with-gdbm --enable-ftp --enable-mbstring --enable-sockets --enable-wddx --with-freetype-dir --enable-bcmath --enable-mbregex --enable-exif --with-gd --enable-gd-native-ttf --enable-calendar --with-openssl
make test
make install
cp php.ini-dist /usr/local/php/lib/php.ini

★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
apache 실행한다.

httpd.conf 설정
vi /usr/local/apache/conf/httpd.conf

있는지 확인후 없으면 추가
LoadModule php5_module modules/libphp5.so

/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
그럼 졸 당황한다. 왜냐 CentOs 3-4버전에선 없던거다..ㅡㅡ; 졸 신기하다..
이유는 SELinux를 사용하는 일부 Linux 배포판에서는 IDL이나 ENVI를 실행시키려고 할때 다음과 같은 오류를 보이는 경우가 있다.
NSA가 주관하는 SELinux 프로젝트는 커널 보안에 강력한 위력을 발휘하기도 하지만 다른 소프트웨어들이 실행되는 것도 막을 경우가 있으므로 혹시 위와 같은 에러메시지를 만난다면 다음의 두 가지 중 하나를 수행하여 IDL이나 ENVI를 사용할 수 있도록 해 주자.

1. cat /etc/sysconfig/selinux 변경
cat /etc/sysconfig/selinux 을 보면 가운데에 SELINUX=enforcing 부분을 disabled 시켜버리고 리붓

2. selinux 보안정책을 적용
/sbin/restorecon -R -v /usr/local/apache/modules/libphp5.so
/usr/bin/chcon -t texrel_shlib_t /usr/local/apache/modules/libphp5.so
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★



ZEND3.3.0 설치
./install.sh (설치시 php.ini 경로는 /usr/local/php/lib 로 지정)

APACHE 실행
/usr/local/apache/bin/apachectl start

MYSQL 실행
/usr/local/mysql/bin/mysqld_safe --user=root &

httpd.conf 설정
vi /usr/local/apache/conf/httpd.conf

php파일을 웹서버에서 인식하기 위해 아래두줄 추가
AddType application/x-httpd-php .php .html .htm .inc
AddType application/x-httpd-php-source .phps

처음페이지로 인식할 파일명설정
DirectoryIndex index.html index.htm index.php

MySQL5 BIN 링크
ln -s /usr/local/mysql/bin/mysql /usr/bin/
ln -s /usr/local/mysql/bin/mysqldump /usr/bin/


rc.local 설정
vi /etc/rc.d/rc.local

/usr/local/apache2/bin/apachectl start
/usr/local/mysql/bin/mysqld_safe --user=root &


==============================================

#/etc/profile.d/mysql.sh

MYSQL_HOME=/usr/local/mysql
export PATH=$PATH:$MYSQL_HOME/bin


source /etc/profile

cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqld
chkconfig --add mysqld
service mysqld start

==============================================

php 옵션을 보면 그다지 특별한 것이 없어 보이는듯 하고,
MySQL 은 바이너리 배포자의 각종 튜닝이 모조리 생략된듯 한데,
무슨 기능이 필요해서 소스설치를 하셨나요?
혹시 아직도 rpm 의 아파치 limit 가 256 임