Skip to content

Instantly share code, notes, and snippets.

@rahogata
Last active July 15, 2017 15:31
Show Gist options
  • Save rahogata/f8cc7f4e7e84a8ccf96f7a99794fc3ce to your computer and use it in GitHub Desktop.
Save rahogata/f8cc7f4e7e84a8ccf96f7a99794fc3ce to your computer and use it in GitHub Desktop.
Install old tomcat7 package in newer ubuntu release 16.04
#!/bin/sh
# Name: tomcat7installer
# Description: This script will install tomcat7 of ubuntu 14 release in 16.04.
# Tomcat ship with or installed in ubuntu 16.04 is incompatible with Java 7,
# so installing old tomcat version will solve this issue that is achievable through this script.
# remove tomcat if already installed.
echo "Removing existing tomcat7..."
sudo service tomcat7 stop >/dev/null 2>&1
sudo apt-get --purge remove tomcat7 >/dev/null 2>&1
sudo apt-get autoremove >/dev/null 2>&1 # Remove any dependency libraries that produce adverse effect with old tomcat7
sudo add-apt-repository "deb http://in.archive.ubuntu.com/ubuntu/ trusty-updates main restricted"
sudo apt-get update >/dev/null 2>&1
echo "Installing tomcat7..."
sudo apt-get install -y -t trusty-updates tomcat7 >/dev/null 2>&1
echo "tomcat7 installed successfully."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment