建议使用EXCEL查看
apache-tomcat-7.0.57.tar tomcat web容器
server-jre-7u76-linux-x64.tar java jdk java执行环境
putty.exe ssh连接工具
pscp.exe ssh 上传下载工具
C:\pscp.exe –r 本地文件路径 用户@目标ip:目标路径
mkdir /usr/local/java/ java环境的文件夹
mkdir /usr/local/java/jdk/ jdk文件夹
mkdir /usr/local/java/tomcat/ tomcat文件夹
mv apache-tomcat-7.0.57.tar.gz/usr/local/java/tomcat/
mv server-jre-7u76-linux-x64.tar.gz/usr/local/java/jdk/
tar zxvf /usr/local/java/tomcat/apache-tomcat-7.0.57.tar.gz (先切换到/usr/local/java/tomcat/ )
tar zxvf /usr/local/java/tomcat/server-jre-7u76-linux-x64.tar.gz (先切换到/usr/local/java/jdk/)
vi /etc/profile
export JAVA_HOME=/usr/local/java/jdk/jdk1.7.0_76
export JAVA_BIN=/usr/local/java/jdk/jdk1.7.0_76/bin
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME JAVA_BIN PATH CLASSPATH
. /etc/profile
切换到/usr/bin文件夹
又一次设置java、javac的引用地址
ln -s -f /usr/local/java/jdk/jdk1.7.0_76/jre/bin/java
ln -s -f /usr/local/java/jdk/jdk1.7.0_76/bin/javac
vi /etc/profile
export TOMCAT_HOME=/usr/local/java/tomcat/apache-tomcat-7.0.57
. /etc/profile
在HOST标签中加入<Context path="" docBase="item" />
Item:是你的项目名
<Connector port="8080"protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"/> 改动port为80
vi /etc/sysconfig/iptables
复制一句:已经开放22port的命令改为8080就好:
-A INPUT -m state--state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
-A INPUT -m state--state NEW -m tcp -p tcp --dport 80 -j ACCEPT
service iptables restart