实验四 命令参考

yum -y install gcc、pcre-devel、zlib-devel

tar zxvf jdk-7u65-linux-x64.gz 
mv jdk1.7.0_65/ /usr/local/java

vim /etc/profile.d/java.sh
	export JAVA_HOME=/usr/local/java
	export PATH=$PATH:$JAVA_HOME:/bin
sh /etc/profile.d/java.sh

/usr/local/tomcat/bin/startup.sh

	mkdir -pv /web/www
		vim /web/www/index.jsp
			<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
			<html>
				<head>
					<title>JSP test aaa</title>
				</head
				<body>
					<% out.println("welcome to test site");%>
				</body>
			</html>
			
vim /usr/local/tomcat/conf/server.xml（找到Host开头的区域）
	<Context docBase="/web/www" path="" reloadable="false">
	</Context>
	
	useradd -M -s /sbin/nologin  www
	
	./configure --prefix=/usr/local/nginx --user=www --group=www  --with-file-aio --with-http_stub_status_module --with-http_gzip_static_module --with-http_flv_module	--with-http_ssl_module && make && make install
	
	upstream tomcat_server{
			server tomcat-1IP:8080 weight=1;
			server tomcat-2IP:8080 weight=1;
		}
	
	proxy_pass http://tomcat_server;
完成！
多简单！！！
一点难度没有！！！



浏览器自带的翻译

tomcat = 雄猫