标签:linux
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
tar zxvf /usr/local/java/tomcat/server-jre-7u76-linux-x64.tar.gz
vi /etc/profile
exportJAVA_HOME=/usr/local/java/jdk/jdk1.7.0_76
exportJAVA_BIN=/usr/local/java/jdk/jdk1.7.0_76/bin
export PATH=$PATH:$JAVA_HOME/bin
exportCLASSPATH=.:$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
exportTOMCAT_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
复制一句:已经开放22端口的命令改为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
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:linux
原文地址:http://blog.csdn.net/willie_chen/article/details/46741495