其他分享
首页 > 其他分享> > 搭建jpress个人博客

搭建jpress个人博客

作者:互联网

搭建个人博客

安装tomcat

[root@solo ~]#  yum install tomcat tomcat-webapps tomcat-admin-webapps -y
已加载插件:fastestmirror
Determining fastest mirrors
 * base: mirrors.ustc.edu.cn
 * extras: mirrors.163.com
 * updates: mirrors.aliyun.com
base                                                         | 3.6 kB  00:00:00
extras                                                       | 2.9 kB  00:00:00
updates                                                      | 2.9 kB  00:00:00
(1/4): extras/7/x86_64/primary_db                            | 232 kB  00:00:00
(2/4): base/7/x86_64/group_gz                                | 153 kB  00:00:00
(3/4): updates/7/x86_64/primary_db                           | 7.1 MB  00:00:03
(4/4): base/7/x86_64/primary_db                              | 6.1 MB  00:00:09
正在解决依赖关系
[root@jpress ~]# systemctl restart tomcat

在这里插入图片描述
安装MySQL
可参考这篇文章

[root@jpress ~]# mysql -u root -p 5072e1f5
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
[root@jpress ~]# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

[root@jpress ~]# vi /etc/my.cnf
#加一行
skip-grant-tables

[root@jpress mysql]# service mysql restart
Shutting down MySQL.. SUCCESS!
Starting MySQL. SUCCESS!
[root@jpress mysql]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.48 MySQL Community Server (GPL)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> quit
Bye

安装jpress

[root@jpress ~]# wget https://gitee.com/JPressProjects/jpress/raw/master/docker-compose.yml
--2021-04-18 16:59:05--  https://gitee.com/JPressProjects/jpress/raw/master/docker-compose.yml
正在解析主机 gitee.com (gitee.com)... 180.97.125.228
正在连接 gitee.com (gitee.com)|180.97.125.228|:443... 已连接。

在这里插入图片描述

[root@jpress ~]# ll
总用量 89496
-rw-------. 1 root root     1285 4月  17 11:22 anaconda-ks.cfg
drwxr-xr-x. 6 root root       86 4月  20 14:50 jpress


无论解压否,都将jpress的war包移动到/var/lib/tomcat/webapps里

[root@jpress webapps]# ll
总用量 70004
drwxr-xr-x. 8 tomcat tomcat      127 4月  20 13:38 examples
drwxr-xr-x. 5 root   tomcat       87 4月  20 13:38 host-manager
-rw-r--r--. 1 root   root   71677863 4月  20 15:28 jpress-v3.3.0.war
drwxr-xr-x. 5 root   tomcat      103 4月  20 13:38 manager
drwxr-xr-x. 3 tomcat tomcat     4096 4月  20 13:38 ROOT
drwxr-xr-x. 5 tomcat tomcat       86 4月  20 13:38 sample

**确保/usr/share/tomcat/webapps里有解压好的jpress的war包(jpress-v3.3.0)
**

[root@jpress ~]# cd /usr/share/tomcat/
[root@jpress tomcat]# ll
总用量 0
drwxr-xr-x. 2 root root   76 4月  20 13:38 bin
lrwxrwxrwx. 1 root tomcat 11 4月  20 13:38 conf -> /etc/tomcat
lrwxrwxrwx. 1 root tomcat 22 4月  20 13:38 lib -> /usr/share/java/tomcat
lrwxrwxrwx. 1 root tomcat 15 4月  20 13:38 logs -> /var/log/tomcat
lrwxrwxrwx. 1 root tomcat 22 4月  20 13:38 temp -> /var/cache/tomcat/temp
lrwxrwxrwx. 1 root tomcat 23 4月  20 13:38 webapps -> /var/lib/tomcat/webapps
lrwxrwxrwx. 1 root tomcat 22 4月  20 13:38 work -> /var/cache/tomcat/work
[root@jpress tomcat]# cd  webapps
[root@jpress webapps]# ll
总用量 90248
drwxr-xr-x. 8 tomcat tomcat      127 4月  20 13:38 examples
drwxr-xr-x. 5 root   tomcat       87 4月  20 13:38 host-manager
drwxr-xr-x. 6 tomcat tomcat       86 4月  20 15:28 jpress-v3.3.0
-rw-r--r--. 1 root   root   71677863 4月  20 15:28 jpress-v3.3.0.war
-rw-r--r--. 1 root   root   20729792 4月  20 15:33 jpress-web-newest.war
drwxr-xr-x. 5 root   tomcat      103 4月  20 13:38 manager
drwxr-xr-x. 3 tomcat tomcat     4096 4月  20 13:38 ROOT
drwxr-xr-x. 5 tomcat tomcat       86 4月  20 13:38 sample

浏览器:ip+8080端口访问

在这里插入图片描述

标签:00,38,20,tomcat,jpress,博客,root,搭建
来源: https://blog.csdn.net/HelloWorld_4396/article/details/115904180