티스토리 뷰

Study/System

APM 설치

pursh 2012. 3. 9. 09:44
APM 이란?

APM = Apache + PHP + Mysql
Apache → 사용자들에게 웹페이지를 보여주기 위해 사용하는 웹서버.
PHP → Personal Hypertext Preprosessor, 동적 웹페이지를 만들기 위한 프로그래밍 언어
Mysql → 자료 저장을 위한 데이터베이스 시스템(DBMS : DataBase Management System)
※ 설치 환경은 CentOS 5.7(Final)임.

APM 설치 준비
 
1. Apache, PHP, Mysql을 다운로드

2. APM 운용을 위해 필요한 소프트웨어 다운로드

3. 소프트웨어에 대한 RPM 삭제


zlib 설치

웹페이지에서 압축파일을 읽고 쓰기 위해 필요한 라이브러리

[root@localhost download]# tar zxvf zlib-1.2.6.tar.gz
zlib-1.2.6/
zlib-1.2.6/adler32.c
zlib-1.2.6/amiga/
zlib-1.2.6/amiga/Makefile.pup
zlib-1.2.6/amiga/Makefile.sas
zlib-1.2.6/as400/
zlib-1.2.6/as400/bndsrc
zlib-1.2.6/as400/compile.clp
zlib-1.2.6/as400/readme.txt
zlib-1.2.6/as400/zlib.inc
zlib-1.2.6/ChangeLog
zlib-1.2.6/CMakeLists.txt
zlib-1.2.6/compress.c
zlib-1.2.6/configure
zlib-1.2.6/contrib/
.......
.......
zlib-1.2.6/win32/README-WIN32.txt
zlib-1.2.6/win32/VisualC.txt
zlib-1.2.6/win32/zlib.def
zlib-1.2.6/win32/zlib1.rc
zlib-1.2.6/zconf.h
zlib-1.2.6/zconf.h.cmakein
zlib-1.2.6/zconf.h.in
zlib-1.2.6/zlib.3
zlib-1.2.6/zlib.3.pdf
zlib-1.2.6/zlib.h
zlib-1.2.6/zlib.map
zlib-1.2.6/zlib.pc.in
zlib-1.2.6/zlib2ansi
zlib-1.2.6/zutil.c
zlib-1.2.6/zutil.h
[root@localhost download]#
[root@localhost download]#
[root@localhost download]#
[root@localhost download]# cd zlib-1.2.6
[root@localhost zlib-1.2.6]# ./configure

Checking for gcc...
Checking for shared library support...
Building shared library libz.so.1.2.6 with gcc.
Checking for off64_t... Yes.
Checking for fseeko... Yes.
Checking for unistd.h... Yes.
Checking for stdarg.h... Yes.
Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
Checking for vsnprintf() in stdio.h... Yes.
Checking for return value of vsnprintf()... Yes.
Checking for attribute(visibility) support... Yes.
[root@localhost zlib-1.2.6]#
[root@localhost zlib-1.2.6]#
[root@localhost zlib-1.2.6]# make
gcc -O3 -D_LARGEFILE64_SOURCE=1 -I. -c -o example.o test/example.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o adler32.o adler32.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o crc32.o crc32.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o deflate.o deflate.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o infback.o infback.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o inffast.o inffast.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o inflate.o inflate.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o inftrees.o inftrees.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o trees.o trees.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o zutil.o zutil.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o compress.o compress.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o uncompr.o uncompr.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o gzclose.o gzclose.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o gzlib.o gzlib.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o gzread.o gzread.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o gzwrite.o gzwrite.c
ar rc libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o
gcc -O3 -D_LARGEFILE64_SOURCE=1 -o example example.o -L. libz.a
gcc -O3 -D_LARGEFILE64_SOURCE=1 -I. -c -o minigzip.o test/minigzip.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -o minigzip minigzip.o -L. libz.a
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/adler32.o adler32.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/crc32.o crc32.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/deflate.o deflate.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/infback.o infback.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/inffast.o inffast.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/inflate.o inflate.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/inftrees.o inftrees.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/trees.o trees.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/zutil.o zutil.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/compress.o compress.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/uncompr.o uncompr.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/gzclose.o gzclose.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/gzlib.o gzlib.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/gzread.o gzread.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/gzwrite.o gzwrite.c
gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -o libz.so.1.2.6 adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo -lc
rm -f libz.so libz.so.1
ln -s libz.so.1.2.6 libz.so
ln -s libz.so.1.2.6 libz.so.1
gcc -O3 -D_LARGEFILE64_SOURCE=1 -o examplesh example.o -L. libz.so.1.2.6
gcc -O3 -D_LARGEFILE64_SOURCE=1 -o minigzipsh minigzip.o -L. libz.so.1.2.6
gcc -O3 -D_LARGEFILE64_SOURCE=1 -I. -D_FILE_OFFSET_BITS=64 -c -o example64.o test/example.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -o example64 example64.o -L. libz.a
gcc -O3 -D_LARGEFILE64_SOURCE=1 -I. -D_FILE_OFFSET_BITS=64 -c -o minigzip64.o test/minigzip.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -o minigzip64 minigzip64.o -L. libz.a
[root@localhost zlib-1.2.6]#
[root@localhost zlib-1.2.6]#
[root@localhost zlib-1.2.6]#
[root@localhost zlib-1.2.6]# make install
cp libz.a /usr/local/lib
chmod 644 /usr/local/lib/libz.a
cp libz.so.1.2.6 /usr/local/lib
chmod 755 /usr/local/lib/libz.so.1.2.6
cp zlib.3 /usr/local/share/man/man3
chmod 644 /usr/local/share/man/man3/zlib.3
cp zlib.pc /usr/local/lib/pkgconfig
chmod 644 /usr/local/lib/pkgconfig/zlib.pc
cp zlib.h zconf.h /usr/local/include
chmod 644 /usr/local/include/zlib.h /usr/local/include/zconf.h
[root@localhost zlib-1.2.6]#

[root@centos server]# rpm -e --nodeps zlib-1.2.3-4.el5

[root@centos lib]# ln -s /usr/lib/libz.
libz.a     libz.so    libz.so.1 
[root@centos lib]# ln -s /usr/local/lib/libz.
libz.a         libz.so        libz.so.1      libz.so.1.2.6 
[root@centos lib]# ln -s /usr/local/lib/libz.so.1.2.6 /lib/libz.so.1

64bits 일 경우 /lib64에 심볼릭 링크를 생성해주어야 한다.

댓글