Escolar Documentos
Profissional Documentos
Cultura Documentos
Installation Guide
By :
Mohamed Moharam
System Engineer
Directory
/bin
/conf
Contents
Contains the startup and shutdown scripts for both Windows and Linux. Jar files
withclasses required for tomcat to start are also stored here.
Contains the main configuration files for Tomcat. The two most important are
server.xmland the global web.xml.
/lib
Contains the Tomcat Java Archive (jar) files, shared across all Tomcat components.
All
web applications deployed to Tomcat can access the libraries stored here. This
includesthe Servlet API and JSP API libraries.
/logs
/webapps
/work
The directory where all web applications are deployed, and where you place your
WAR
file when it is ready for deployment.
Tomcats working directory where Tomcat places all servlets that are generated from
JSPs. If you want to see exactly how a particular JSP is interpreted, look in this
directory.
Contain temp filesystems storage
/tmp
For 64Bit
# cd /opt/
# wget --no-cookies --no-check-certificate --header "Cookie:
gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=acceptsecurebackup-cookie" "http://download.oracle.com/otnpub/java/jdk/8u66-b17/jdk-8u66-linux-x64.tar.gz"
# tar xzf jdk-8u66-linux-x64.tar.gz
# cd /opt/jdk1.8.0_66/
# alternatives --install /usr/bin/java java /opt/jdk1.8.0_66/bin/java
2
# alternatives --config java
There are 3 programs which provide 'java'.
Selection
Command
----------------------------------------------+ 2
/opt/jdk1.8.0_66/bin/java
At this point JAVA 8 has been successfully installed on your system. We also recommend to
setup javac and jar commands path using alternatives
# export JAVA_HOME=/opt/jdk8
# export JRE_HOME=/opt/jdk8/jre
# export PATH=$PATH:/opt/jdk8/bin:/opt/jdk8/jre/bin
Also put all above environment variables in /etc/environment file for auto loading on system
boot.
# cd /opt
# wget http://www.us.apache.org/dist/tomcat/tomcat8/v8.0.27/bin/apache-tomcat-8.0.27.tar.gz
# tar xzf apache-tomcat-8.0.27.tar.gz
# cd /opt/apache-tomcat-8.0.27
# ./bin/startup.sh
Finally we need to create user accounts to secure and access admin/manager pages.
Editconf/tomcat-users.xml file in your editor and paste inside <tomcat-users> </tomcatusers> tags.
Now you can access the Tomcat Application Server with the username & password to deploy
applications and check server status as you see below .
(1)
(2)
(3)
(4)
Connection Proxy
Since Tomcat typically listens on port 8080, rather than configure Tomcat on
port 80 for normal HTTP requests, we can use Nginx to proxy those
connections and rewrite the URLs
1- Install epel for nginx packages
3- Create new configuration file to to be able to access the server over port 80 instead off
8080 using nginx features as you see and restart the service now you can access it over
port 80 instead of 8080 http://server:80