>> Edit article
이름
제목
패스워드
이거 그대로 함 해보세요... 버전이랑은 관계있는지 모르겠지만... 전 이 버전으로. 성공했습니다. 상위버전은 3번이나 설치했다가. 실패... 그럼... 그냥. 리박스있고, 윈박스있으면, 윈박스로 텔넷접속하고. FTP로 리박스에 파일 전송하고. 윈박스에서 디렉토리랑 똑같이 해서. 복사해서 엔터만 누르면 됩니다. 100%보장... ##A.P.M. gd. freetype 설치하기 ## 486SX 33MHz 16MB RAM 1.08GB / 540MB OS. ALZZA REDHAT 5.2 송창훈님 책에 있는 시디... 참고로 MYSQL 컴파일 하는데 3시간 넘게 걸렸습니다. 설치할 파일의 버전들... [root@laneiges /temp]# ls apache_1.3.9.tar.gz gd1_5.tar.gz php-3.0.12.tar.gz freetype-1.2.tar.gz mysql-3.22.24.tar.gz 질문사항. 이글을 끝까지 읽다보면... 다이나믹 라이브러리 설치에서 에러가 납니다. 무엇이 잘못되었는지요...? [root@laneiges /temp]# tar xvfz apache_1.3.9.tar.gz [root@laneiges /temp]# tar xvfz php-3.0.12.tar.gz [root@laneiges /temp]# tar xvfz mysql-3.22.24.tar.gz ## Apache의 환경설정 ## [root@laneiges /temp]# cd apache_1.3.9/ [root@laneiges apache_1.3.9]# cd src [root@laneiges src]# vi Configuration.tmpl # The EXTRA_DEPS can be used to add extra Makefile dependencies to external # files (for instance third-party libraries) for the httpd target. The effect # is that httpd is relinked when those files are changed. # EXTRA_CFLAGS= EXTRA_LDFLAGS=-rdynamic // 이 부분을 이렇게 추가한다. EXTRA_LIBS= EXTRA_INCLUDES= EXTRA_DEPS= [root@smallcom src]# cd .. [root@smallcom apache_1.3.9]# ./configure [root@smallcom apache_1.3.9]# cd src [root@smallcom src]# touch Configuration [root@smallcom src]# ./Configure ## Apache의 환경설정 끝 ## ## MySQL 설치하기 ## [root@laneiges src]# cd /temp/mysql-3.22.24 [root@laneiges mysql-3.22.24]# ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --with-charset=euc_kr [root@laneiges mysql-3.22.24]# make [root@laneiges mysql-3.22.24]# make install [root@laneiges mysql-3.22.24]# cd /usr/local/mysql [root@laneiges mysql]# ./bin/mysql_install_db [root@laneiges mysql]# ./bin/safe_mysqld --language=korean & [root@laneiges mysql]# ./bin/mysql ## MySQL 설치 종료 ## ## gd 설치 [root@laneiges mysql]# cd /temp [root@laneiges temp]# cp gd1_5.tar.gz /usr/local [root@laneiges temp]# cd /usr/local [root@laneiges local]# tar zxvf gd1_5.tar.gz [root@laneiges local]# cd gd1.5/ [root@laneiges gd1.5]# make [root@laneiges gd1.5]# cp libgd.a /usr/local/lib/ [root@laneiges gd1.5]# mkdir /usr/local/include <- 디렉토리가 존재하지 않음 [root@laneiges gd1.5]# cp *.h /usr/local/include/ [root@laneiges gd1.5]# ## gd 설치 종료 ## freetype 시작 [root@laneiges gd1.5]# cd /temp [root@laneiges temp]# cp freetype-1.2.tar.gz /usr/local [root@laneiges temp]# cd /usr/local [root@laneiges local]# tar xvfz freetype-1.2.tar.gz [root@laneiges local]# cd freetype-1.2 [root@laneiges freetype-1.2]# ./configure [root@laneiges freetype-1.2]# make // 에러발생 걍넘어감... [root@laneiges freetype-1.2]# vi /usr/local/freetype-1.2/test/arch/unix/Makefile.in ftview, fttimer, ftzoom, ftstring를 삭제한다 SRC = $(srcdir)/common.c $(srcdir)/ftdump.c $(srcdir)/fterror.c $(srcdir)/ftlint.c $(srcdir)/ftstrpnm.c $(srcdir)/gmain.c $(srcdir)/$(ARCH)/gwin_x11.c DISPOBJS = common.o gmain.o display.o gwin_x11.o PROGRAMS = ftlint ftdump ftstrpnm fterror [root@laneiges freetype-1.2]# make distclean [root@laneiges freetype-1.2]# ./configure [root@laneiges freetype-1.2]# make [root@laneiges freetype-1.2]# make install [root@laneiges freetype-1.2]# l /usr/local/lib/ total 592 -rw-r--r-- 1 root root 151272 Jun 20 17:30 libgd.a -rwxr-xr-x 1 root root 462 Jul 19 17:44 libttf.la* lrwxrwxrwx 1 root root 15 Jul 19 17:44 libttf.so -> libttf.so.2* lrwxrwxrwx 1 root root 15 Jul 19 17:44 libttf.so.2 -> libttf.so* -rwxr-xr-x 1 root root 294860 Jul 19 17:44 libttf.so.2.1.0* [root@laneiges freetype-1.2]# l /usr/local/include/ total 139 -rw-r--r-- 1 root root 43331 Jul 19 17:44 freetype.h -rw-r--r-- 1 root root 5505 Jul 19 17:44 fterrid.h -rw-r--r-- 1 root root 29283 Jul 19 17:44 ftnameid.h -rw-r--r-- 1 root root 1660 Jul 19 17:44 ftxcmap.h -rw-r--r-- 1 root root 1561 Jul 19 17:44 ftxerr18.h -rw-r--r-- 1 root root 1601 Jul 19 17:44 ftxgasp.h -rw-r--r-- 1 root root 6160 Jul 19 17:44 ftxkern.h -rw-r--r-- 1 root root 2121 Jul 19 17:44 ftxpost.h -rw-r--r-- 1 root root 3497 Jul 19 17:44 ftxwidth.h -rw-r--r-- 1 root root 7893 Jul 19 00:06 gd.h -rw-r--r-- 1 root root 917 Jul 1 11:16 gd_io.h -rw-r--r-- 1 root root 421 Jun 29 10:59 gdfontg.h -rw-r--r-- 1 root root 419 Jun 29 10:59 gdfontl.h -rw-r--r-- 1 root root 382 Jun 29 10:59 gdfontmb.h -rw-r--r-- 1 root root 383 Jun 29 10:59 gdfonts.h -rw-r--r-- 1 root root 415 Jun 29 10:59 gdfontt.h ## PHP의 환경설정 현재 /tmp에 php-3.0.12의 디렉토리를 /usr/local/php이동 시킨후 설치를 한다. 우선 /etc/ld.so.conf 파일에 /usr/local/lib 경로가 없다면 추가시킨다. PHP 소스디렉토리로 이동하면 ./setup 파일이 보이는데 이것이 PHP의 환경설정 프로그램이다. 자 그전에 우리는 PHP에 dl 기능, 즉 calendar.so 라는 dynamic library 를 PHP에서 지원하도록 하고자 한다. 그러기 위해서는 dl 라이브러리 caledar.so 파일을 컴파일해서 얻어내야 한다. 소스디렉토리를 보면 dl 이라는 디렉토리가 있다. 이 디렉토리로 이동하면 역시 ./setup파일이 있는데 이 파일을 실행시키자. [root@laneiges freetype-1.2]# vi /etc/ld.so.conf /usr/local/lib <- 추가 [root@laneiges freetype-1.2]# cd /temp/php-3.0.12 [root@laneiges php-3.0.12]# cd .. [root@laneiges temp]# mv php-3.0.12 /usr/local/php [root@laneiges temp]# cd /usr/local/php [root@laneiges php]# cd dl [root@laneiges dl]# ./setup [root@laneiges dl]# vi Makefile CC = cc -O2 -Dbool=char -DHAS_BOOL -I/usr/local/include -I/usr/local/apache/src/include -I/usr/local/apache/src/os/unix -I. -I.. -fpic LD = cc -shared -L/usr/local/lib -rdynamic [root@laneiges dl]# make calendar.so // 에러 발생 그냥 넘어감... PHP의 컴파일/설치 [root@laneiges dl]# cd .. [root@laneiges php]# ./setup 또는 ./configure --with-apache=/temp/apache_1.3.9 --with-gd=/usr/local --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/apache/conf --with-exec-dir=/usr/local/apache/bin --enable-track-vars=yes [root@laneiges php]# make [root@laneiges php]# make install APACHE 컴파일/설치 [root@laneiges php]# cd /temp/apache_1.3.9 [root@laneiges apache_1.3.9]# ./configure --prefix=/usr/local/apache --activate-module=src/modules/php3/libphp3.a [root@laneiges apache_1.3.9]# make [root@laneiges apache_1.3.9]# make install 헉 성공이다... 히히... dynamic library의 설치 [root@laneiges apache_1.3.9]# cd /usr/local/php/dl/ [root@laneiges dl]# make <-- 에러발생... cc -O2 -Dbool=char -DHAS_BOOL -I/usr/local/include -I/usr/local/apache/src/inclu de/ -I/usr/local/apache/src/os/unix/ -I. -I.. -fpic -DCOMPILE_DL=1 -c -o calend ar/calendar.o calendar/calendar.c In file included from calendar/../phpdl.h:33, from calendar/sdncal.h:69, from calendar/calendar.c:11: ../php.h:219: ap_config_auto.h: 그런 파일이나 디렉토리가 없음 ../php.h:223: ap_config.h: 그런 파일이나 디렉토리가 없음 ../php.h:233: ap_compat.h: 그런 파일이나 디렉토리가 없음 ../php.h:235: httpd.h: 그런 파일이나 디렉토리가 없음 ../php.h:236: http_main.h: 그런 파일이나 디렉토리가 없음 ../php.h:237: http_core.h: 그런 파일이나 디렉토리가 없음 ../php.h:238: http_request.h: 그런 파일이나 디렉토리가 없음 ../php.h:239: http_protocol.h: 그런 파일이나 디렉토리가 없음 ../php.h:240: http_config.h: 그런 파일이나 디렉토리가 없음 ../php.h:241: http_log.h: 그런 파일이나 디렉토리가 없음 make: *** [calendar/calendar.o] Error 1 [root@laneiges dl]# 여기서 에러가 나네요.. 그래도 PHP3는 됩니다. PHP 설치확인 - php3.ini 편집 이제 PHP3의 환경설정파일을 우리가 앞에서 지정했던 /usr/local/apache/conf 디렉토리로 이동한다. PHP3의 환경설정파일명은 php3.ini 이며 설치가 끝난 php3의 소스디렉토리에 보면 php3.ini-dist 라는 파일이 있다. 이 파일을 php3.ini라는 이름으로 /usr/local/etc/httpd/conf 디렉토리로 옮긴다. php3.ini 파일에 대하여 더 해야 할일이 있는데 그것은 dl 모듈을 php에서 쓸수 있도록 지정하고 dl 파일에 대한 기본 루트디렉토리를 설정하는 일이다. php3.ini 파일내에 Dynamic Extensions 라는 항목에 extension=calendar.so 줄을 추가한다. [root@smallcom conf]# vi php3.ini ;;;;;;;;;;;;;;;;;;;;;; ; Dynamic Extensions ; ;;;;;;;;;;;;;;;;;;;;;; ; if you wish to have an extension loaded automaticly, use the ; following syntax: extension=modulename.extension ; for example, on windows, ; extension=msql.dll ; or under UNIX, ; extension=msql.so ; Note that it should be the name of the module only, no directory information ; needs to go here. Specify the location of the extension with the extension_dir directive above. extension=calendar.so 다음으로 이 calendar.so 라는 파일이 어느 디렉토리에 위치하는지 위치정보를 알려주는 일인데 Paths and Directories 항목을 보면 extension_dir이 있는것을 볼 수 있다. 이 디렉토리를 / 로 설정한다. 그렇게되면 php 코드내에서 dl 파일을 로드할 때 dl("usr/local/php/dl/calendar.so"); 와 같이 불러주면 해당라이브러리 함수를 쓸 수 있게 된다. 또한 upload_max_filesize = 20971520 은 파일 업로드시 2M로 한정하였다. 따라서 원하는 용량만큼 지정해서 파일을 업로드 할 수있다. ;;;;;;;;;;;;;;;;;;;;;;;;; ; Paths and Directories ; ;;;;;;;;;;;;;;;;;;;;;;;;; include_path = ; UNIX: "/path1:/path2" Windows: "path1;path2" doc_root = ; the root of the php pages, used only if nonempty user_dir = ; the directory under which php opens the script using /~username, used only if nonempty ;upload_tmp_dir = ; temporary directory for HTTP uploaded files (will use system default if not specified) upload_max_filesize = 20971520 ; 2 Meg default limit on file uploads extension_dir = / ; directory in which the loadable extension s (modules) reside PHP 설치확인 - httpd.conf 편집 웹서버로 하여금 php3라는 확장자를 가진 문서를 php3 파서(parser)가 처리할 수 있도 록 설정하려면 httpd.conf 파일을 편집해서 php3 설정부분의 주석을 삭제해야 한다. # # AddType allows you to tweak mime.types without actually editing it, or to # make certain files to be certain types. # # For example, the PHP3 module (not part of the Apache distribution) # will typically use: # AddType application/x-httpd-php3 .php AddType application/x-httpd-php3 .php3 AddType application/x-httpd-php3 .html AddType application/x-httpd-php3 .htm AddType application/x-httpd-php3-source .phps PHP 설치확인 - phpinfo() 함수확인 PHP가 제대로 설치되었는지 확인하는 가장 좋은 방법은 phpinfo()라는 php 함수를 이용하는 것이다. test.php3 라는 파일을 하나 만들고 phpinfo()를 불러보면 웹페이지 상에서 PHP가 제대로 설치되었는지 자세하게 알 수 있다. test.php3 파일 내용 : #------------ start of code --------# <? phpinfo(); ?> #------------ end of code --------# 아래는 test.php3 파일을 불러온 결과화면이다. PHP_DL 항목이 enable되어있는걸 확인할 수 있다. dl 라이브러리가 제대로 설치되었 다는 얘기다. MySQL부분과 gd 항목도 확인해보기 바란다. 특히 gd 의 경우 Version 1.6 with FreeType support라고 출력된다. 지금 현재 서버에 설치되어 있는 GD버전은 1.6이다. 하지만 여러분이 설명서에 맞게 설치하셨다면 1.8.3이 나와야 할 것이다. 만일 Freetype support라는 얘기가 없이 gd만 출력이 되어 있다면 Freetype의 설치가 제대로 되지 않은것이다. 이로써 Apache와 PHP 그리고 MySQL을 설치하는 방법에 대해 마친다. 혹, 여기에 기술한 내용중 이해가 가지 않거나 궁금한 점은 스몰컴 Q&A을 통하거나 다른 PHP 관련 홈페이지를 통해 해결하기 바란다. : mysql-3.22.32.tar.gz : ./configure --prefix=/usr/local/mysql --with-charset=euc_kr 후 : : make라고 쳤는 데요 컴파일이 다끝나면서 마지막에서 : : 이런 에러가 뜨는 데 어떻게 해야죠!!!! : : : lit.c : gcc -DHAVE_CONFIG_H -I. -I. -I.. -I./../include -I../include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O6 -DDBUG_OFF -D_FILE_OFFSET_BITS=64 -c debug.c : gcc -DHAVE_CONFIG_H -I. -I. -I.. -I./../include -I../include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O6 -DDBUG_OFF -D_FILE_OFFSET_BITS=64 -c main.c : gcc: Internal compiler error: program cc1 got fatal signal 11 : make[2]: *** [main.o] Error 1 : make[2]: Leaving directory `/usr/local/mysql/mysql-3.22.32/regex' : make[1]: *** [all-recursive] Error 1 : make[1]: Leaving directory `/usr/local/mysql/mysql-3.22.32' : make: *** [all-recursive-am] Error 2 : : 그리고 : make install이라고 하면 : : 시스템이 정지해버려요 그럼 재부티을 해야는 데 .... : 왜 저만 이러는 지 T.T : 도와주세요
Copyleft
1999-2026 by
JSBoard Open Project
Theme Designed by
IDOO
All right reserved