1. brief introduction
Today's article is mainly for you to explain , How to deploy the test environment , Here Hongge deploys an open source testing Forum , This forum will be used in the following article , And also see the children's shoes in the group to discuss how to develop the test package to you after , How do you deploy your test environment quickly . Here's a simple demonstration , It should be used flexibly in specific projects , Don't stick to the same rules .
2. Installation environment
First installation JForum Before , Prepare the installation environment first Windows10+JDK+Tomcat+MySQL
I'm using JDK1.8+apache-tomcat-9+MySQl_184.108.40.206
3. install JDK
Install well JDK, That goes without saying , Everyone will . Be careful JForum Installed JDK The version of cannot be too low , It can't be too high （ If you encounter this kind of error, please upgrade or reduce JDK Version of ）.
1、 download jdk package , What I made up is 64 position 1.8 edition , Other advanced versions should also work . Choose the corresponding version according to your own system
2、 All the way fool installation , Note that there is no space in the installation path , No Chinese .jdk and jre Don't put it in a folder
3、 Set three environment variables , My computer > choice “ attribute ”->“ senior ”->“ environment variable ”->“ System variables ”->“ newly build ”
（1）JAVA_HOME----D:\software\Java\jdk1.8.0_181” （ Fill in... According to your installation path ）
stay path Add the two above under the path , Not much here
4、 open cmd Verify that the installation was successful , Input java -version, Then input javac
The version number and the following help information can be displayed to indicate that the installation is successful
4. install tomcat
Tomcat 8.5 requirement JDK Version is 1.7 above .
Get into Tomcat Official download address Choose the right version to download , And decompress it to the local .
Add environment variables
CATALINA_HOME , The value is Tomcat Installation path for .
Enter the bin Catalog , function startup.bat file , start-up Tomcat
Linux / Unix
The following example uses 8.5.24 Version as an example , Includes downloads 、 decompression 、 Start operation .
# Download and unzip to local wget http://mirrors.hust.edu.cn/apache/tomcat/tomcat-8/v8.5.24/bin/apache-tomcat-8.5.24.tar.gz tar -zxf apache-tomcat-8.5.24.tar.gz # start-up Tomcat ./apache-tomcat-8.5.24/bin/startup.sh
After starting , visit http://localhost:8080 , You can see Tomcat Successfully installed test page .
5. install MySQL
Detailed installation process and steps can refer to this blog post of Hongge ：https://www.cnblogs.com/du-hong/p/10899327.html .
1、 Get into JForum Download from the official website JForm System , The website is http://jforum.net
2、 Click on “Downloads”, Go to the installation package download page
3、 Copy the downloaded package to tomcat Of webapps Under the table of contents , Rename at the same time jforum-2.1.9 by jforum
3、 open mysql Run window , stay mysql Execute the following statement to create the database ：
CREATE DATABASE JForum DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
4、 modify jforum\WEB-INF\config\database\mysql In the catalog mysql..properties file . take database.connection.host、database.connection.port、database.connection.dbname、database.connection.username、database.connection.password= Add your own database information （ Mine is local mysql）.
5、 After the above steps are completed , double-click bin In the catalog startup.bat Can be tomcat Service startup . And then visit http://localhost:8080/jforum/install.jsp
6、 Fill in the information in the web page , And then click next
7、 If the above environment is set correctly , database jforum It also established , The following page will appear
8、 Click Start installation , If this kind of error occurs , Please update jforum\WEB-INF\config\database\mysql Under the mysql_db_struct.sql File to replace the engine with the corresponding mysql Version of the engine can , If I use ENGINE=InnoDB Replace TYPE=InnoDB.
9、 Finally, keep it , Refresh the web page and re install .Jforum The forum is installed .（ There is no mistake in Hongge's , Go straight to step nine ）
10、 Click on “ Click here to connect to the forum ”, The following picture appears
11、 Click on “Test Forum”, Enter the page , You can click on the “ Publish the theme ”, Post
PS： If you don't see the button to post the topic in the Forum （ Here's the picture , There was a “ Publish the theme “ Button ）, You can do the following
1、 take zh_CN Put the Chinese file package into jforum\templates\default\images Next .（PS:zh_CN According to the online search, I didn't find it for a long time , Finally, download it from the website jforum Download from the official website Download jforum source code , What's inside is \templates\gpl_icons Under the gpl_icon package , Find the Chinese bag zh_CN file ）
2、 Reopen tomcat and jforum Forum , Forum can appear, Chinese can “ Publish the theme ” The button of
Okay , Today, it is mainly to successfully deploy this forum locally , For later use .