在linux上搭建测试环境

1.下载jdk

wget http://download.oracle.com/otn-pub/java/jdk/6u27-b07/jdk-6u27-linux-i586-rpm.bin
http://download.oracle.com/otn/java/jdk/6u45-b06/jdk-6u45-linux-x64-rpm.bin

2.改名

mv jdk-6u27-linux-i586-rpm.bin\?e\=1315743161\&h\=7d71fa129d6e807a4fec5f48dbbabb27 jdk-6u27-linux-i586-rpm.bin

3.suroot后加execute权限,再生成rpm文件

chmod u+x jdk-6u27-linux-i586-rpm.bin

./jdk-6u27-linux-i586-rpm.bin

4.安装rpm并验证

rpm -q jdk-6u27-linux-i586

[root@knet-master-server local]# rpm -q jdk
jdk-1.6.0_27-fcs

[admin@knet-master-server ~]$ java -version
java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) Server VM (build 20.2-b06, mixed mode)

5.下载tomcat

wget http://apache.etoak.com/tomcat/tomcat-6/v6.0.33/bin/apache-tomcat-6.0.33.tar.gz

6.加execute权限并解压缩

chmod u+x apache-tomcat-6.0.33.tar.gz

tar -zxf apache-tomcat-6.0.33.tar.gz

7.打开对外端口

sudo vi /etc/sysconfig/iptables

sudo /sbin/service iptables restart

相关推荐