In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
In this issue, the editor will bring you about how Tomcat deploys Bolo dynamic blog. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
Bolo Pineapple blog is a deeply customized dynamic blog based on Solo, with more beautiful skin built in and can be logged in with a local account. The official website documents provide two ways: docker deployment and tocat deployment. Because the performance of the server I bought is limited and it is easy to modify it later, I will not use docker deployment this time and install tomcat to deploy web environment directly.
The image of my server is Alibaba Cloud Linux 3, which is fully compatible with the RHEL/CentOS 8 ecosystem.
Install java jdk
I chose openjdk8:
Dnf install-y java-1.8.0-openjdk-devel
Configure the environment variable in / etc/profile:
JAVA_HOME=$ (find / usr/lib/jvm-name "java-1.8.0-openjdk-1.8.0*") PATH=$PATH:$JAVA_HOME/binCLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jarexport JAVA_HOME CLASSPATH PATH installation Tomcat
Download and install
Bolo requires a JavaEE environment, not the latest Tomcat10, but Tomcat9 or Tomcat8. To speed up the download, choose a domestic source to download the latest version of Tomcat9.
MAJOR_VERSION=9TOMCAT_VER= `curl-- silent http://mirrors.cnnic.cn/apache/tomcat/tomcat-${MAJOR_VERSION}/ | grep v$ {MAJOR_VERSION} | awk'{split ($5 split c, "> v"); split (c [2], d, "/") Print d [1]} '`TOMCAT_VER=$ (echo $TOMCAT_VER | cut-d ""-f 1) echo Tomcat version: $TOMCAT_VERwget-N http://mirrors.cnnic.cn/apache/tomcat/tomcat-${MAJOR_VERSION}/v${TOMCAT_VER}/bin/apache-tomcat-${TOMCAT_VER}.tar.gz
Next, extract and copy the tomcat to the / usr/local/ directory
Tar-zxvf apache-tomcat-$ {TOMCAT_VER} .tar.gzmv apache-tomcat-$ {TOMCAT_VER} / usr/local/tomcat/ setup Service script (Optional)
Refer to the Aliyun documentation to set up the self-startup script.
Run the following command to download the Tomcat self-startup script file.
Wget https://raw.githubusercontent.com/oneinstack/oneinstack/master/init.d/Tomcat-init
Run the following command to move and rename Tomcat-init.
Mv Tomcat-init / etc/init.d/tomcat
Run the following command to add executable permissions to / etc/init.d/tomcat.
Chmod + x / etc/init.d/tomcat
Set up JAVA_HOME and TOMCAT_USER in the script, because my server uses root users directly, so tocat also sets root users
SED_CMD= "s @ ^ export JAVA_HOME=.*@export JAVA_HOME=$ (find / usr/lib/jvm-name 'java-1.8.0-openjdk-1.8.0*') @" sed-I "$SED_CMD" / etc/init.d/tomcatsed-I "/ TOMCAT_USER=/cTOMCAT_USER=root" / etc/init.d/tomcat
Run the following command to set Tomcat to boot automatically.
Chkconfig-add tomcatchkconfig tomcat on
Run the following command to start Tomcat.
Service tomcat start install MySQL
Installation
Dnf install-y mysql-server
Run the following command to start the MySQL service.
Systemctl start mysqld
Run the following command to set the MySQL service to boot automatically.
Systemctl enable mysqld
Run the following command to view the / var/log/mysqld.log file to obtain and record the initial password of the root user.
Grep 'temporary password' / var/log/mysqld.log
Run the following command to configure MySQL for security.
Mysql_secure_installation
Configure MySQL DB and User for blogs
According to the root account password set in the above security configuration, enter mysql-uroot-p in the terminal, and enter the password to log in to MySQL as the root account, then manually build the database, the library name is solo, the character set uses utf8mb4, and the collation utf8mb4_general_ci
Create database solo default character set utf8mb4 collate utf8mb4_general_ci;create user 'solo'@'%' identified by' BrkBpb_78Vkf9';grant all privileges on *. * to 'solo'@'%';flush privileges
Here'% 'allows remote ip addresses to log in to MySQL, which will be used if docker is selected for deployment.
Deploy Bolo blog
Download the compiled code (zip file), github or domestic gitee from the official Github website
Wget https://gitee.com/AdlerED/bolo-solo/attach_files/760605/download/bolo_v2_5_stable.zip
Delete the other contents under the webapp of the tomcat directory, leaving only the blank ROOT
Rm-rf / usr/local/tomcat/webapps/*mkdir-p / usr/local/tomcat/webapps/ROOT
Extract the zip file of Bolo to the directory webapp/ROOT
Unzip bolo_v2_5_stable.zip-d / usr/local/tomcat/webapps/ROOT/
Modify parameters in the WEB-INF/classes directory of Bolo
Cd / usr/local/tomcat/webapps/ROOT/WEB-INF/classes/vim local.properties
Modify the connection parameters of MySQL
RuntimeDatabase=MYSQLjdbc.username=solojdbc.password=BrkBpb_78Vkf9jdbc.driver=com.mysql.cj.jdbc.Driverjdbc.URL=jdbc:mysql://127.0.0.1:3306/solo?useUnicode=yes&characterEncoding=UTF-8&useSSL=false&serverTimezone=UTC
If Tomcat uses HTTPS connection (ignore if not), just change the HTTP in webapps/ROOT/WEB-INF/classes/latke.properties to HTTPS
Start the application
If you set up the tomcat service script earlier, you can
Service tomcat start
If not, use the script in tomcat's bin directory
. / usr/local/tomcat/bin/startup.sh
Then if everything is all right, you can access the blog by accessing port 8080 of the server in your local browser.
Http://${ip}:8080 above is the editor for you to share how to deploy Tomcat Bolo dynamic blog, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.