본문으로 바로가기

CentOS APM 셋업

category 시스템/Linux 2015. 12. 14. 12:38
반응형

APM + lib 설치...

zlib-1.2.3.tar.gz
libpng-1.2.10.tar.gz
freetype-2.2.1.tar.gz
jpegsrc.v6b.tar.gz
gd-2.0.33.tar.gz
libxml2-2.6.24.tar.gz
libiconv-1.9.2.tar.gz


mysql-5.0.21.tar.gz
httpd-2.2.2.tar.gz
php-5.1.4.tar.gz
ZendOptimizer-3.0.0-linux-glibc21-i386.tar.gz


설치전에 꼭 밑의 두줄을 생성한다. 이것때문에 설치 중 문제가 발생하는 경우가 있다... 필수!!!
싫으면 말고..ㅡㅡ;; 후회할것이다.
왠만하면... /usr/local 경로에서 설치를 시작해라..ㅡㅡ;;
#rdate -s time.bora.net
#mkdir /usr/local/man/man1


-----------------------------------------------
Step 0 : Install Packages
-----------------------------------------------
0.1 ZLIB 설치
#tar xvfz zlib*
#cd zlib*
#./configure
#make
#make install
#cd ..
#rm -rf zlib*
-----------------------------------------------
0.2 LIBPNG 설치
#tar xvfz libpng*
#cd libpng*
#cp scripts/makefile.linux makefile
#make test
#make install
#cd ..
#rm -rf libpng*
-----------------------------------------------
0.3 FREETYPE 설치
#tar xvfz freetype*
#cd freetype*
#./configure
#make
#make install
#cd ..
#rm -rf freetype*
-----------------------------------------------
0.4 JPEGSRC 설치
#tar xvfz jpegsrc*
#cd jpeg-6b
#./configure --enable-shared --enable-static
#make
#make test
#make install
#make install-lib
#make install-headers
#cd ..
#rm -rf jpegsrc*
-----------------------------------------------
0.5 GD 설치
#tar xvfz gd*
#cd gd*
#./configure
#make
#make install
#cd ..
#rm -rf gd*
-----------------------------------------------
0.6 LIBXML2 설치
#tar xvfz libxml2*
#cd libxml2*
#./configure
#make
#make install
#cd ..
-----------------------------------------------
0.7 LIBICONV 설치
#tar xvfz libiconv*
#cd libiconv*
#./configure --prefix=/usr/local
#make
#make install
#ln -s /usr/local/lib/libiconv.so.2 /usr/lib/libiconv.so.2 (php 멍청한게.. /usr/lib 에서 찾는다.. /usr/local/lib 라고 해도 말이다..)
#cd ..
-----------------------------------------------

 

 

-----------------------------------------------
Step 1 : Install APM
-----------------------------------------------
1.1 MYSQL5 설치
#tar xvfz mysql*
#cd mysql*
#
./configure \
--prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data \
--disable-shared --enable-assembler \
--with-thread-safe-client --with-mysqld-user="mysql" \
--with-client-ldflags=-all-static \
--with-mysqld-ldflags=-all-static \
--with-readline --without-debug \
--without-docs --without-bench \
--with-charset=euckr
#make
#make install
#cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
#/usr/local/mysql/bin/mysql_install_db
-----------------------------------------------
1.2 APACHE2 설치
#tar xvfz httpd*
#cd httpd*
#./configure --prefix=/usr/local/apache2 --enable-modules=so --enable-so --enable-rewrite
#make
#make install
-----------------------------------------------
1.3 PHP5 설치
#vi /etc/ld.so.conf (라이브러리 인식시키기..)
* 다음라인을 추가
/lib
/usr/lib
/usr/local/lib
/usr/local/mysql/lib/mysql

#ldconfig

#tar xvfz php*
#mv php* /usr/local/php (폴더명을 변경... tar.gz 를 조심...)
#cd /usr/local/php
#
./configure \
--prefix=/usr/local/php \
--with-mysql=/usr/local/mysql \
--with-apxs2=/usr/local/apache2/bin/apxs \
--enable-sysvshm=yes --enable-sysvsem=yes \
--enable-debug=no --enable-track-vars=yes \
--enable-url-fopen-wrapper=yes --with-ttf \
--with-png-dir=/usr --with-zlib-dir --with-jpeg-dir=/usr \
--with-gdbm=/usr --enable-ftp --with-tiff-dir=/usr \
--enable-memory-limit --enable-mbstring \
--with-expat-dir=/usr --enable-sockets \
--enable-wddx --with-freetype-dir=/usr \
--enable-bcmath --enable-mbstr-enc-trans \
--enable-mbregex --enable-exif --with-gd \
--enable-gd-native-ttf --enable-gd-imgstrttf \
--enable-calendar --with-openssl=/usr \
--with-iconv=/usr/local \
 --with-xml --with-xmlrpc

#make
#make install
#cp php.ini-dist /usr/local/lib/php.ini
-----------------------------------------------
1.4 ZendOptimizer3 설치
#tar xvfz Zend*
#cd Zend*
#./install.sh
-----------------------------------------------

 

-----------------------------------------------
Step 2 : Setting APM
-----------------------------------------------
2.1 Apache2
#vi /usr/local/apache2/conf/httpd.conf

CustomLog logs/access_log common << 이 부분을 수정
SetEnvIfNoCase Request_URI (gif|png|jpg|css|js|bmp|jpeg|swf)$ IMAGE=1
CustomLog /usr/local/apache2/logs/access_log common env=!IMAGE

//있는지 확인후 없으면 추가
LoadModule php5_module modules/libphp5.so

// php파일을 웹서버에서 인식하기 위해 아래두줄 추가
AddType application/x-httpd-php .php .html .htm .inc
AddType application/x-httpd-php-source .phps

// 처음페이지로 인식할 파일명설정
DirectoryIndex index.html index.htm index.php
-----------------------------------------------
2.2 MySQL5
#ln -s /usr/local/mysql/bin/mysql /usr/bin/
#ln -s /usr/local/mysql/bin/mysqldump /usr/bin/
비밀번호 설정
#/usr/local/mysql/bin/mysqladmin -u root password "비밀번호"


//mysql 커멘드에서 디비서버에 계정을 생성
//GRANT all privileges on dbname.* TO id@localhost IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)
-----------------------------------------------
2.3 RC.LOCAL
vi /etc/rc.d/rc.local

/usr/local/apache2/bin/apachectl start >&/dev/null
/usr/local/mysql/bin/mysqld_safe --user=root & >&/dev/null
위 두줄을 추가한다.
-----------------------------------------------

 

 

 

===*** 테스트


- 추가 설치
yum install gcc
yum install gcc-c++
yum install termcap
yum install libtermcap
yum install libtermcap-devel
yum install gdbm-devel

yum install zlib*
yum install libxml*
yum install freetype*
yum install libpng*
yum install libjpeg* c


1. mysql 설치 하기.
# wget ftp://ftp.superuser.co.kr/mysql/mysql-5.0.37.tar.gz
# tar zxvf mysql-5.0.37.tar.gz
# mv mysql-5.0.37 /usr/local/src/

# grupadd mysql
# useradd -g mysql -s /bin/false -d /usr/local/msql mysql

# cd /usr/local/src/mysql-5.0.37
# ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --with-charset=euckr --enable-thread-safe-client
# make && make install

# usr/local/mysql/bin/mysql_install_db
# chown -R mysql.mysql /usr/local/mysql
# cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
# /usr/local/mysql/bin/mysqld_safe &
# /usr/local/mysql/bin/mysqladmin -u root password '[암호]'

# ln -s /usr/local/mysql/bin/mysql /usr/bin/
# ln -s /usr/local/mysql/bin/mysqldump /usr/bin/


2. apache 설치 하기.

# yum install openssl*

# wget ftp://ftp.superuser.co.kr/apache/httpd-2.0.59.tar.gz
# wget http://ftp.apache-kr.org/httpd/httpd-2.2.6.tar.gz
# tar zxvf httpd-2.2.6.tar.gz
# mv httpd-2.2.6 /usr/local/src/
# cd /usr/local/src/httpd-2.2.6
# ./configure --prefix=/usr/local/apache2 --enagle-so --enable-modules=so --enable-ssl --enable-rewrite
# make && make install


yum install bz*

3. php5 설처
# wget ftp://ftp.superuser.co.kr/php/php-5.1.6.tar.gz
# wget ftp://ftp.superuser.co.kr/php/php-5.2.5.tar.gz
# tar zxvf php-5.2.5.tar.gz
# mv php-5.2.5 /usr/local/src/
# cd /usr/local/src/php-5.2.5

- 5.2.5
# ./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 \
--enable-sysvshm=yes --enable-sysvsem=yes --enable-debug=no \
--with-ttf --with-png-dir=/usr --with-zlib-dir --with-jpeg-dir=/usr --with-gdbm=/usr \
--enable-ftp --enable-mbstring --enable-sockets --enable-wddx \
--with-freetype-dir=/usr --enable-bcmath \
--enable-mbregex --enable-exif --with-gd --enable-gd-native-ttf \
--enable-calendar --with-openssl=/usr

- 5.1.4 or 5.1.6
# ./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 \
--enable-sysvshm=yes --enable-sysvsem=yes --enable-debug=no \
--enable-track-vars=yes --enable-url-fopen-wrapper=yes --with-ttf \
--with-png-dir=/usr --with-zlib-dir --with-jpeg-dir=/usr \
--with-gdbm=/usr --enable-ftp --with-tiff-dir=/usr --enable-memory-limit \
--enable-mbstring --with-expat-dir=/usr --enable-sockets --enable-wddx \
--with-freetype-dir=/usr --enable-bcmath --enable-mbstr-enc-trans \
--enable-mbregex --enable-exif --with-gd --enable-gd-native-ttf \
--enable-gd-imgstrttf --enable-calendar --with-openssl=/usr


# ./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 \
--enable-sysvshm --enable-sysvsem --enable-spl
--enable-bcmath --enable-ftp --enable-filepro
--enable-libxml --enable-memory-limit --enable-sockets
--enable-track-vars --enable-wddx
--enable-versioning --enable-cli
--enable-debug=no --enable-url-fopen-wrapper=yes
--enable-mbstring  --enable-mbstr-enc-trans 
--enable-mbregex --enable-exif--enable-gd-native-ttf
--enable-gd-imgstrttf  --enable-calendar
--with-openssl --with-expat-dir=/usr --with-freetype-dir
--with-png-dir --with-zlib-dir --with-jpeg-dir --with-tiff-dir
--with-gdbm --with-bz2 --with-gettext --with-imap=shared
--with-imap-ssl=/usr/lib --with-kerberos
--with-libxml-dir=/usr/local --with-mod-charset  --with-ttf
--with-zlib --with-iconv --with-xml --with-xmlrpc --with-gd


./configure \
--prefix=/usr/local/php \
--with-mysql=/usr/local/mysql \
--with-apxs2=/usr/local/apache2/bin/apxs \
--enable-sysvshm=yes --enable-sysvsem=yes \
--enable-debug=no --enable-track-vars=yes \
--enable-url-fopen-wrapper=yes --with-ttf \
--with-png-dir=/usr --with-zlib-dir --with-jpeg-dir=/usr \
--with-gdbm=/usr --enable-ftp --with-tiff-dir=/usr \
--enable-memory-limit --enable-mbstring \
--with-expat-dir=/usr --enable-sockets \
--enable-wddx --with-freetype-dir=/usr \
--enable-bcmath --enable-mbstr-enc-trans \
--enable-mbregex --enable-exif --with-gd \
--enable-gd-native-ttf --enable-gd-imgstrttf \
--enable-calendar --with-openssl=/usr \
--with-iconv=/usr/local \
 --with-xml --with-xmlrpc

 

--enable-track-vars
--enable-rul-fopen-wrapper=yes
--with-png
--with-tiff-dir
--enable-memory-limit
--with-expat-dir
--enable-mbstr-enc-trans
--with-xml
--with-libxml
--with-imap-shared

 

./configure \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-zlib --with-gd --with-ttf --with-png \
--with-expat-dir=/usr --with-gmp --with-xml \
--with-mysql=/usr/local/mysql \
--with-language=korean \
--with-charset=euc_kr \
--disable-debug --disable-posix --disable-rpath \
--enable-safe-mode --enable-magic-quotes \
--disable-dmalloc --enable-bcmath \
--enable-dio --enable-gd-native-ttf \
--enable-sysvsem --enable-sysvshm \
--enable-wddx --enable-versioning \
--enable-pic --enable-inline-optimization \
--enable-memory-limit --enable-mbstring \
--enable-mbregex --enable-mbstr-enc-trans \
--with-config-file-path=/usr/local/lib --enable-ftp --disable-debug --enable-track-vars=yes \
--with-jpeg-dir --with-freetype-dir \
--enable-gd-native-ttf --enable-dl \
--with-imap=shared --with-imap-ssl=/usr/lib --with-kerberos

http://nadayh.tistory.com/entry/Centos-45-Apache2-php5-mysql5-resin-3-oracle-10g-%EC%84%A4%EC%B9%98
http://rinapc.com/166

 

 

반응형