当前位置:网站首页>Set up a personal blog of jpress

Set up a personal blog of jpress

2022-04-23 06:44:00 Chshyz

Build a personal blog

install tomcat

[root@solo ~]# yum install tomcat tomcat-webapps tomcat-admin-webapps -y
 Loaded plug-in :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
 Resolving dependencies 
[root@jpress ~]# systemctl restart tomcat

 Insert picture description here
install MySQL
Please refer to this article

[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)

  • The key is always wrong , That's so annoying ( Don't do this in the production environment )
[root@jpress ~]# vi /etc/my.cnf
# Add a line 
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

install jpress

  • Command line download
[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
 Resolving host  gitee.com (gitee.com)... 180.97.125.228
 on connection  gitee.com (gitee.com)|180.97.125.228|:443...  Connected .

  • Download what you need war package , Pull down search war package ( Official website

 Insert picture description here

  • All in all ( I think down to the local , It's better to unzip it and upload it to the server )
[root@jpress ~]# ll
 Total usage  89496
-rw-------. 1 root root     1285 4 month   17 11:22 anaconda-ks.cfg
drwxr-xr-x. 6 root root       86 4 month   20 14:50 jpress


Whether decompressed or not , All will jpress Of war The bag moves to /var/lib/tomcat/webapps in

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

Make sure /usr/share/tomcat/webapps There are decompressed jpress Of war package (jpress-v3.3.0)

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

browser :ip+8080 Port access

 Insert picture description here

版权声明
本文为[Chshyz]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230547433172.html