使用ssh工具登录树莓派apache
转到须要放置安装包的目录tomcat
运行以下代码(下载tomcat8) 网络
wget -c http://mirrors.hust.edu.cn/apache/tomcat/tomcat-8/v8.5.31/bin/apache-tomcat-8.5.31.zip
将tomcat解压到当前目录ssh
unzip apache-tomcat-8.5.31.zip
sh apache-tomcat-8.5.31/bin/startup.sh
若是出现启动tomcat的Cannot find ./catalina.sh 的问题 工具
这是没有给bin目录下的文件受权可执行权限 解决方法:
执行 spa
chmod +x apache-tomcat-8.5.31/bin/*.sh
而后再次启动.net
启动正常画面日志
netstat -anp|grep 8080
tail -300f apache-tomcat-8.5.31/logs/catalina.out
CTRL+C能够退出查看code
使用同网络下其余设备访问树莓派ip地址blog
http://192.168.1.20:8080/
树莓派默认IP为192.168.1.20
更改默认ip方法http://my.oschina.net/u/3773221/blog/1812521
访问成功画面
sh apache-tomcat-8.5.31/bin/shutdown.sh