Install Tomcat 9 on CentOS 8

This post will cover installing Tomcat 9 on CentOS 8.

We’ll be using a bash script below, which is commented so you can see the steps.

We’ll install the latest stable release of Tomcat 9.x from, as well as OpenJDK 8.

We’ll also update the tomcat-users.xml file to enable manager-gui and admin-gui roles and set their passwords to a random string.

Finally, we’ll create a service file and enable Tomcat to run as a systemd service.


As root, save the above script as and make it executable.

Run the script:

Upon completion, the GUI and Manager passwords will be displayed as below:

The random passwords will also be saved as auth.txt in the root directory.

You should now be able to access Tomcat at: or http://IP:8080

Install PostGIS 3.x on CentOS 8

This post will cover install PostGIS 3.x on CentOS 8.

If you do not already have PostgreSQL 12 installed, do so here

PostGIS 3.x requires additional packages not available in the PostgreSQL repository.

Install the Epel repository for these dependencies:

With Epel installed, we can now use Yum to install the PostGIS 3.x packages from the PostgreSQL Repository:

Once completed, su to postgres and connect to the target database where you wish to enable PostGIS.

Below, we are using database ‘demo’:

Install the PostGIS extension using CREATE EXTENSION:

Check the PostGIS version installed:

Lets test out our extension using a basic example from

Create a table with a GEOGRAPHY column:

Insert some data:

Select the name column values:

And run a Spatial Query:

Learn more at