A simple bash script to install 1 - 4 Apache Tomcat 8 instances.
The script searches for the latest version of Tomcat 8 and downloads it. A separate folder is created for each instance and the ports are changed in the server.xml file. There is also the option of automatically configuring Apache Tomcat instances as a service.
- Java must be installed!
- Please remember to open the ports in the firewall to reach the server.
- Go to the folder where you want to install the apache tomcat instances. The script creates subfolders for each instance in this folder.
- Download script with
sudo wget https://raw.githubusercontent.com/roscha444/multiple-instances-tomcat/master/RunInstallation.sh
- Make script executable
sudo chmod +x RunInstallation.sh
- Run script with
sudo ./RunInstallation.sh
Standard ports of the script! You can change ports individually in the upper area of the script with a text editor.
Server 1: HTTP Port...........:8080
Server 1: HTTPS Port..........:8443
Server 1: Shutdown Port.......:8005
Server 1: AJP Connector Port..:8009
Server 2: Change HTTP Connector Port...:8080 to :8081
Server 2: Change HTTPS Connector Port..:8443 to :8444
Server 2: Change Shutdown Port.........:8005 to :8006
Server 2: Change AJP Connector Port....:8009 to :8010
Server 3: Change HTTP Connector Port...:8080 to :8082
Server 3: Change HTTPS Connector Port..:8443 to :8445
Server 3: Change Shutdown Port.........:8005 to :8007
Server 3: Change AJP Connector Port....:8009 to :8011
Server 4: Change HTTP Connector Port...:8080 to :8083
Server 4: Change HTTPS Connector Port..:8443 to :8446
Server 4: Change Shutdown Port.........:8005 to :8008
Server 4: Change AJP Connector Port....:8009 to :8012
service tomcat-1 start / stop / status / restart
service tomcat-2 start / stop / status / restart
service tomcat-3 start / stop / status / restart
service tomcat-4 start / stop / status / restart
- The script creates a separate folder for each apache tomcat instance and changes the ports in the server.xml. After the installation all instances are started.
- The possibility to choose whether the apache tomcat instances should be automatically configured as a service.
- Select apache tomcat version to install
- Start and Stop all instances with one command