树莓派配置tomcat

先安装配置好apache
apt-get install apache2
/etc/init.d/apache2 start
(blog passage from http://www.cnblogs.com/xiaobo-Linux/p/8988378.html)
1.下载jdk SE 官网下载 http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

cd /usr/local/src/

wget http://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-linux-arm32-vfp-hflt.tar.gz?AuthParam=1525344648_598b8c191e3c70d14822560d9df2f13d

mv jdk-8u171-linux-arm32-vfp-hflt.tar.gz?AuthParam=1525344648_598b8c191e3c70d14822560d9df2f13d jdk-8u171-linux-arm32-vfp-hflt.tar.gz

mkdir /usr/local/java/

tar xvf jdk-8u171-linux-arm32-vfp-hflt.tar.gz /usr/local/java

下载apache-tomcat 官网 https://tomcat.apache.org/download-70.cgi

cd /usr/local/src/

wget http://mirrors.hust.edu.cn/apache/tomcat/tomcat-7/v7.0.86/bin/apache-tomcat-7.0.86.tar.gz

mkdir /usr/local/tomcat/

tar xvf apache-tomcat-7.0.86.tar.gz /usr/local/tomcat/

3.配置JDK,Tomcat环境变量

export JAVA_HOME=/usr/local/java/jdk1.8.0_171

export CLASSPATH=.:%JAVA_HOME%/lib/dt.jar:%JAVA_HOME%/lib/tools.jar

export PATH=\(PATH:\)JAVA_HOME/bin

export PATH=/usr/local/tomcat/apache-tomcat-7.0.86/bin:$PATH

4.生效 source /etc/profile

5.启动tomcat
startup.sh
关闭shutdown.sh

6.查看8080端口
netstat -lntp

7.测试

192.168.1.177:8080 浏览器即可看到Apache-tomca 主页

posted @ 2018-05-04 00:01  zhaocundang  阅读(1619)  评论(0编辑  收藏  举报