**因学习需要进行部署Zrlog博客系统,个人记录部署过程中发现的问题与解决方法,不记录具体原因分析。**
个人习惯:使用su
切换至root用户进行调试部署。
- 问题一 :
tomcat容器启动失败(状态显示为Exit 1),使用docker logs 容器名
查看启动日志,错误提示为:
Cannot find /usr/local/tomcat/bin/setclasspath.sh This file is needed
to run this program
-
解决方法:
启动时添加–privileged=true 选项,如docker run -di -p 8081:8080 --privileged=true --name=tomcatForTest docker.io/tomcat:9
-
问题二:
添加mysql远程登录账户时使用的命令grant all privileges on *.* to root@'%' identified by '123456';
无法执行成功,错误提示为:
ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near 'identified by ‘123456’</