# Short-Description: Start/Stop Tomcat server To start Tomcat automatically, every time the server re-boots, save this script in /etc/init.d/tomcat #!/bin/bash Using CLASSPATH: /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar Using CLASSPATH: /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar Stopping Tomcat $sudo /bin/su - tomcat -c /usr/share/tomcat/bin/shutdown.sh Using CATALINA_TMPDIR: /usr/share/tomcat/temp If Tomcat’s default HTTP port (8080) is already in use, you need to edit the server.xml configuration file, e.g.Įdit /usr/share/tomcat/conf/server.xml and replace 8080 with 8000 Starting Tomcat $ sudo /bin/su - tomcat -c /usr/share/tomcat/bin/startup.sh $ sudo chmod x /usr/share/tomcat/bin/*.sh Since we created a tomcat user, he should also own all these files in $ sudo chown -R tomcat:tomcat /usr/share/tomcat/* $ sudo ln -s /usr/share/apache-tomcat-8.5.5 /usr/share/tomcat To make it easy to replace this release with future releases, we are going to create a symbolic link that we are going to use when referring to Tomcat (after removing the old link, you might have from installing a previous version): $ sudo rm -f /usr/share/tomcat Īdding new user 'tomcat' (UID 108) with group 'tomcat'. which should result in something like this: Adding system user 'tomcat' (UID 108). gecos 'Tomcat Java Servlet and JSP engine' \ However, it may be beneficial to have an dedicated user for Tomcat.īTW, Java got installed into this location: /usr/lib/jvm/java-8-oracle sudo adduser \ With Java now installed we move on, installing Tomcat. Java HotSpot(TM) Client VM (build 25.101-b13, mixed mode) Java(TM) SE Runtime Environment (build 1.8.0_101-b13) # apt-key adv -keyserver -recv-keys EEA14886Īs I’m writing this, the newly installed Java Runtime reports its version as 1.8.0_101: java version "1.8.0_101" # echo "deb-src trusty main" > /etc/apt//webupd8team-java.list # echo "deb trusty main" > /etc/apt//webupd8team-java.list Once that is done, an java-installer will actually install the Java SE Runtime Environment. To install Oracle’s Java Runtime with apt-get, we first need to entend the list of apt-get’s sources. Install Oracle JRE 8 on Debian Linux (or Raspbian) So we start with installing a recent version of Oracle’s JRE. Please note that Apache Tomcat 8.0 requires a Java Standard Edition Runtime Environment (JRE) version 7 or later. Apache Tomcat is a Servlet/JSP container and version 8.0 implements the Servlet 3.1 and JavaServer Pages 2.3 specifications.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |