본문 바로가기
I T/Linux

APM 설치.

by 루솨 2015. 8. 30.

테스트 버전 :CentOS 6 


yum update 를 통해 패키지 최신버전을 유지합니다.


[APM 설치 버전]
httpd 2.3.8
mysql 5.5.14
php 5.3.6
Zend 5.3

/usr/local/src에 위 파일을 다운받아 압축을 다 풀어놓습니다.


cd /usr/local/src
wget ris.smileserv.com/source/httpd-2.3.8.tar.gz
wget ris.smileserv.com/source/php-5.3.8.tar.gz
wget pub.neulwon.com/mysql-5.5.14.tar.gz
wget ris.smileserv.com/source/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz
tar xvzf httpd-2.3.8.tar.gz
tar xvzf php-5.3.8.tar.gz
tar xvzf mysql-5.5.14.tar.gz
tar xvzf ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz



▶ 전체 필수 구성 요소 설치
yum -y install openssl openssl-devel mhash mhash-devel libtool libtool-ltdl libtool-ltdl-devel imap-devel imap zlib-devel zlib freetype-devel freetype libpng-devel libpng libjpeg-devel libjpeg libtiff-devel libtiff gd-devel gd pcre-devel pcre libxml-devel libxml libxml2-devel libxml2 gdbm-devel gdbm ncurses-devel ncurses curl-devel curl expat-devel expat bzip2-devel bzip2-libs bzip2 libc libc-devel libc-client-devel gcc* <-- 끝에 네개 추가


■ httpd 2.3.8


▶ 필수 구성 요소 설치

cd /usr/local/src
wget http://archive.apache.org/dist/apr/apr-1.4.2.tar.gz
tar xvzf apr-1.4.2.tar.gz
cd apr-1.4.2
           cp -arp libtool libtoolT      <- (두번째 시도) libtoolT 지우지 못한다는 에러메세지 나타났지만 생략해주어도 되었음
./configure
           ln -s /usr/bin/libtool /      <- (두번째 시도) 생략해주어도 되었음
make
make install

cd ..
wget http://archive.apache.org/dist/apr/apr-util-1.3.9.tar.gz
tar xvzf apr-util-1.3.9.tar.gz
cd apr-util-1.3.9
./configure --with-apr=/usr/local/apr
make
make install


▶ 설치 진행
cd /usr/local/src/httpd-2.3.8
./configure --prefix=/usr/local/apache --enable-modules=so --enable-mods-shared=all --enable-modules=shared --enable-ssl --enable-rewrite --with-mpm=worker --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr
make
make install


---------------------------------------------------------------


■ mysql 5.5.14


▶ 필수 구성 요소 설치
cd ..
wget http://www.cmake.org/files/v2.8/cmake-2.8.5.tar.gz
tar xvzf cmake-2.8.5.tar.gz
cd cmake-2.8.5
./bootstrap
make
make install

 
▶ 설치 진행
groupadd -g 400 mysql
useradd -u400 -g400 -d /usr/local/mysql -s /bin/false mysql
cd ../mysql-5.5.14
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS=all -DENABLED_LOCAL_INFILE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DSYSCONFDIR=/etc -DMYSQL_TCP_PORT=3306
make
make install

cp -arp scripts/mysql_install_db /usr/local/mysql
sh /usr/local/mysql/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
rm -f /usr/local/mysql/mysql_install_db
chown -R mysql:mysql /usr/local/mysql
chown -R mysql.mysql /usr/local/mysql/data
cp support-files/my-huge.cnf /etc/my.cnf
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
chmod 700 /etc/init.d/mysqld
chown root.root /etc/init.d/mysqld
chkconfig --add mysqld
chmod 711 /usr/local/mysql
chmod 700 /usr/local/mysql/data
chmod 751 /usr/local/mysql/bin
chmod 750 /usr/local/mysql/bin/*
chmod 755 /usr/local/mysql/bin/mysql
chmod 755 /usr/local/mysql/bin/mysqldump


---------------------------------------------------------------


■ php 5.3.8


▶ 필수 구성 요소 설치

cd /usr/local/src
wget ris.smileserv.com/source/mhash-0.9.7.1.tar.gz
tar zxvf mhash-0.9.7.1.tar.gz
cd mhash-0.9.7.1
./configure
make
make install

cd ..
wget ris.smileserv.com/source/libmcrypt-2.5.7.tar.gz
tar zxvf libmcrypt-2.5.7.tar.gz
cd libmcrypt-2.5.7
./configure
make
make install


cd /usr/local/src
wget pub.neulwon.com/jpegsrc.v6b.tar.gz
tar xvzf jpegsrc.v6b.tar.gz
cd jpeg-6b


cp -f /usr/share/libtool/config/config.guess .     <- 덮어 쒸우기. 참고 http://www.noah.org/wiki/Jpegsrc_64    <- centos 5.6 이하 일때는 /usr/share/libtool/config.guess 에 있음
cp -f /usr/share/libtool/config/config.sub .


./configure --enable-shared --enable-static
make
make install


// /usr/bin/install: cannot create regular file `/usr/local/man/man1/cjpeg.1': 그런 파일이나 디렉토리가 없음     이라는 오류가 나타날 경우 아래 처럼 처리할것
// makedir /usr/local/man/man1
// make install
// make


(64비트 운영체제에서는 아래 심볼릭 링크 진행 해주어야 함)


ln -sf /usr/lib64/libpng12.so.0 /usr/lib/libpng12.so.0    // 이부분은 CentOS 6, fedora 15 이상에서 해당되는 내용. If문 사용 : 64bit이고 파일이 없을때 복사
ln -sf /usr/lib64/libpng12.a /usr/lib/libpng12.a
ln -sf /usr/lib64/libpng.so.3 /usr/lib/libpng.so.3
ln -sf /usr/lib64/libpng.so /usr/lib/libpng.so
ln -sf /usr/lib64/libpng12.so /usr/lib/libpng12.so
ln -sf /usr/lib64/libc-client.so /usr/lib/libc-client.so
ln -sf /usr/lib64/libgssapi_krb5.so /usr/lib/libgssapi_krb5.so
ln -sf /usr/lib64/libkrb5.so /usr/lib/libkrb5.so
ln -sf /usr/lib64/libkrb5support.so /usr/lib/libkrb5support.so


▶ 설치 진행
cd /usr/local/src/php-5.3.8

(make test 에서 오류 발생하여 --safe-mode 옵션 제거 했음)

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --enable-mod-charset --with-config-file-path=/usr/local/apache/conf --enable-sigchild --enable-magic-quotes --with-libxml-dir --with-openssl --with-zlib --with-zlib-dir --with-bz2 --enable-calendar --with-curl --enable-dba --with-gdbm --enable-exif --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --enable-gd-native-ttf --with-gettext --with-imap --with-imap-ssl --with-kerberos --enable-mbstring --with-mhash --with-mcrypt --with-mysql=/usr/local/mysql --enable-sockets --with-regex=php --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --enable-zend-multibyte

make
make install
cp php.ini-development /usr/local/apache/conf/php.ini

vi /usr/local/apache/conf/httpd.conf
(적절한곳에 아래내용 입력)

DirectoryIndex index.html index.htm index.php index.php3 index.php4 index.php5 index.phtml index.cgi index.jsp

# PHP Enable
AddType application/x-httpd-php .html .htm .php .php3 .php4 .php5 .phtml .cgi .inc
AddType application/x-httpd-php-source .phps

<Directory /home/*>
    AllowOverride All
    Options +ExecCGI
    Order allow,deny
    Allow from all
</Directory>


■ ZendGuardLoader
cd ../ZendGuardLoader-php-5.3-linux-glibc23-x86_64/php-5.3.x
cp -arp ZendGuardLoader.so /usr/local/php/lib/
vi /usr/local/apache/conf/php.ini
(맨하단에 아래내용 입력)

[Zend]
zend_extension=/usr/local/php/lib/ZendGuardLoader.so

short_open_tag = On    // phpinfo(); 를 보기위해
date.timezone = Asia/Seoul 도 입력
register_globals = On


참고
http://www.atomicorp.com/forums/viewtopic.php?f=12&t=4984
http://forums.zend.com/viewtopic.php?f=57&t=1365&start=80

끝.

'I T > Linux' 카테고리의 다른 글

Ip 로 사이트 접속 시도시 접속 못하게 하는법 [아파치]  (0) 2015.08.30
find 명령어 사용방법  (0) 2015.08.30
리눅스 삼바 설정  (0) 2015.08.30
리눅스 PHP 업그레이드  (0) 2015.08.30
리눅스 캐시 메모리 삭제  (0) 2015.08.30