· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
APM

Apache2.2.8 + PHP5.2.6 + MySQL5.0.51b 설치하기


Apache 2.2.8 [http]http://www.apache.org


mysql 5.0.51b [http]http://www.mysql.com

ZendOptimizer-2.5.7 [http]http://www.zend.com

설치한 OS : CentOS 5.1



설치순서



Step 1 : Install MySQL

#wget http://mysql.byungsoo.net/Downloads/MySQL-5.0/mysql-5.0.51b.tar.gz
#tar -xzvf mysql-5.0.51b.tar.gz
#cd mysql-5.0.51b

./configure \
--with-readline --prefix=/usr/local/mysql \
--enable-thread-safe-client \
--with-charset=utf8 \
--with-extra-charsets=euckr,eucjpms,gb2312 \
--with-named-curses-libs=/usr/lib/libncurses.so.5.5 \
CFLAGS="-D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__ -I/usr/local/include" \
CXXFLAGS="-D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__ -I/usr/local/include"

#make
#make install
#cd /usr/local/mysql/share/mysql/
#cp /usr/local/mysql/share/mysql/my-large.cnf /etc/my.cnf
#/usr/local/mysql/bin/mysql_install_db

#useradd -d /export/home/mysql -g mysql -m -u 102 -s /bin/false mysql
#chown -R mysql:mysql /usr/local/mysql/var

# /usr/local/mysql/share/mysql/mysql.server start
# /usr/local/mysql/bin/mysqladmin -u root password 'new-password'
# /usr/local/mysql/bin/mysqladmin -u root -h wl password 'new-password'

Step 2 : Install Apache

#wget http://apache.justdn.org/httpd/httpd-2.2.0.tar.bz2
#tar -xjvf httpd-2.2.0.tar.bz2
#cd httpd-2.2.0
# ./configure --prefix=/usr/local/apache2 --enable-modules=so --enable-so
#make
#make install

Step 3 : Install PHP

#wget http://ftp.superuser.co.kr/pub/php/php-5.0.3.tar.gz
#tar -xzvf php-5.0.3.tar.gz
#mv php-5.0.3 /usr/local/php
#cd /usr/local/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 \
 --with-iconv \
 --enable-modules=so \
 --enable-mbstring \
 --enable-mbregex \
 --enable-dbase \
 --with-gd \
 --enable-gd-native-ttf \
 --with-jpeg-dir=/usr/sfw \
 --with-png-dir=/usr/sfw \
 --with-zlib-dir=/usr/local


#make
#make install
#cp php.ini-dist /usr/local/lib/php.ini

Step 4 : Install ZendOptimizer

#wget http://downloads.zend.com/optimizer/3.0.0/ZendOptimizer-3.0.0-linux-glibc21-i386.tar.gz
#tar -xzvf ZendOptimizer-3.0.0-linux-glibc21-i386.tar.gz
#cd ZendOptimizer-3.0.0-linux-glibc21-i386
#./install.sh
[Enter]
[Enter]
[Enter]
[Enter]


설정할 파일들

Apache
#vi /usr/local/apache/conf/httpd.conf
// php파일을 웹서버에서 인식하기 위해 아래두줄 추가
AddType application/x-httpd-php .php .phtml .php3  // php파일로 해석할 확장명설정
AddType application/x-httpd-php-source .phps  // php 소스로 해석할 확장명설정

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


MySQL

// MySQL 디비관리자 비번설정
shell> mysql -u root mysql
mysql> SET PASSWORD FOR root=PASSWORD('new_password');

#cd /usr/local/mysql/bin

// 루트로 로그인
#./mysql -u root -p

// 데이타베이스 생성
mysql> CREATE database DB_NAME; 
Query OK, 0 rows affected (0.00 sec) 

// 디비서버에 계정을 생성
mysql> GRANT all privileges on DB_NAME.* TO USER_NAME@localhost 
> IDENTIFIED BY 'PASSWORD'; 
Query OK, 0 rows affected (0.00 sec) 

mysql> quit // 디비서버 나오기
bye


참고사이트





DeleteMe 팁이나 문서류를 보면 root로 make하라고 되어있는 경우가 많은데, make는 일반유저로 make install은 root나 sudo로 하는 것이 나을것입니다. --WkPark

ID
Password
Join
Your mode of life will be changed for the better because of good news soon.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2009-11-11 13:05:21
Processing time 0.0049 sec