솔라리스에 apm 설치하기
작성자 관리자 작성시간 2004-04-24 10:43:07
 

제목 : Apache-2.0.43+PHP-4.2.3+MySQL-3.23.52(APM설치하기)
제공 : howtosolaris.com
플랫폼 : O/S : Solaris 8 (SPARC) Kernel version: 108528-16 August 2002


허걱 ~~~ 무척이나 힘들었습니다...어디를 뒤져봐도 자료가 없드만유....
이틀간 고생 했습니다..
아울러 APM(apache+php+mysql) 최신버젼 컴파일 성공에 도움을 주신 인천대학 권순창 교수님께 감사 드립니다.

아래는 APM 컴파일시에 필요한 구성요소 들이며 버젼은 왠만하면 아래와 같은 버젼을 사용하십시요.


//////////// 구성요소 ///////////

Gcc Version : 2.9.35
Autoconf Version : 2.13
Automake Version : 1.4
libtool Version : 1.4.2
perl Version : v5.8.0
Gnutar version : 1.13.19
Gnumake version : 3.80

////////////////////////////////


필요한 소스는 웹에서 다운하시면 되지만 다운로드 주소만 안다면 weget을 사용하면 편하고 빠릅니다.

weget은 http://www.sunfreeware.com 에 있습니다.

여러분 무식하게 다운받아 ftp로 옮기는 솔라리서는 되지 맙시당..^^;

howtosolaris# su - root

howtosolaris# mkdir /sources

howtosolaris# cd /sources

howtosolaris# wget http://mysql.holywar.net/Downloads/MySQL-3.23/mysql-3.23.52.tar.gz

howtosolaris# wget http://www.apache.org/dist/httpd/httpd-2.0.43.tar.gz

howtosolaris# wget "http://www.php.net/do_download.php?mr=http%3A%2F%2Fkr.php.net%2F&df=p
hp-4.2.3.tar.gz"



/////////// MYSQL 컴파일하기 ///////////////////////

howtosolaris# /usr/local/bin/tar xvzf mysql-3.23.52.tar.gz ---> GNUtar 로 푸세여.

howtosolaris# cd mysql-3.23.52

config.cache 라는 파일을 mysql-3.23.52 디렉터리 밑에 새로 만들어
그 파일에 다음과 같이 깔끔하게 한줄 적어 넣습니다.

ac_cv_sys_restartable_syscalls=${ac_cv_sys_restartable_syscalls='no'}


howtosolaris# sh

howtosolaris# CC=gcc CFLAGS="-O6" \
CXX=gcc CXXFLAGS="-O6 -felide-constructors -fno-exceptions -fno-rtti" \
./configure --prefix=/usr/local/mysql --with-low-memory

configure 작업을 마쳤으면 config.h 파일을 살펴 봅니다.

그파일의 라인의 글중에서

#define HAVE_TERM_H 1 이라는 라인과

#define HAVE_CURSES_H 1 이라는 라인에 주석처리가 되어 있는지 살펴 봅니다.


위와 같이 되어있다면 컴파일 합니다.

howtosolaris# make

howtosolaris# make install

howtosolaris# groupadd mysql

howtosolaris# useradd -g mysql mysql

howtosolaris# script/mysql_install_db

howtosolaris# chown -R root /usr/local/mysql

howtosolaris# chown -R mysql /usr/local/mysql/var

howtosolaris# chgrp -R mysql /usr/local/mysql

howtosolaris# chown -R root /usr/local/mysql/bin

howtosolaris# cd /usr/local/mysql

howtosolaris# ./bin/safe_mysqld &


///////////////// APACHE 컴파일 하기 //////////////////////////


howtosolaris# cd /sources/

howtosolaris# /usr/local/bin/tar xvzf httpd-2.0.43.tar.gz

howtosolaris# cd httpd-2.0.43

howtosolaris# ./configure --prefix=/usr/local/apache --enable-shared=max --enable-module=so

hostosolaris# make

hostosolaris# make install

/////////////// PHP 컴파일 하기 ///////////////////////////////

howtosolaris# cd /sources
howtosolaris# /usr/local/bin/tar xvzf php-4.2.3.tar.gz
howtosolaris# cd php-4.2.3
howtosolaris# ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql
howtosolaris# make
howtosolaris# make install
howtosolaris# cp php.ini-dist /usr/local/lib/php.ini

///////////////// httpd.conf 설정 ///////////////////////////////

howtosolaris# cd /usr/local/apache/conf

howtosolaris# vi /usr/local/apache/conf/httpd.conf

#ServerName howtosolaris.com -- 원본
ServerName howtosolaris.com -- 수정

Group #-1 -- 원본
Group nobody -- 수정

DirectoryIndex index.html -- 원본
DirectoryIndex index.phtml index.shtml index.html index.cgi index.pl --수정

#AddHandler cgi-script .cgi -- 원본
AddHandler cgi-script .cgi .pl -- 수정

#AddType text/html .shtml -- 원본
AddType text/html .shtml -- 수정

#AddOutputFilter INCLUDES .shtml -- 원본
AddOutputFilter INCLUDES .shtml -- 수정
AddType application/x-httpd-php .phtml --추가

# echo "<? phpinfo() ?>" >> /usr/local/apache/htdocs/index.phtml

# /usr/local/apache/bin/apachectl start


목록 | 입력 | 수정 | 답변 | 삭제