Mac에서 Web서버 도전기 (2)

본 주인장은 그냥 XAMPP를 사용했답니다.
요녀석대로 따라가다가.. 중간에 configuration안돼서리..;;
uninstall하고.. ㅋ
-근데.. 그 이후로.. MS Office 2004 for Mac이 실행안된다는.. ㅠ.ㅜ


출처: phpschool

source 설치시 uninstall 방법
make clean
make distclean
이렇게 제거 가능 출처: 블루사랑

##curl 설치(Linux wget)
tar zxvf curl-7.14.0.tar.gz
cd curl-7.14.0
./configure --prefix=/usr
make
make install
cd ..


##expat 설치
curl -O http://nchc.dl.sourceforge.net/sourceforge/expat/expat-2.0.1.tar.gz
tar zxvf expat-2.0.1.tar.gz
cd expat-2.0.1
./configure --prefix=/usr -mandir=/usr/share/man
make
make install
cd ..


##zlib 설치
curl -O http://www.zlib.net/zlib-1.2.3.tar.gz
tar zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure --prefix=/usr --shared
make
make install
cd ..



##libpng설치
curl -O ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.24.tar.gz
tar zxvf libpng-1.0.27.tar.gz
cd libpng-1.0.27
cp scripts/makefile.darwin Makefile
vi Makefile
=> 변경내용 시작
# Where the zlib library and include files are located
ZLIBLIB=/usr/local/lib
ZLIBINC=/usr/local/include
#ZLIBLIB=../zlib
#ZLIBINC=../zlib
=>변경내용 완료

./configure
make
make install


##libjpeg 설치
curl -O ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
ln -s `which glibtool` ./libtool
export MACOSX_DEPLOYMENT_TARGET=10.4
./configure --prefix=/usr --enable-shared
make
make install



##freetype설치
curl -O http://download.savannah.gnu.org/releases/freetype/freetype-2.3.5.tar.gz
tar zxvf freetype-2.3.5.tar.gz
cd freetype-2.3.5
vi include/freetype/config/ftoption.h
#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER => 주석 삭제

./configure
make
make install



##gd설치
curl -O http://www.libgd.org/releases/gd-2.0.35.tar.gz
tar zxvf gd-2.0.35.tar.gz
cd gd-2.0.35
./configure
make
make install
./gdtest test/gdtest.png
./gdtestft /Library/Fonts/Zapfino.dfont
open test/*.jpg
cd ..



##fastCGI설치
curl -O http://www.fastcgi.com/dist/fcgi-2.4.0.tar.gz
tar zxvf fcgi-2.4.0.tar.gz
cd fcgi-2.4.0
./configure --prefix=/usr/local
make && make install
cd ..



##pcre설치
curl -O ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.3.tar.gz
tar zxvf pcre-7.3.tar.gz
cd pcre-7.3
./configure --prefix=/usr/local
make && make install
cd ..



##lighttpd 설치
curl -O http://www.lighttpd.net/download/lighttpd-1.4.17.tar.gz
tar zxvf lighttpd-1.4.17.tar.gz
cd lighttpd-1.4.17
./configure --prefix=/usr/local --with-pcre=/usr/local
make && make install
cd ..



##mysql설치
tar zxvf mysql-5.0.45.tar.gz
unlink /usr/local/mysql
./configure --prefix=/usr/local/mysql
--with-unix-socket-path=/usr/local/mysql/run/mysql_socket
--with-mysqld-user=mysql --with-comment --localstatedir=/Volumes/extends/MYSQL/data
--with-charset=euckr
--with-extra-charsets=all
make
make install
chown -R mysql.mysql /usr/local/mysql/
chown -R mysql.mysql /Volumes/extends/MYSQL
mysql_install_db
ls -al /Volumes/extends/MYSQL/data/


*** mysql auto start 등록
cp -rf /usr/local/src/mysql-5.0.45/support-files/MacOSX/MySQLCOM /Library/StartupItems/MySQLCOM/
cp -rf /usr/local/src/mysql-5.0.45/support-files/MacOSX/StartupParameters.plist /Library/StartupItems/MySQLCOM/
cp -rf /usr/local/src/mysql-5.0.45/support-files /usr/local/mysql/
chown -R mysql.mysql /usr/local/mysql/
chmod +x /usr/local/mysql/support-files/mysql.server
/Library/StartupItems/MySQLCOM/MySQLCOM start ==> start/stop 확인
** mysql auto start 등록 확인(다른설정 부분 임의로 수정하지 마시오!!
vi /etc/hostconfig => MYSQLCOM=-YES-



##apache 설치
curl -O http://ftp.kaist.ac.kr/pub/Apache/httpd/httpd-2.2.4.tar.gz
tar zxvf httpd-2.2.4.tar.gz
cd httpd-2.2.4
./configure --prefix=/usr/local/apache2 --enable-rewrite--enable-proxy --enable-proxy-balancer --enable-proxy-http--enable-mods-shared=all
make
make install



##php 설치
tar zxvf php-5.2.4.tar.gz
cd php-5.2.4
./configure --prefix=/usr --mandir=/usr/share/man--infodir=/usr/share/info --sysconfdir=/etc --enable-cgi --enable-cli--enable-dbx --enable-exif --enable-ftp --enable-mbstring--enable-sockets --enable-wddx --enable-xslt --enable-yp--with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/etc--with-curl --with-expat --with-freetype --with-gd --with-iodbc--with-jpeg --with-kerberos --with-mysql=/usr/local/mysql--with-mysqli=/usr/local/mysql/bin/mysql_config --with-png --with-xml--with-xmlrpc --with-zlib --enable-sysvshm=yes --enable-sysvsem=yes--enable-debug=no --enable-track-vars=yes --enable-bcmath--enable-mbstr-enc-trans --enable-mbregex --with-socket --enable-pcntl--with-iconv --with-ttf --enable-gd-native-ttf --enable-gd-imgstrttf--enable-memory-limit --enable-calendar
make
make install
php -v

** apache auto start
## OSX에 기본적으로 apache 1.3이 인스톨 되어 있다. 그러나 지우기가 여간 까다로운게 아니다. 그러므로
## MYSQLCOM을 이용하여 새로운 서비스를 만들고 이를 auto start로 등록하자(HTTPCOM으로 함)^^
** HTTPCOM 생성
mkdir /Library/StartupItems/HTTPCOM
vi HTTPCOM
if [ -z $1 ] ; then
        echo "Usage: $0 [start|stop|restart] "
        exit 1
fi
# Source the common setup functions for startup scripts
test -r /etc/rc.common || exit 1
. /etc/rc.common

SCRIPT="/usr/local/apache/bin/apachectl"

StartService ()
{
        if [ "${HTTPCOM:=-NO-}" = "-YES-" ] ; then
                ConsoleMessage "Starting HTTPD"
                $SCRIPT start > /dev/null 2>&1
        fi
}

StopService ()
{
        ConsoleMessage "Stopping HTTPD"
        $SCRIPT stop > /dev/null 2>&1
}
RestartService ()
{
        ConsoleMessage "Restarting HTTPD"
        $SCRIPT restart > /dev/null 2>&1
}

if test -x $SCRIPT ; then
        RunService "$1"
else
        ConsoleMessage "Could not find HTTPD!"
fi
==> 내용 끝
chmod +x HTTPCOM

vi StartupParameters.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Description</key>
        <string>http-2.2.4</string>
        <key>OrderPreference</key>
        <string>None</string>
        <key>Provides</key>
        <array>
                <string>Apache</string>
        </array>
        <key>Uses</key>
        <array>
                <string>Network</string>
                <string>Resolver</string>
        </array>
        </dict>
</plist>
==> 내용 끝
## HTTPCOM등록
vi /etc/hostconfig
HTTPCOM=-YES- 끝에 추가
주의) WEBSERVER=-NO- 로 되어 있어야 한다. 안그럼 포트충돌 납니다 ㅎㅎㅎ

크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by gwlee

2008/08/25 02:15 2008/08/25 02:15
Response
0 Trackbacks , 0 Comments
RSS :
http://thegreatgoodplace.com/tt/study/rss/response/31

Trackback URL : http://thegreatgoodplace.com/tt/study/trackback/31

Leave a comment
« Previous : 1 : ... 23 : 24 : 25 : 26 : 27 : 28 : 29 : 30 : 31 : ... 55 : Next »