Server & OS

묻지마 APM 설치 설명서

페이지 정보

본문

./configure --help 하면 상세내용이 나옵니다.


일단 먼저 밝혀둘 것은 여기 소개하는 방법대로 100프로 된다는 보장은 없습니다.
사용 하시는 서버의 상태에 따라서 변수가 작용 할수 있습니다.
각 소스의 버전은 현재의 버전과 다를 수 있습니다. 사실은 지금 제가 사용하는 버전과도 다른게 많습니다. 가급적 최신 버전을 다운로드 하셔서 사용 하십시요.

그리고 소개하는 내용은 혹시 필요로 하시는 분이 계실것 같아서 그 동안 이곳 팁테크란에 올라온 정보들을 나름대로 취합해서 정리한 것입니다.
좋은 정보를 제공해주신 분들께 감사 드립니다.

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

1. flex 설치 (설치가 되 있다면 다음 단계로) ------------------
# rpm -Uvh flex-2.5.4a-26.i386.rpm

2. j2sdk설치 (설치가 되 있다면 다음 단계로) -----------------
소스위치 : http://java.sun.com 에서 j2sdk1.4.1을 다운 받는다.

#javac
command not found 나오면 j2sdk 설치

#chmod 755 j2sdk-1_4_1_01-linux-i586-rpm.bin
#./j2sdk-1_4_1_01-linux-i586-rpm.bin // q를 누르고 엔터 그럼 rpm 파일이 하나 생김.
#rpm -Uvh j2sdk-1_4_1_01-fcs-linux-i586.rpm

프로파일 수정
#vi /home/USER/.bash_profile // 텔넷으로 로그인후 su를 통해 작업 할 경우
#vi /root/.bash_profile //서버에 루트로 직접 작업할 경우

아래의 내용을 추가
JAVA_HOME=/usr/java
CLASSPATH=.
PATH=$PATH:$JAVA_HOME/bin

#source /home/USER/.bash_profile 혹은
#source /root/.bash_profile

#javac

3. zlib 설치 -------------------------------------------------
소스위치 :http://www.gzip.org/zlib/

rpm이 설치 되 있다면 삭제
# rpm -e --nodeps zlib
# rpm -e nodeps zlib-devel

# tar zxvf zlib-1.1.4.tar.gz
# cd zlib-1.1.4

# ./configure -s // libz.so 생성
# make

# ./configure //libz.a 생성
# make test && make install

# cp libz.so* /usr/local/lib
# cd /usr/local/lib
# rm -rf libz.so
# rm -rf libz.so.1
# ln -s libz.so.1.1.4 libz.so
# ln -s libz.so.1.1.4 libz.so.1

# vi /etc/ld.so.conf
/usr/local/lib <= 제일 밑에 줄에 추가

# ldconfig

4. curl 설치 ----------------------------------------------
소스 위치 : http://curl.haxx.se/download.html

# rpm -e --nodeps curl
# rpm -e --nodeps curl-devel

# tar zxvf curl-7.10.3.tar.gz
# cd curl-7.10.3
# ./configure && make && make install

5. mhash 설치 ---------------------------------------------
소스 위치 :  http://mhash.sourceforge.net/dl

# tar zxvf mhash-0.8.13.tar.gz
# cd mhash-0.8.13
# ./configure && make && make install

6. mcrypt 설치 --------------------------------------------
소스위치 : ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt

# tar zxvf libmcrypt-2.5.6.tar.gz
# cd libmcrypt-2.5.6
# ./configure && make && make install

7. clibpdf 설치 -------------------------------------------
소스 위치 : http://www.fastio.com

# tar zxvf clibpds202r1.tar.gz
# cd ClibPDF
# cd source
# mv Makefile Makefile.orig
# cp Makefile.Linux Makefile
# make lib && make install

8. ming 설치 ----------------------------------------------
소스위치 : http://www.opaque.net/ming

# tar zxvf ming-0.2a.tgz
# cd ming-0.2a
# make && make install

9. pdflib 설치 --------------------------------------------
소스위치 : http://www.pdflib.com

# tar zxvf pdflib-4.0.3.tar.gz
# cd pdflib-4.0.3
# ./configure
# make && make install

# vi /etc/ld.so.conf
아래 내용 추가
/usr/local/bin
/usr/lib/tcl8.3/pdflib

# ldconfig

10. swf 설치 -----------------------------------------------
소스의치 : ftp://ftp.sgi.com/sgi/graphics/grafica/flash

# tar zxvf dist.99.linux.tar.Z
# mkdir /usr/local/swf
# cd dist
# mkdir /usr/local/swf/include
# mkdir /usr/local/swf/lib
# mkdir /usr/local/swf/fonts
# mkdir /usr/local/swf/psfonts
# mkdir /usr/local/swf/bin
# cp swf.h /usr/local/swf/include
# cp libswf.a /usr/local/swf/lib
# cp bin/* /usr/local/swf/bin
# cp fonts/* /usr/local/swf/fonts
# cp psfonts/* /usr/local/swf/psfonts

11. mm 설치 -----------------------------------------------
소스위치 : http://www.engelschall.com/sw/mm

# rpm -e --nodeps mm
# rpm -e --nodeps mm-devel

# tar zxvf mm-1.2.2.tar.gz
# cd mm-1.2.2
# ./configure --disable-shared && make && make install

12. libpng 설치 -------------------------------------------
소스위치 : http://www.libpng.org/pub/png/libpng.html

# rpm -e --nodeps libpng
# rpm -e --nodeps libpng-devel

# tar zxvf libpng-1.2.5.tar.gz
# cd libpng-1.2.5
# cp scripts/makefile.linux Makefile
# make test && make install

13. jpeg 설치 ---------------------------------------------
소스위치: http://www.cs.wisc.edu/~ghost/doc/AFPL/get800.htm

# rpm -qa | grep libjpeg // 여기서 나온 rpm 을 모두 삭제 한다..
# rpm -e --nodeps libjpeg
# rpm -e --nodeps libjpeg-devel

# cd jpeg-6b
# ./configure --enable-shared --enable-static
# make && make test && make install

14. libungif 설치 -----------------------------------------
소스위치 : ftp://sunsite.unc.edu/pub/Linux/libs/graphics

# rpm -e --nodeps libungif
# rpm -e --nodeps libungif-devel

# tar zxvf libungif-4.1.0.tar.gz
# cd libungif-4.1.0
# ./configure && make && make install

15. libtiff 설치 ------------------------------------------
소스위치 : ftp://ftp.remotesensing.org/pub/libtiff
# rpm -e --nodeps libtiff
# rpm -e --nodeps libtiff-devel

# tar zxvf tiff-v3.5.7.tar.gz
# cd tiff-v3.5.7
# ./configure // 중간에 뭐 물어 보면 yes
# make && make install

16. t1lib 설치 ---------------------------------------------
소스의치 : ftp://sunsite.unc.edu/pub/Linux/libs/graphics

# tar zxvf t1lib-1.3.1.tar.gz
# cd t1lib-1.3.1
# ./configure
# make without_doc && make install

17. freetype 설치 ---------------------------------------------

# ./configure --prefix=/usr/local/freetype

# make ; make install

18. gd 설치 ---------------------------------------------------

# ./configure --prefix=/usr/local/gd \\
--with-freetype=/usr/local/freetype

# make ; make install


19. MySQL 설치 ------------------------------------------------

# groupadd mysql
# useradd -g mysql mysql

# ./configure \\
--prefix=/usr/local/mysql \\
--localstatedir=/home/mysql/data \\
--with-charset=euc_kr

- 혹시 실수로 환경설정을 다시 해야할 경우 make distclean 명령실행
# make ; make install

# scripts/mysql_install_db
# chown -R root  /usr/local/mysql
# chown -R mysql /home/mysql/data
# chgrp -R mysql /usr/local/mysql
# chgrp -R mysql /home/mysql
# cp support-files/my-medium.cnf /etc/my.cnf

MySQL 기동
# /usr/local/mysql/bin/mysqld_safe --user=mysql --language=korean &

또는..
# vi /usr/local/mysql/share/mysql/mysql.server
- 편집기로 열어서 safe_mysql이 실행되는 라인(119라인)에 --language=korean 옵션을 추가.
$bindir/safe_mysqld --pid-file=$pid_file --datadir=$datadir --language=korean & 한글메세지를 띄우도록 해준다.

- 시스템 부팅시에 자동 실행되도록 설정
# cp -p /usr/local/mysql/share/mysql/mysql.server /etc/rc.d/init.d/mysqld
# ln -s /etc/rc.d/init.d/mysqld /etc/rc.d/rc3.d/S90mysqld

# /etc/rc.d/init.d/mysqld start
# ps -ef | grep mysql    MySQL 프로세스 확인하기
# /etc/rc.d/init.d/mysqld stop    MySQL 데몬 종료하기

MySQL root password 설정
# /usr/local/mysql/bin/mysqladmin -u root password '패스워드'

20-1. APACHE 1.3x 설치 (DSO 설치)--------------------------------

# ./configure --prefix=/usr/local/apache \\
--enable-shared=max \\
--enable-rule=SHARED_CORE \\
--enable-module=most

make ; make install

/usr/local/apache/bin으로 이동
이곳에서 "./httpd -l"을 실행해 보시기 바랍니다. 이때 다음과 같이 나오면 제대로 설치가 된 것임.
# ./httpd -l
Compiled-in modules:
http_core.c
mod_so.c

한가지 덧붙이면 /usr/local/apache/bin에 apxs라는 화일이 있는지 확인한다.


A.P.M을 DSO로 설치할때 모든 컴파일이 끝나고도 아파치를 실행하면
libmysqlclient.so.6을 찾을수 없다고 에러를 내는 경우....

/etc/ld.so.conf 파일에 다음라인을 추가한다.
/usr/local/lib
/usr/local/lib/mysql
즉 libmysqlclient.so.6 라이브러리가 있는 디렉토리를 적어 주면된다.
그리고 /sbin/ldconfig를 실행하면 된다.


20-2. APACHE 2 설치 (DSO 설치)-----------------------------------

# ./configure --prefix=/usr/local/apache \\
--enable-rule=SHARED_CORE \\
--enable-module=most \\
--enable-shared=max \\
--enable-so

# make ; make install

21-1. PHP4 설치 (라이브러리 소스 설치시)-----------------------------

# ./configure --prefix=/usr/local/php \\
--with-mysql=/usr/local/mysql \\
--with-config-file-path=/usr/local/apache/conf \\
--with-apxs=/usr/local/apache/bin/apxs \\ // 아파치 1.3x
--with-apxs2=/usr/local/apache/bin/apxs \\ // 아파치 2.0
--with-charset=euc_kr \\
--with-language=korean \\
--enable-track-vars \\
--with-gd=/usr/local/gd \\
--with-freetype-dir=/usr/local/include/freetype2 \\
--with-imap=/usr/local/imap \\ // imap 설치시
--with-jpeg-dir=/usr/local/lib \\
--with-png-dir=/usr/local/lib \\
--with-gif-dir=/usr/local/lib \\
--with-tiff-dir=/usr/local/lib \\
--with-zlib-dir=/usr/local/lib \\ // SOURCE
--with-zlib-dir=/usr/lib \\ // RPM
--with-zlib \\
--with-ming=/usr/lib \\
--with-pdflib=/usr/local/pdflib \\
--with-cpdflib \\
--with-openssl \\
--with-gettext \\
--with-kerberos \\
--with-swf=/usr/local/swf \\
--with-mm \\
--with-mhash=/usr/local/lib \\
--with-mcrypt=/usr/local/lib \\
--with-mod_charset \\
--with-regex=php \\
--with-curl \\
--with-ldap \\
--with-xml \\
--with-t1lib=/usr/local/t1lib-1.3.1 \\
--enable-gd-native-ttf \\
--enable-ftp \\
--enable-sockets \\
--disable-debug \\
--enable-sysvsem=yes \\
--enable-sysvshm=yes \\
--enable-shmop \\
--enable-track-vars \\
--enable-freetype-4bit-antialias-hack \\
--enable-calendar \\
--enable-sigchild \\
--enable-magic-quotes \\
--enable-trans-sid \\
--enable-inline-optimization \\
--enable-bcmath \\
--enable-exif \\
--enable-dba=shared \\

21-2. PHP4 설치 (라이브러리 RPM 설치시, 추가사항 일부만 소스설치)----

# ./configure --prefix=/usr/local/php \\
--with-mysql=/usr/local/mysql \\
--with-config-file-path=/usr/local/apache/conf \\
--with-apxs=/usr/local/apache/bin/apxs \\ // 아파치 1.3x
--with-apxs2=/usr/local/apache/bin/apxs \\ // 아파치 2.0
--with-charset=euc_kr \\
--with-language=korean \\
--enable-track-vars \\
--with-gd=/usr/local/gd \\
--with-freetype-dir=/usr/local/include/freetype2 \\
--with-imap=/usr/local/imap \\ // imap 설치시
--with-jpeg-dir=/usr/lib \\
--with-png-dir=/usr/lib \\
--with-gif-dir=/usr/lib \\
--with-tiff-dir=/usr/lib \\
--with-zlib-dir=/usr/lib \\
--with-zlib \\
--with-ming=/usr/lib \\
--with-pdflib=/usr/local/pdflib \\
--with-cpdflib \\
--with-openssl \\
--with-gettext \\
--with-kerberos \\
--with-swf=/usr/local/swf \\
--with-mm \\
--with-mhash=/usr/local/lib \\
--with-mcrypt=/usr/local/lib \\
--with-mod_charset \\
--with-regex=php \\
--with-curl \\
--with-ldap \\
--with-xml \\
--with-t1lib=/usr/local/t1lib-1.3.1 \\
--enable-gd-native-ttf \\
--enable-ftp \\
--enable-sockets \\
--disable-debug \\
--enable-sysvsem=yes \\
--enable-sysvshm=yes \\
--enable-shmop \\
--enable-track-vars \\
--enable-freetype-4bit-antialias-hack \\
--enable-calendar \\
--enable-sigchild \\
--enable-magic-quotes \\
--enable-trans-sid \\
--enable-inline-optimization \\
--enable-bcmath \\
--enable-exif \\
--enable-dba=shared \\

화면에 아래와 같은 부분이 포함되면, 바르게 구성된 것입니다.
checking for Apache module support via DSO through APXS... yes
checking whether to enable versioning... yes

# make ; make install

# cp ../php-4.3.1/php.ini-dist /usr/local/apache/conf/php.ini

httpd.conf 에 추가
LoadModule php4_module modules/libphp4.so

AddType application/x-httpd-php .html .htm .php .inc
AddType application/x-httpd-php-source .phps

아파치 실행
# /usr/local/apache/bin/apachectl start

또는..
# cp -p /usr/local/apache/bin/apachectl /etc/rc.d/init.d/apachectl
# ln -s /etc/rc.d/init.d/apachectl /etc/rc.d/rc3.d/S85httpd
# ln -s /etc/rc.d/init.d/apachectl /etc/rc.d/rc5.d/S85httpd

# ln -s /etc/rc.d/init.d/apachectl /etc/rc.d/rc0.d/K15httpd
# ln -s /etc/rc.d/init.d/apachectl /etc/rc.d/rc1.d/K15httpd
# ln -s /etc/rc.d/init.d/apachectl /etc/rc.d/rc6.d/K15httpd


관련자료

등록된 댓글이 없습니다.
Today's proverb
“힘내라구.” 밤에 헤어질 때, 아주 좋은 이야기를 나누었을 때든지 아무 관련 없이 로댕은 곧잘 내게 이렇게 말하는 것이었습니다. 그는 알고 있었던 겁니다. 젊었을 때, 이 말이 날마다 얼마나 필요한 것인가를. (릴케)