一. 腳本install的內容,將本腳本放在/user/local
執行./install apache_1.3.12 PHP-4.0.6 MySQL-3.22.40
tar zxvf $1.tar.gz
tar zxvf $2.tar.gz
tar zxvf $3.tar.gz
mv $1 apache
mv $2 PHP
mv $3 MySQL
cd MySQL
./configure
make
make install
/usr/local/bin/MySQL_install_db
echo "/usr/local/bin/safe_MySQLd & " >> /etc/init.d/rc.local
/usr/local/bin/safe_MySQLd &
cd ../apache
./configure
cd ../PHP
./configure --with-MySQL=/usr/local --with-apache=/usr/local/apache --enable-track-vars
make
make install
cp libs/libphp4.a ../apache/src/modules/php4/libPHP4.a
cd ../apache
./configure --activate-module=src/modules/php4/libPHP4.a
make
make install
cd ../PHP
cp php.ini-dist /usr/local/lib/PHP.ini
二. 由於httpd.conf情況各異,請手工修改該文件中的三行
vi /usr/local/apache/conf/httpd.conf
# AddType application/x-httpd-php .PHP
改為
AddType application/x-httpd-php .php .PHP3 .htm .pHtml .PHP4
# AddType application/x-httpd-php-source .PHPs
去掉開頭的#
DirectoryIndex index.htm
改為
DirectoryIndex index.htm index.Html index.php3 index.php default.PHP
三. 結束