Skip to content

Instantly share code, notes, and snippets.

@theamith
Last active December 17, 2015 20:29
Show Gist options
  • Save theamith/5668122 to your computer and use it in GitHub Desktop.
Save theamith/5668122 to your computer and use it in GitHub Desktop.
Installing tomcat
Apache Tomcat is a web server and a servlet container for Java web applications.
-
1. Download Apache Tomcat from http://tomcat.apache.org/download-70.cgi and save it to Downloads.
2. Extract it.
hduser@Hadoop:~/Downloads$ tar xvzf apache-tomcat-7.0.40.tar.gz
3. Move Extracted tomcat to /usr/local/tomcat directory
hduser@Hadoop:~/Downloads$ sudo mv apache-tomcat-7.0.40.tar.gz /usr/local/tomcat
4. Change ownership of /usr/local/tomcat directory
hduser@Hadoop:/usr/local$ sudo chown -R hduser:hadoop tomcat
5. Open bashrc file in gedit
hduser@Hadoop:/usr/local$ sudo gedit ~/.bashrc
6. Add tomcat path to .bashrc file and save
export CATALINA_HOME=/usr/local/tomcat
7. Start tomcat server
hduser@Hadoop:/usr/local/tomcat$ sudo bin/stratup.sh
8. goto http://localhost:8080/ and check whether tomcat is up.
9. To shutdown the tomcat server use
hduser@Hadoop:/usr/local/tomcat$ sudo bin/shutdown.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment