2007. 5. 31. 14:32

Apache 2.2, PHP 5,2,1, MySQL 5.0 설치 및 세팅.

Apache 2.2, PHP 5.2.1, MySQL 5.0


1. Mysql 설치

      (1) cd /usr/ports/database/mysql50-server
   
   (2) make install clean WITH_CHARSET=euckr      

      (3) /usr/local/bin/mysql_install_db
      (4) chown -R mysql /var/db/mysql/
      (5) chgrp -R mysql /var/db/mysql/
      (6) ee /usr/local/etc/rc.d/mysql-server  (!수정!)
           mysql_enable=”NO” => mysql_enable=”YES”
      (7) cd /usr/local/bin/mysql
      (8) rehash
      (9) /usr/local/bin/mysqladmin -u root password 비밀번호
      (10) mysql -u root -p

2. Apache 설치

    (1) /usr/ports/www/apache22

    (2) make install clean 

    (3) /usr/local/etc/rc.d/apache22 수정

    (4) cd /usr/local/etc/rc.d/

    (5) /apache22.sh restart

3. PHP 설치    

# cd /usr/ports/lang/php5
# make config
# make install

/usr/ports/databases/php5-mysql - MySQL Database

/usr/ports/www/php5-session - Sessions

/usr/ports/graphics/php5-gd - Graphics Library


httpd.conf 추가

DirectoryIndex index.php index.html index.htm

AddType application/x-httpd-php .php

AddType application/x-httpd-php-source .phps

php.ini 수정

short_open_tag = On 으로 수정