springboot項目部署linux

1.首先我boot工程用maven方式打成了jar包

2.nohup啓動(這樣啓動,在控制檯crtl+c 則系統不會結束進程,保持後臺運行)

這樣啓動會在同級目錄下生產一個日誌文件,名字默認在nohup.out  也可以自己指定

 

啓動中遇到一個問題:

 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
 

解決:.在數據庫連接的url中添加useSSL=false;

3.如果有新的更新,還使用上面的打包方式啓動則會太繁瑣,希望能增量更新,則需要把jar文件解壓出來

命名:

jar -xf   jar包
將傳上去的解壓,這時候會出現幾個文件夾,保留BOOT-INF文件夾
進入文件夾 有class文件夾跟lib文件夾
替換文件的話 用下面的命令

重新啓動就好了

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章