Apache , php , GD, MySQL Install

無意間逛了 kelly的網站, 其中有提到 Apache , PHP , GD , MySQL 的安裝…. 每次要裝這個都好麻煩~… 缺東缺西的! ha ~ .. 看到她有整理了, 那就借轉貼一下嚕! …

http://qkelly.com/mt/archives/e/

December 27, 2004
Apache + PHP + GD + MySQL
每次要重新 make apache + php + mysql 都很麻煩,因為要找的 source 實在是太多,然後步驟也很煩雜,
雖然之前已經有寫好 script 自重安裝,不過這些程式版本一直更新,檔案還是要重新抓一遍,真是麻煩。把它寫下來,下次省得再找一次。

MySQL:
Homepage: http://www.mysql.com
Installation:
tar zxvf mysql-4.x.gz
groupadd mysql
useradd -g mysql mysql
cd mysql-4.x
./configure –prefix=/usr/local/mysql –with-charset=big5
make ; make install
scripts/mysql_install_db
chown -R root /usr/local/mysql
chown -R mysql /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql
cp support-files/my-medium.cnf /etc/my.cnf
/usr/local/mysql/bin/mysqld_safe –user=mysql &

cd ..

Apache:
Homepage: http://www.apache.org
Installation:
tar zxvf apache-1.3.x.gz
cd apache-1.3.x
./configure –prefix=/usr/local/apache

cd ..

Expat:
Homepage: http://www.libexpat.org/
Installation:
tar zxvf expat-1.95.x.gz
cd expat-1.95.x
./configure
make ; make install

cd ..

libiconv:
Homepage: http://www.gnu.org/software/libiconv/
Installation:
tar zxvf libiconv-1.9.x.gz
cd libiconv-1.9.x
./configure
make ; make install

cd ..

zlib:
Homepage: http://www.gzip.org/zlib/
Installation:
tar zxvf zlib-1.2.x.gz
cd zlib-1.2.x
./configure
make ; make install

cd ..

libpng:
Homepage: http://www.libpng.org/pub/png/
Installation:
tar zxvf libpng-1.2.x
cd libpng-1.2.x
cp scripts/makefile.linux ./
make -f makefile.linux ; make -f makefile.linux install

cd ..

JPEG library:
Homepage: http://www.ijg.org/
Installation:
tar zxvf jpegsrc.x.gz
cd jpegsrc.x
./configure
make ; make install

cd ..

FreeType:
Homepage: http://www.freetype.org/
Installation:
tar zxvf freetype-2.1.x.gz
cd freetype-2.1.x
./configure
make ; make install

cd ..

GD:
Homepage: http://www.boutell.com/gd/
Installation:
tar zxvf gd-2.0.x.gz
cd gd-2.0.x
./configure
make ; make install

cd ..

libxml2:
Homepage: http://xmlsoft.org/
Installation:
tar zxvf libxml2-2.6.x.gz
cd libxml2-2.6.x
./configure
make ; make install

cd ..

PHP:
Homepage: http://www.php.net/
Installation:
tar zxvf php-4.3.x.gz
cd php-4.3.x
./configure –with-apache=../apache-1.3.x –with-mysql –with-gd –enable-sockets –with-expat=/usr/local/lib –with-dom –enable-wddx –with-xmlrpc –with-iconv=/usr/local/lib –with-zlib-dir=/usr/local/lib –with-tiff –with-freetype-dir
make ; make install

cd ..

cd apache-1.3.x
./configure –prefix=/usr/local/apache –activate-module=src/modules/php4/libphp4.a
make ; make install

cd ..

cd php-4.3.x
cp php.ini-dist /usr/local/lib/php.ini

Share your vote!


Do you like this post?
  • Fascinated
  • Happy
  • Sad
  • Angry
  • Bored
  • Afraid

Leave a Reply

Your email address will not be published. Required fields are marked *


Please help to input verification code