您好,登錄后才能下訂單哦!
rpm -ivh jdk-8u201-linux-x64.rpm
export JAVA_HOME=/usr/java/jdk1.8.0_201-amd64
export CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
export PATH=$JAVA_HOME/bin:$PATH
source /etc/profile
tar zxvf apache-tomcat-9.0.16.tar.gz -C /usr/local/
mv apache-tomcat-9.0.16/ tomcat
ln -s /usr/local/tomcat/bin/startup.sh /usr/bin/
ln -s /usr/local/tomcat/bin/shutdown.sh /usr/bin/
mkdir -p /web/webapp1
vim /web/webapp1/index.jsp
添加以下內容:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<html>
<head>
<title>JSP test1 page</title>
</head>
<body>
<% out.println("Welcome to test site, http://www.test1.com");%>
</body>
</html>
)
vim server.xml
添加以下代碼:
<Context docBase="/web/webapp1" path="" reloadable="false">
</Context>
./shutdown.sh
./startup.sh
upstream tomcat-server {
server 192.168.220.136:8080 weight=1;
server 192.168.220.137:8080 weight=1;
}
proxy_pass http://tomcat-server;
killall -1 nginx
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。