Docker install on Linux Mint 19 Tara

When installing a Docker on Linux Mint you can experience an error saying that Docker doesn’t have a release file for your distribution.

E: The repository 'https://download.docker.com/linux/ubuntu tara Release' does not have a Release file.

It’s happen because the Docker repository at https://download.docker.com/linux/ubuntu doesn’t know about Linux Mint’s code name tara.

To solve this issue you have to provide Ubuntu code name for which the Docker is providing a repository. And this replacement will work because Linux Mint is built on top of Ubuntu.

So, to add the Docker repository to your Mint’s distribution you have to use:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(. /etc/os-release; echo "$UBUNTU_CODENAME") stable"

In this step, we are simply replacing the Linux Mint codename (returned by lsb_release -cs) with the Ubuntu base codename (returned by . /etc/os-release; echo "$UBUNTU_CODENAME").

Installing and starting the H2 database on Ubuntu/Linux Mint

It is a very simple and straightforward task. Download the H2 zip file (for example Version 1.3.176 (2014-04-05), Last Stable).
Open a terminal window
And then run:

cd
unzip h2*.zip
cd h2/bin
chmod +x h2.sh
./h2.sh

This should start the H2 server tool and open a browser window that lets you connect to a database.

H2 server tool

 

A bit of typing, few clicks and it’s installed and running.

How to install Tomcat Server 7 on Linux Mint 17.3?

Apache Tomcat™ is an open source software implementation of the Java Servlet, JavaServer Pages, Java Expression Language and Java WebSocket technologies. For more details about you can visit apache official site http://tomcat.apache.org/ .

1. Check your JAVA installation

Java is mandatory to run Apache Tomcat, Use the below command to check whether Java is installed on your system or not.

maro@maro-E7440 ~ $ java -version
java version "1.8.0_74"
Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)

If no, Install OpenJDK or Oracle Java before proceeding Tomcat Installation.

2. Downloading Apache Tomcat Archive file.

Use the this Tomcat 7 link to download the latest stable release of Apache Tomcat 7 Archive file or use the following command to download Tomcat 7.0.68 from Apache server.

maro@maro-E7440 ~ $ cd /opt
maro@maro-E7440 /opt $ sudo wget http://www.us.apache.org/dist/tomcat/tomcat-7/v7.0.68/bin/apache-tomcat-7.0.68.tar.gz

After completed download please extract this archive file in /opt directory. Of course you may change this location depending on your setup.

maro@maro-E7440 $ sudo tar xzf apache-tomcat-7.0.68.tar.gz
maro@maro-E7440 $ sudo mv apache-tomcat-7.0.68 tomcat7

3. Setup Environment Variable.

Before starting Tomcat, Configure environment variables by adding entry in ~/.bashrc file, So that system environment can set on system boot up with the following command.

maro@maro-E7440 $ echo "export CATALINA_HOME=\"/opt/tomcat7\"" >> ~/.bashrc
maro@maro-E7440 $ source ~/.bashrc

4. Start Tomcat.

maro@maro-E7440 /opt $ cd tomcat7/bin
maro@maro-E7440 /opt/tomcat7/bin $ ./startup.sh
Using CATALINA_BASE:   /opt/tomcat7
Using CATALINA_HOME:   /opt/tomcat7
Using CATALINA_TMPDIR: /opt/tomcat7/temp
Using JRE_HOME:        /usr/lib/jvm/java-8-oracle
Using CLASSPATH:       /opt/tomcat7/bin/bootstrap.jar:/opt/tomcat7/bin/tomcat-juli.jar
Tomcat started.

5. Access Apache Tomcat.>

Open your web browser and navigate to http://localhost:8080 or http://your-server-ip-address:8080 or http://127.0.0.1:8080 By default tomcat serving port number 8080 (make sure no other app is running using this port).

6. Setup User Accounts.

If you want to access Server Status, Manager App & Host Manager in tomcat, you need to add manager-gui and admin-gui rols under conf/tomcat-users.xml file.

  • manager-gui : Control Server Status & Manager App
  • admin-gui : Control Host Manager

You can access those things by adding the UserName and password to manager-gui and admin-gui rols (Use your username & password instead of us). Stop tomcat service and add user and roles to your conf/tomcat-users.xml file under tomcat-users then save + exit and start tomcat that’s it.

# user manager can access only manager section.
<role rolename="manager-gui" />
<user username="manager" password="SOME-SECRET-PASSWORD" roles="manager-gui" />

# user admin can access manager and admin section both.
<role rolename="admin-gui" />
<user username="admin" password="SOME-SECRET-PASSWORD_" roles="manager-gui,admin-gui" />

7. Create Tomcat7 Init Script

Create a init file /etc/init.d/tomcat7 using following content. Below you will find my init file for the user maro:

#! /bin/sh
### BEGIN INIT INFO
# Provides: tomcat
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Tomcat
# Description: This file starts and stops Tomcat server
# 
### END INIT INFO

TOMCAT_DIR=/opt/tomcat7/

case "$1" in
 start)
   su maro -c $TOMCAT_DIR/bin/startup.sh
   ;;
 stop)
   su maro -c $TOMCAT_DIR/bin/shutdown.sh
   sleep 10
   ;;
 restart)
   su maro -c $TOMCAT_DIR/bin/shutdown.sh
   sleep 20
   su maro -c $TOMCAT_DIR/bin/startup.sh
   ;;
 *)
   echo "Usage: tomcat {start|stop|restart}" >&2
   exit 3
   ;;
esac

Now execute following commands to set proper permissions and symbolic links for init script.

maro@maro-E7440 $ sudo chmod 755 /etc/init.d/tomcat7
maro@maro-E7440 $ sudo update-rc.d tomcat7 defaults

And it’s DONE!