IDE: IDEA
1、项目maven管理先执行 clean,再执行 compile
![](https://images2015.cnblogs.com/blog/804406/201701/804406-20170109103053650-1771585016.png)
2、如果编译compile不成功,则将 C:\Users\Administrator\.m2\repository\cn\com\bmsoft\smartcity 目录下的所有文件删除,然后执行install
![](https://images2015.cnblogs.com/blog/804406/201701/804406-20170109103055056-844447845.png)
3、web项目打包,注意,在此之前要先修改配置文件
![](https://images2015.cnblogs.com/blog/804406/201701/804406-20170109103056025-366417073.png)
![](https://images2015.cnblogs.com/blog/804406/201701/804406-20170109103056588-1306493932.png)
4、打开Linux连接工具
![](https://images2015.cnblogs.com/blog/804406/201701/804406-20170109103057291-1383277553.jpg)
5、点击连接按钮
![](https://images2015.cnblogs.com/blog/804406/201701/804406-20170109103105275-375377953.png)
6、输入地址,用户名密码:bmsoft
![](https://images2015.cnblogs.com/blog/804406/201701/804406-20170109103108713-1050984220.jpg)
7、打开命令界面
![](https://images2015.cnblogs.com/blog/804406/201701/804406-20170109103111291-1758350572.png)
8、输入对应Linux命令
Last login: Tue Jun 21 11:51:20 2016 from 192.168.25.53
[bmsoft@localhost ~]$ pwd
/home/bmsoft
[bmsoft@localhost ~]$ ls
app database logs
[bmsoft@localhost ~]$ cd /home/bmsoft/app/apache-tomcat-survey/webapps
[bmsoft@localhost webapps]$ cd ..
[bmsoft@localhost apache-tomcat-survey]$ cd bin
[bmsoft@localhost bin]$ sh startup.sh
Using CATALINA_BASE: /home/bmsoft/app/apache-tomcat-survey
Using CATALINA_HOME: /home/bmsoft/app/apache-tomcat-survey
Using CATALINA_TMPDIR: /home/bmsoft/app/apache-tomcat-survey/temp
Using JRE_HOME: /usr
Using CLASSPATH: /home/bmsoft/app/apache-tomcat-survey/bin/bootstrap.jar:/home/bmsoft/app/apache-tomcat-survey/bin/tomcat-juli.jar
Tomcat started.
[bmsoft@localhost bin]$ sh shutdown.sh
Using CATALINA_BASE: /home/bmsoft/app/apache-tomcat-survey
Using CATALINA_HOME: /home/bmsoft/app/apache-tomcat-survey
Using CATALINA_TMPDIR: /home/bmsoft/app/apache-tomcat-survey/temp
Using JRE_HOME: /usr
Using CLASSPATH: /home/bmsoft/app/apache-tomcat-survey/bin/bootstrap.jar:/home/bmsoft/app/apache-tomcat-survey/bin/tomcat-juli.jar
[bmsoft@localhost bin]$ tail -f ../logs/catalina.out
? org.apache.catalina.loader.WebappClas
sLoa: The web application [/survey] created a ThreadLocal with key of type [com.sun.xml.bind.v2.ClassFactory$1] (value [com.sun.xml.bind.v2.ClassFactory$1@4cd01018]) and a value of type [java.util.WeakHashMap] (value [{class cn.com.bmsoft.smartcity.services.privileges.priv.jaxws_asm.GetPrivilegesByUserResponse=java.lang.ref.WeakReference@3b4e83b4, class cn.com.bmsoft.smartcity.services.privileges.priv.Privilege=java.lang.ref.WeakReference@1fa8bcd7, class java.util.ArrayList=java.lang.ref.WeakReference@7f05d77d}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
? org.apache.coyote.AbstractProtocol stop 21, 2016 4:51:57 涓?
淇℃? Stopping ProtocolHandler ["http-bio-8082"]
? org.apache.coyote.AbstractProtocol stop 21, 2016 4:51:57 涓?
淇℃? Stopping ProtocolHandler ["ajp-bio-8029"]
? org.apache.coyote.AbstractProtocol destroy, 2016 4:51:57 涓?
淇℃? Destroying ProtocolHandler ["http-bio-8082"]
? org.apache.coyote.AbstractProtocol destroy, 2016 4:51:57 涓?
淇℃? Destroying ProtocolHandler ["ajp-bio-8029"]
[bmsoft@localhost bin]$ rm -rf ../webapps/survey
[bmsoft@localhost bin]$ rm -rf ../work/Catalina/localhost/survey
[bmsoft@localhost bin]$ pwd
/home/bmsoft/app/apache-tomcat-survey/bin
[bmsoft@localhost bin]$ sh startup.sh
Using CATALINA_BASE: /home/bmsoft/app/apache-tomcat-survey
Using CATALINA_HOME: /home/bmsoft/app/apache-tomcat-survey
Using CATALINA_TMPDIR: /home/bmsoft/app/apache-tomcat-survey/temp
Using JRE_HOME: /usr
Using CLASSPATH: /home/bmsoft/app/apache-tomcat-survey/bin/bootstrap.jar:/home/bmsoft/app/apache-tomcat-survey/bin/tomcat-juli.jar
Tomcat started.
[bmsoft@localhost bin]$ tail -f ../logs/catalina.out
Jun 21, 2016 4:58:36 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/bmsoft/app/apache-tomcat-survey/webapps/examples
Jun 21, 2016 4:58:36 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /home/bmsoft/app/apache-tomcat-survey/webapps/examples has finished in 119 ms
Jun 21, 2016 4:58:36 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8082"]
Jun 21, 2016 4:58:36 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8029"]
Jun 21, 2016 4:58:36 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 28810 ms
pwd 查看当前目录
ls 查看当前文件
。。。。。
ps -aux | grep apache-tomcat-survey 查看所有关键字“apache-tomcat-survey”进程
kill -9 13985
/home/bmsoft/app/apache-tomcat-survey/logs 的catalina.out(系统日志)
ssh下载文件位置:
C:\Users\Administrator\AppData\Roaming\SSH\temp
.代表当前目录下执行sh命令
./bin/startup.sh & tail -f logs/catalina.out
9、发送邮件通知测试组