달력

2

« 2025/2 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28

APM 버전(mysql-5.0.15 + php-5.1.1. + httpd-2.2.0)

/usr/src/apm 디렉토리 생성후

mysql-5.0.15, php-5.1.1., httpd-2.2.0 소스 다운로드

 INSTALL파일과 ./configure --help 파일보면서 APM 셋팅하면 그 버전에 맞게끔 셋팅할수 있다.


 ★MySQL의 설치

tar -xvf mysql-5.0.15.tar.gz

 groupadd mysql
useradd -g mysql mysql

 ./configure --prefix=/usr/local/mysql 
                 --localstatedir=/usr/local/mysql/data
                 --with-charset=euckr 

 

ps. /usr/local/mysql/data가 실제DB 파일이다.

     default는 /usr/local/mysql/var
make
make install

 

cp support-files/my-medium.cnf /etc/my.cnf (mysql의 설정파일)

 

cd /usr/local/mysql
bin/mysql_install_db --user=mysql
chown -R root  .
chown -R mysql data
chgrp -R mysql .

 

bin/mysqld_safe --user=mysql &

 

 

★Apache2의 설치

tar -xvf httpd-2.0.55.tar.gz

 

./configure --enable-so
make
make install

/usr/local/apache2/bin/apachectl start
 

★PHP5의 설치

tar zxvf php-5.0.5.tar.gz


./configure --with-apxs2=/usr/local/apache2/bin/apxs
                 --with-mysql=/usr/local/mysql/
                 --with-mysql-sock=/tmp

(--with-gd --with-gdbm --with-freetype-dir --with-png-dir --with-zlib --with-jpeg-dir)->알아서...
(oracle 연동시 >> --with-oci8=/home/oracle/app/oracle/product/8.0.6 --enable-sigchild \ --with-oracle=/home/oracle/app/oracle/product/8.0.6 )

make
make install

 

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

 

 

vi /usr/local/apache2/conf/httpd.conf
다음을 추가한다.
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

DirectoryIndex index.html index.htm index.php index.php

/usr/local/apache2/bin/apachectl restart
/usr/local/mysql/bin/mysqld_safe restart &


APM이 잘 셋팅되었는지 확인해보자!

usr/local/apache2/htdocs 에  index.php 생성

vi  index.php
<?
    phpinfo();
?>
 
웹브라우져를 통해 확인 http://localhost/index.php

 

 

-------------------------------------------------
Cannot load /usr/local/apache2/modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied

 

$ restorecon -R -v /usr/local/apache2/modules

 

또는

문제의 원인은 SElinux 입니다.
아래와 같이 한 후 restart 해 보세요.

chcon -t texrel_shlib_t /usr/local/apache/modules/*.so


:
Posted by sfeg