[CentOS5.3] APM 설치 Linux





>> APM 설치 전 아래 패키지 설치 및 업데이트 / APM 패키지 삭제

#yum groupinstall 'Development Tools"
#yum update

rpm -e httpd --allmatches --nodeps
rpm -e php --allmatches --nodeps
rpm -e mysql --allmatches --nodeps


<1.mysql>

./configure --prefix=/usr/local/mysql --localstatedir=/home/sqldata --enable-assembler --without-debug --with-mysqld-user=mysql --with-charset=utf8 --with-extra-charsets=complex --enable-thread-safe-client


컴파일시 에러뜨면 아래 설치
rpm -qa |grep gcc
yum -y install gcc-c++ gcc-gfortran


make
make install


cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
/usr/local/mysql/bin/mysql_install_db
useradd -M mysql

chown -R mysql:mysql /home/sqldata
ln -s /usr/local/mysql/bin/mysql /usr/bin
ln -s /usr/local/mysql/bin/mysqldump /usr/bin

/usr/local/mysql/bin/mysqld_safe &


/usr/local/mysql/bin/mysqladmin -u root password 'mysql'
접속
/usr/local/mysql/bin/mysql -u root -p
show databases;


* mysql root 암호 변경 => /usr/local/mysql/bin/mysqladmin -u root -p password 암호
or
mysql> update user set password=password('암호') where user = 'root';
mysql> flush privileges;


<2.apache2>


>> MaxClient 설정
/server/mpm/prefork/prefork.c 파일에서
#define DEFAULT_SERVER_LIMIT 2048(256->2048)

/server/mpm/worker/worker.c 파일에서
#define DEFAULT_SERVER_LIMIT 32(16 -> 32)

./configure --prefix=/usr/local/apache2 --enable-so --enable-modules=all --enable-mods-shared=all --enable-ssl --enable-rewrite --enable-cache --enable-disk-cache --enable-mem-cache --with-mpm=worker


make
make install

ln -s /usr/local/apache2/bin/apachectl /usr/bin/apachectl
ln -s /usr/local/apache2/bin/apxs /usr/bin/apxs


<부팅 시 자동 실행>
vi /etc/rc.d/rc.local
/usr/local/apache2/bin/apachectl start
 

<3.php>

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-sysvshm=yes --enable-sysvsem=yes --enable-debug=no --with-iconv-dir=/usr/local/lib --enable-mbstring --enable-sockets --with-freetype-dir=/usr/local/freetype --enable-mbregex --enable-exif --with-gd --enable-gd-native-ttf --with-xmlrpc --with-config-file-path=/usr/local/php --with-ldap=/usr --with-zlib-dir=/usr/local/lib --with-jpeg-dir=/usr/local/lib --enable-calendar --with-curl --with-openssl --with-mysqli=/usr/local/mysql/bin/mysql_config --with-oci8=/home/oracle/product/10g


make
make install

cp php.ini-dist /usr/local/php/php.ini


<?php phpinfo(); ?> -> <? phpinfo(); ?> 이렇게 사용하려면...
# vi php.ini
; 아래 부분 주석 제거!!
 short_open_tag
   Default Value: On
   Development Value: Off
   Production Value: Off

<httpd.conf 에 추가>
AddType application/x-httpd-php .php .htm .html .php5
AddType application/x-httpd-php-source .phps






<Errors>
1. make: warning:  Clock skew detected.  Your build may be incomplete.

의미

컴파일 한 파일들이 현재의 시스템 시간보다 빠른다는 의미다.

해결 방법

file의 시간을 변경 해주면 된다.


컴파일 하기전 아래의 명령어를 실행시킨다.

touch *

 



2. Apache : "Cannot load /usr/local/apache2/modules/libphp5.so"
# service httpd restart
httpd: Syntax error on line 53 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied


SOLUTION ......................................

chcon -t texrel_shlib_t /usr/local/apache2/modules/libphp5.so




덧글

댓글 입력 영역



통계 위젯 (블랙)

029
171
346891

이 이글루를 링크한 사람 (화이트)

2

google

구글_이글루스_사이드