1 点击进入注册账号https://www.aliyun.com/
一 购买服务器
1 点击进入注册账号https://www.aliyun.com/
2 点击优惠购买,选自己合适的配置
二 安装宝塔
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
具体参考
https://www.bt.cn/bbs/thread-19376-1-1.html
1 配置环境
只安装 nginx 就行, 其他安装根据自己的需求,比如mysql
2 软件商店安装Java部署
三 添加网站
1 添加一个网站项目
java项目管理器打开,如下图
2 映射网站
映射之后的效果
3 映射成功的效果
四 上传java网站代码
1 上传java的war文件
2 解压
解压目标只能选当前的根目录。
3 解压后
4 重载java配置(千万不能忘记)不然就404了
五 问题解决
翻车1 发现一个log报错
RROR in ch.qos.logback.core.rolling.RollingFileAppender[file] - Failed to create parent directories for [/logs/log.log]
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[file] - openFile(logs/log.log,true) call failed. java.io.FileNotFoundException: logs/log.log (No such file or directory)
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[error] - Failed to create parent directories for [/logs/error.log]
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[error] - openFile(logs/error.log,true) call failed. java.io.FileNotFoundException: logs/error.log (No such file or directory)
at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:304)
at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:265)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:228)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:201)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
解决方案,根目录创建logs
翻车2 数据库连接错误
解决方案 配置链接
https://blog.youkuaiyun.com/liutietuo/article/details/103779377
六 测试成功
七 https证书配置链接
https://blog.youkuaiyun.com/liutietuo/article/details/108629912