使用的軟體版本
apr-1.1.0.tar.gz
apr-util-1.0.1.tar.gz
httpd-2.0.53.tar.gz
jakarta-tomcat-5.5.7.tar.gz
jakarta-tomcat-connectors-jk2-2.0.4-src.tar.gz
jakarta-tomcat-connectors-jk2-src-current.tar.gz
jdk-1_5_0_01-linux-i586.bin
libtool-1.5.8.tar.gz
mysql-4.0.20.tar.gz
mysql-connector-java-3.1.6.tar.gz
php-4.3.8.tar.tar
安裝j2sdk
tar -zxvf j2sdk
cp -r j2sdk /usr/local/
安裝apache
tar -zxvf apache2
./configure --prefix=/usr/local/apache --enable-shared=max --enable-module=rewrite --enable-module=so
安裝mysql
./configure --prefix=/usr/local/mysql --exec-prefix=/usr/lcoal/mysql --with-extra-charsets=gb2312
./mysql_install_db
./mysqld_safe --user=root &
安裝php
./configure --with-apxs2=/usr/local/apache2/bin/apxs --disable-debug --enable-ftp --enable-inline-optimization --enable-bcmath --enable-safe-mode --enable-track-vars --enable-trans-sid --enable-xml --with-mysql --with-xml -with-freetype-dir=/usr --with-png-dir=/usr --with-gd --enable-gd-native-ttf --with-ttf --with-jpeg-dir=/usr --with-png --with-zlib-dir=/usr --enable-mbstring=cn
cp php-4.3.8/php.ini-dist /usr/local/lib/php/php.ini
vi httpd.conf
LoadModule php4_module modules/libphp4.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
安裝tomcat
tar -zxvf tomcat
cp -r tomcat /usr/local/
env(環境變數設定)
vi /etc/bashrc
JAVA_HOME=/usr/local/j2sdk*
export JAVA_HOME
CLASSPATH=/usr/local/j2sdk1.5/lib:/usr/local/j2sdk1.5/lib/dt.jar:/usr/local/j2sdk1.5/lib/tools.jar:/usr/local/j2sdk1.5/jre/lib:/usr/local/j2sdk1.5/lib/mysql_comp.jar
export CLASSPATH
PATH=$PATH:/usr/local/j2sdk1.4/bin:/usr/local/j2sdk1.4/bin
TOMCAT_HOME=/usr/local/tomcat
export TOMCAT_HOME
mysql_jdbc
tar zxvf mysqljdbc
cd mysqljdbc
cp mysql*bin.jar /usr/local/tomcat/common/lib/
tomcat + apache2=mod_jk
tar zxvf tomcat-connectors-jk
cd tomcat-connector-jk/jk/native2
./bulidconf.sh
./configure --with-apxs2=/server/bin/apxs --with-java-home=/usr/local/j2sdk
if error
need to check for Perl first, apxs depends on it...
checking for perl... /usr/bin/perl
configure: error: can't locate libapr
tar zxvf apr-1.1.0.tar.gz
cd apr-1.1.0
./configure
make
make install
tar zxvf apr-util-1.0.1.tar.gz
cd apr-util-1.0.0
./configure --with-apr=../apr-1.1.0
make
make install
cd /usr/local/apache2/lib/
ln -s /usr/local/apr/lib/libapr-1.so.0.0.0 libapr-1.so
ln -s /usr/local/apr/lib/libapr-1.so.0.0.0 libapr-1.so.0
ln -s /usr/local/apr/lib/libaprutil-1.so.0.0.0 libaprutil-1.so
ln -s /usr/local/apr/lib/libaprutil-1.so.0.0.0 libaprutil-1.so.0
else
make jk2-build-apxs
if error
tar zxvf libtool-1.5.6.tar.gz
cd libtool-1.5.6
make
make install
ln -s /usr/local/bin/libtool /usr/local/apache2/build/libtool
cd server/apache2
make -f Makefile.apxs install
cd /usr/local/apache2/conf
vi workers2.properties
vi httpd.conf
LoadModule jk2_module modules/mod_jk2.so