a little bit of tech, a little bit of green, to help tame the savage techmachine.
Apache下载地址:http://httpd.apache.org/download.cgi
下载 httpd-2.0.48.tar.gz

PHP下载地址:http://www.php.net/downloads.php
下载 PHP 4.3.4 (tar.gz)

Mysql下载地址:http://www.mysql.com/downloads/mysql-4.0.html
下载 Linux (x86, libc6) Standard 4.0.16

JDK下载地址:http://java.sun.com/j2se/1.4.2/download.html
下载 Linux self-extracting file 的SDK文件

Resin下载地址:http://www.caucho.com/download/index.xtp
下载 resin-3.0.4.tar.gz

现在完成后,将上述文件上传至/usr/local/src/下

//安装Mysql
cd /usr/local/src
tar zxvf mysql-standard-4.0.16-pc-linux-i686.tar.gz
mv mysql-standard-4.0.16-pc-linux-i686 /usr/local/mysql
cd /usr/local/mysql
groupadd mysql
useradd -g mysql mysql
s cripts/mysql_install_db
chown -R root .
chown -R mysql data
chgrp -R mysql .
bin/mysqld_safe --user=mysql &
//Mysql应该可以启动

//安装Apache
cd /usr/local/src
tar zxvf httpd-2.0.48.tar.gz
cd httpd-2.0.48
./configure --with-apache=/usr/local/apache --enable-so
make
make install
//Apache安装完成

//安装PHP
cd /usr/local/src
tar zxvf php-4.3.4.tar.gz
cd php-4.3.4
./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql
make
make install
cp php.ini-dist /usr/local/lib/php.ini
//PHP安装完成

cd /usr/local/apache/conf
修改httpd.conf文件,加入
LoadModule php4_module modules/libphp4.so
AddType application/x-httpd-php .php
保存

cd /usr/local/apache/bin
./apachectl start
启动apache,可以通过浏览器测试一下,还可以做一个phpinfo()的PHP文件,放在/usr/local/apache/htdocs/下,测试PHP是否正确

先停止apache
./apachectl stop
继续安装

//安装JDK
cd /usr/local/src
chmod +x j2sdk-1_4_2_02-linux-i586.bin
./j2sdk-1_4_2_02-linux-i586.bin
看完License,选择“Y”,文件会自解压

mv j2sdk-1_4_2_02-linux-i586 /usr/local/jdk
vi /etc/profile
在最后加入
JAVA_HOME=/usr/local/jdk
CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib
PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOME/bin

export JAVA_HOME CLASSPATH PATH
保存,退出

退出系统后重新进入,用env命令察看环境变量是否生效,主要看看JAVA_HOME、CLASSPATH、PATH

//安装Resin
cd /usr/local/src
tar zxvf resin-3.0.4.tar.gz
mv resin-3.0.4 /usr/local/resin
cd /usr/local/resin
./configure --with-apache=/usr/local/apache
make
make install
//resin安装完成

我们是把Resin和Apache编译在一起,以后就可以在Apache下直接用JSP了。

cd /usr/local/resin/bin
./httpd.sh start 或是 ./start-httpd.sh 就可以启动resin

cd /usr/local/apache/bin
./apachectl start
启动apache
posted on 2004-11-27 15:20  xyublog  阅读(831)  评论(0编辑  收藏  举报