
展开全部安装Jdk拷贝jdk-6u45-linux-x64-rpm.bin到root目录,到当前目录执行如下命令完成安装:./jdk-6u45-linux-x64-rpm.bin执行完毕,输入:java –version出现如下:java version "1.6.0_45"Java(TM) SE Runtime Environment (build 1.6.0_45-b06)Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)表示安全成功拷贝apache-tomcat-6.0.43.tar.gz到root目录,终端解压:tar –zxvf apache-tomcat-6.0.43.tar.gz 到当前目录,cd apache-tomcat-6.0.43/bin进入该目录, ./startup.sh 启动tomcat服务, cd .. 回到上一个目录, tail -f logs/catalina.out 可以看到控制信息,当看到如下信息表示成功启动。Aug 18, 2015 11:45:17 PM org.apache.catalina.startup.HostConfig deployDirectoryINFO: Deploying web application directory docsAug 18, 2015 11:45:17 PM org.apache.coyote.http11.Http11Protocol startINFO: Starting Coyote HTTP/1.1 on http-8080Aug 18, 2015 11:45:18 PM org.apache.jk.common.ChannelSocket initINFO: JK: ajp13 listening on /0.0.0.0:8009Aug 18, 2015 11:45:18 PM org.apache.jk.server.JkMain startINFO: Jk running ID=0 time=0/25config=nullAug 18, 2015 11:45:18 PM org.apache.catalina.startup.Catalina startINFO: Server startup in 1288 msApache 服务安装配置拷贝httpd-2.2.31.tar.gz到root目录,解压该文件,tar –zxvf httpd-2.2.31.tar.gz到当前目录,cd httpd-2.2.31/进行目录,创建要安装的Apache服务目录mkdir /datac/ApacheServer,检查配置安装环境:./configure--prefix=/datac/ApacheServer./configure --prefix=/datac/ApacheServer --enable-so --enable-mods-shared=most --enable-proxy--enable-proxy-connect --enable-proxy-ftp --enable-proxy-http--enable-proxy-scgi --enable-proxy-ajp --enable-proxy-balancer,环境配置完成后,进行编译源代码,make命令进行编译,make install进行安装。/datac/ApacheServer/bin/apachectl -k start 进行启动,此时访问该机器的IP:http://xxx.xx.xxx.xx,后看到 It Works 说明安装成功。修改配置文件cd /datac/ApacheServer/conf/目录下修改文件httpd.conf# Virtual hostsInclude conf/extra/httpd-vhosts.conf根据目录找到httpd-vhosts.conf,做如下修改## VirtualHost example:# Almost any Apache directive may go into a VirtualHost container.# The first VirtualHost section is used for all requests that do not# match a ServerName or ServerAlias in any <VirtualHost> block.#<VirtualHost *:80>ServerName www.a.comProxyPass / :8001/ProxyPassReverse / :8001/</VirtualHost><VirtualHost *:80>ServerName www.b.comProxyPass / :8002/ProxyPassReverse / :8002/</VirtualHost>分别修改tomcat 端口 启动 即可