Use grep command to verify whether the tomcat java process is started and running in the background as shown below. So, execute catalina.sh start as shown below to start Apache tomcat on your system. To start Apache tomcat, we’ll use the script called catalina.sh that is located in the bin directory of CATALINA_HOME. $ set | grep CATALINAĬATALINA_HOME=/home/tomcat/apache-tomcat-9.0.0.M21 Log-out and login as tomcat user to verify that this environment variable is set properly. $ vi ~/.bash_profileĮxport CATALINA_HOME=/home/tomcat/apache-tomcat-9.0.0.M21 This will make sure this variable is set every time you login as tomcat user. export CATALINA_HOME=/home/tomcat/apache-tomcat-9.0.0.M21Īpart from setting it on the command line, make sure you add the above line to tomcat’s bash_profile also as shown below. Set this variable to the full directory of the apache tomcat that we extracted earlier as shown below. The home environment variable that is used inside the Apache tomcat script is called as CATALINA_HOME. temp – This is used by the JVM, which will create any required temp files that are specified by java.io.tmpdir.work – This is used as a temp working directory for your web apps.For example, you can deploy birt-viewer on tomcat. Any application deployed under this directory will be automatically loaded by the Apache tomcat. webapps – This is where you’ll deploy your java web application.logs – Contains the log and output files of tomcat (i.e catalina.out, etc.).lib – Contains library files and classes that are required for the tomcat server.The main tomcat server config file is server.xml which is located under this directory. conf – This is the tomcat configuration directory where all the config files are located.bin – This contains all the binary files and shell scripts required to start the tomcat, set the environment variables, etc.2 tomcat tomcat 29 Jun 1 17:25 tempĭrwxr-x. 1 tomcat tomcat 57092 May 4 22:45 LICENSEĭrwx. 1 tomcat tomcat 6709 May 4 22:45 RELEASE-NOTES 1 tomcat tomcat 15946 May 4 22:45 RUNNING.txt 2 tomcat tomcat 6 May 4 22:42 logsĭrwxr-x. 2 tomcat tomcat 6 May 4 22:42 workĭrwxr-x. You’ll see the following files and directories under this apache-tomcat directory. This will create a directory apache-tomcat with the version number in it. In this example, we are downloading this file: apache-tomcat-9.0.0. Install Apache Tomcatįirst, untar the tar.gz file as shown below using tar command tar xvfz apache-tomcat-9.0.0. Under Core, click on “tar.gz” link to download the tar.gz version of the latest tomcat. Next, su to this newly created tomcat user.
0 Comments
Leave a Reply. |