作者安装了tomcat7.0.55以下的版本,使用JDK1.8报错如下:
type Exception report
message
descriptionThe server encountered an internal error 0 that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 1 in the generated java fileThe type java.io.0bjectInput5tream cannot be resolved, It is indirectly referenced from required ,claas file
Stacktrace:
org.apache.jasper.compiler,DefaultErrorHandler.javacError(DefaultErrorHandler.java:95)org.apache.jasper.compiler,ErrorDispatcher.javacError(ErrorDispatcher.java:330)org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:457)org.apache.jasper.compiler.Compiler.compile(Compiler.java:374)org.apache.jasper.compiler,Compiler.compile(Compiler.java:352)org.apache.jasper.compiler,Compiler.compile(Compiler.java:339)org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:594)org.apache.jasper.servlet,JspServletWrapper.service(JspServletWrapper.java:344)org.apache.jasper.servlet,JspServlet,serviceJspFile(JspServlet.java:391)org.apache.jasper.servlet,JspServlet,service(JspServlet.java:334)javaxgervlethttp,HttpSerylet,service(HttpServletjava:722)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.12 logs.
注:Apache Tomcat 7支持JDK 1.8。Tomcat 7.0.55及更高版本是兼容JDK 1.8的
1、离线安装jdk1.7
官网下载解压和正常的1.8配置一样
2、离线安装tomcat7.0.79
去官网下载上传解压启动
3、离线安装docker
1、获取docker安装文件,官方地址如下(下载到本地上传
):
https://download.docker.com/linux/static/stable/x86_64/docker-19.03.9.tgz
2、将下载的安装文件进行解压,命令如下:
tar zxvf docker-19.03.9.tgz
3、将上述解压后文件(docker文件夹)全部移动至/usr/bin目录下(必须),命令如下:
cp -p docker/* /usr/bin
4、将docker注册为service,步骤如下:
①输入如下命令:
vim /etc/systemd/system/docker.service
或者
vim /usr/lib/systemd/system/docker.service
②点击i,下面出现-----insert----进入编辑状态
复制下面内容至docker.service,复制内容如下:
[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.com
After=network.target docker.socket
[Service]
Type=notify
EnvironmentFile=-/run/flannel/docker
WorkingDirectory=/usr/local/bin
ExecStart=/usr/bin/dockerd
-H tcp://0.0.0.0:4243
-H unix:///var/run/docker.sock
--selinux-enabled=false
--log-opt max-size=1g
ExecReload=/bin/kill -s HUP $MAINPID
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Uncomment TasksMax if your systemd version supports it.
# Only systemd 226 and above support this version.
#TasksMax=infinity
TimeoutStartSec=0
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.targetU1
复制完成之后,点击esc键,并输入:wq!保存并强制退出;
可执行如下命令,查看上述复制内容是否正确
cat /etc/systemd/system/docker.service
创建daemon.json配置文件,用来指定docker创建的镜像所处的目录,以免空间不足
touch /etc/docker/daemon.json
{
"data-root": "/home/dockerData"
}
5、重新加载docker配置文件,命令如下:
systemctl daemon-reload
6、启动docker,命令如下:
systemctl start docker
7、设置docker开机启动,命令如下:
systemctl enable docker
8、查看docker是否安装成功,命令如下:
docker version
4、导入sqlServer2022企业版
docker load -i sqlServer2022企业版镜像
这个是将导出的sql文件复制到docker中导入不然直接导入找不见文件
将备份文件复制到docker下的sqlserver容器中,不然找不到备份
docker cp /path/to/your/database.bak 容器id:/var/opt/mssql/backup/
配置容器自启动
docker run --restart always -d your_image
在已经运行的容器上更新重启策略
docker update --restart always your_container_id
评论区