웹마스터 팁

[APM 설치순서]
MySQL → Apache → PHP

설치 도중, 오류가 더이상 해결될 수 없을 때, APM 3가지 전부, 버전이 서로 호환되는지 의심해봐야 합니다. 

yum -y update (APM 설치파일이 버전이 낮을 경우 호환이 안될 수 있으나, 최신 버전으로 깔 때 라이브러리가 전부 최신인걸 지향해야함)
yum -y install pcre-devel
yum -y ncurses-devel
yum -y install gcc-c++
yum -y install gmp*
yum -y install expat*
yum -y install curl* 
yum -y install curl curl-devel
yum -y install glibc-headers
yum -y install libmcrypt libmcrypt-devel libmhash libmhash-devel
yum -y install libxml2-devel
yum -y install openssl-devel
yum -y install bzip2-devel
yum -y install libjpeg-devel
yum -y install libpng-devel
yum -y install freetype-devel
yum -y install mysql-devel
yum -y install ncurses-devel
yum -y install unixODBC-devel
yum -y install pspell-devel
yum -y install net-snmp-devel
yum -y install libc-client-devel
yum -y install libtool-ltdl-devel 
yum -y install libpcre3 libpcre3-dev

 

[MySQL 설치 - v5.1이상]
yum install cmake 
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DWITH_EXTRA_CHARSETS=all -DMYSQL_DATADIR=/usr/local/mysql/data -DENABLED_LOCAL_INFILE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DSYSCONFDIR=/etc -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS=all -DMYSQL_TCP_PORT=3306
make
make install
chmod -R 777 /tmp
./script/mysql_install_db --user=root --basedir=/usr/apm/mysql --datadir=/usr/apm/mysql/data
./support-files/mysql.server start

 

[PHP 설치 - v5.3이상]
./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-zlib --with-curl --with-gd --with-ttf --with-freetype-dir --with-jpeg-dir --with-png-dir --with-mcrypt --with-iconv --with-mhash --with-gettext --with-kerberos --with-openssl=/usr/local/ --with-libxml-dir --with-bz2 --with-gettext --enable-gd-native-ttf --enable-ftp --enable-mbstring 
--enable-sigchild --enable-bcmath --enable-calendar --enable-dbase --enable-exif --enable-mbregex --enable-sockets --enable-wddx --enable-zip --disable-debug 
make
make install

 

[Apache 설치 - v2.2이상]
./configure --with-mpm=worker --with-included-apr --prefix=/usr/local/httpd-2.2.4 --enable-info --enable-rewrite --enable-modules=so --enable-so
make
make install