Last active
January 28, 2019 16:59
-
-
Save WillSams/11e7fc0a19bcbc9a2a36 to your computer and use it in GitHub Desktop.
Apache7 Examples/Admin Install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "***************** Apache7 Examples/Admin Install *****************" | |
echo "You may be prompted for root credentials to complete the install." | |
echo "******************************************************************" | |
__ScriptVersion="2015.02.24-Debian" | |
__ScriptName="apache7_extras_install.sh" | |
__ScriptFullName="$0" | |
sudo bash -c "apt-get update && apt upgrade -y" | |
sudo bash -c "apt install tomcat7-examples" #once running -> http://127.0.0.1:8080/examples/ | |
sudo bash -c "apt sudo apt-get install tomcat7-admin" #http://127.0.0.1:8080/manager/html, http://127.0.0.1:8080/host-manager/html | |
echo " | |
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 | |
export CATALINA_HOME=/usr/share/tomcat7 | |
export CATALINA_BASE=/var/lib/tomcat7" >> $HOME/.bashrc | |
source ~/.bashrc #make changes effective | |
sudo bash -c "chown $USER:$USER /var/lib/tomcat7/webapps" | |
ln -s /var/lib/tomcat7/webapps | |
./$CATALINA_HOME/bin/startup.sh #starts Tomcat | |
sudo bash -c "apt autoremove -y && apt clean" | |
echo "$__ScriptFullName ($__ScriptVersion) complete." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment