This requires Tomcat version 9. Instructions for installing tomcat can be found on the Apache project's website.
if SELinux gives you trouble, this should get you where you want.
semanage fcontext -a -t bin_t "${TOMCAT_DIR}/bin(/.*)?" restorecon -vR "${TOMCAT_DIR}/bin"
This software is designed to work with MariaDB or MySQL. It is regularly tested against MariaDB, and MariaDB is regularly tested for drop-in compatibility with MySQL. Installing either database management system is not covered here. Refer to your Operating System distribution's documentation or to the MariaDB project.
This software relies on a schema of the name "blog". To create the schema and install the necessary tables run the following.
CREATE SCHEMA blog; USE SCHEMA blog; SOURCE src/main/sql/setup.sql;
This software requires an account in your database with access to a schema named "blog" for the following permissions.
To create such an account run the following statement, changing username, host to the hostname or IP address of your database server and password to a unique password.
GRANT SELECT, INSERT, UPDATE, DELETE ON blog TO 'username'@'host' IDENTIFIED BY 'password';
Tomcat configuration consists of adding the database driver into your tomcat installation, then installing the blog war, and finally setting the database connections in context.xml
.
To add the database driver, you can use maven download it. The jar needs to be placed in the lib/
directory of tomcat. This can be done as follows, replacing ${tomcat} with your tomcat installation directory:
cd ${tomcat}/lib/ mvn dependency:copy -Dartifact=org.mariadb.jdbc:mariadb-java-client:2.4.2:jar -DoutputDirectory=./
Next either upload blog.war
file to the tomcat manager app, or move it into ${tomcat}/webapps/
.
Lastly, edit the file ${tomcat}/webapps/blog/META-INF/context.xml
so that the database connection information matches your database and the user account you created earlier.
To login for the first time, navigate to the following page, and create a new username/password. This will only work for the first person to make an account.
authorNewLogin.jsp?auth=first