1.Tomcat的安装:
jdk1.8和Tomcat的两种安装方式_碧蓝幻想的博客-CSDN博客
2.将获取到的hexo博客项目部署到webapps目录下
wget https://github.com/qv1234/qv1234.github.io/archive/refs/heads/master.zip
unzip master.zip -d /usr/local/tomcat/webapps/
cd /usr/local/tomcat/webapps/;mv qv1234.github.io-master hexo
3.修改配置文件:
vim /usr/local/tomcat/conf/server.xml
# 修改内容:在Host标签中添加Context标签
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
<Context docBase="hexo" path="" debug="0" reloadable="true" />
</Host>
4.启动服务:已创建tomcat服务脚本
systemctl restart tomcat