[JAVA] I want to bring Tomcat to the server and start the application

I want to deploy a war file developed in Java on my own server and start the application Let's prepare the environment

Installation procedure

1. Check the OS


$ uname -m
$ cat /etc/centos-release
CentOS Linux release 7.1.1503 (Core)
  1. wget


$ su - root
$ sum install wget
  1. JDK1.8 (Java8)


$ wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-x64.rpm
$ ll
170080 in total
-rw-r--r--.1 root root 174157387 December 21 04:10 jdk-8u161-linux-x64.rpm
$ sudo yum localinstall jdk-8u161-linux-x64.rpm

URLs starting with http: // ... are on the Java SE Development Kit 8 Downloads page. URL of each file Check the "Accept License Agreement" radio button on the above page You can get the URL by right-clicking the file you want to download and selecting "Copy link address".


$ java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

If it is yum, it will be OpenJDK

I don't do yum this time because I want to include Oracle The story of installing jdk-1.8.0 on CentOS 6

  1. Tomcat Apache Tomcat This time, Tomcat 8.5 is installed. Is it common to download Core?


$ useradd -s /sbin/nologin tomcat   #Add tomcat user
$ wget http://ftp.jaist.ac.jp/pub/apache/tomcat/tomcat-8/v8.5.29/bin/apache-tomcat-8.5.29.tar.gz
$ tar -xvzf apache-tomcat-8.5.29.tar.gz
$ ll
drwxr-xr-x.9 root root 4096 March 22 22:24 apache-tomcat-8.5.29
-rw-r--r--.1 root root 9532698 March 5 22:50 apache-tomcat-8.5.29.tar.gz
$ mv apache-tomcat-8.5.29 /usr/local/tomcat

After this, it is necessary to set and deploy the port, but this time it is up to here

: pray: Reference

Thanks to our ancestors

OS check

I can't ask you again now! How to check Linux OS and version Check whether Linux is 32-bit version or 64-bit version

What is wget?

Do this with wget !! Comparison of curl and Wget | POSTD Difference between wget and curl-Usmysa development memo


Install Oracle's JDK8 on CentOS 6.x [CentOS7] Install Oracle Java 8 How to wget jdk on Linux


When updating the latest version of JDK and Tomcat installed on CentOS with yum Install Tomcat on CentOS How to build Tomcat8 on CentOS7 Procedure to install Apache Tomcat 8 on CentOS 7

Difference in yum rpm

[Even beginners can understand] Differences between rpm and yum and how to use them properly

Recommended Posts

I want to bring Tomcat to the server and start the application
I want to control the start / stop of servers and databases with Alexa
I wanted to start the AP server and debug with just the Maven command
I want to call a method and count the number
I want to give edit and delete permissions only to the poster
I want to return to the previous screen with kotlin and java!
I want to develop a web application!
[Active Admin] I want to customize the default create and update processing
[Ruby] I want to extract only the value of the hash and only the key
Deploy the WEB application by Spring Boot to Tomcat server as WAR
I want to pass the argument of Annotation and the argument of the calling method to aspect
What to do if the server tomcat dies
When the server fails to start in Eclipse
I want to var_dump the contents of the intent
I tried to set tomcat to run the Servlet.
I want to truncate after the decimal point
I want to get the value in Ruby
I want to recursively get the superclass and interface of a certain class
[Java] I want to calculate the difference from the date
I want to embed any TraceId in the log
I want to judge the range using the monthly degree
I want to know the answer of the rock-paper-scissors app
I want to display the name of the poster of the comment
I want to dark mode with the SWT app
I want to transition screens with kotlin and java!
How to start tomcat local server without using eclipse
I want to call the main method using reflection
[Rough commentary] I want to marry the pluck method
I want to be aware of the contents of variables!
I want to return the scroll position of UITableView!
I want to simplify the log output on Android
I want to add a delete function to the comment function
I want to morphologically analyze the log in the DB and put it in the DB to classify messages 1
[Beginner] I want to modify the migration file-How to use rollback-
I want to set the conditions to be displayed in collection_check_boxes
In Java, I want to trim multiple specified characters from only the beginning and end.
I tried to summarize the basics of kotlin and java
I want to use screen sharing on the login screen on Ubuntu 18
I want to convert characters ...
(ยด-`) .. oO (I want to easily find the standard output "Hello".
I want to expand the clickable part of the link_to method
I want to change the log output settings of UtilLoggingJdbcLogger
I want to make a list with kotlin and java!
I want to make a function with kotlin and java!
[jackson] I want to receive JSON values "0" and "1" as boolean
Application file deployment location on the local host Tomcat server
I want to use the Java 8 DateTime API slowly (now)
I want to create a form to select the [Rails] category
I want to use the sanitize method other than View.
I want to get a list of the contents of a zip file and its uncompressed size
I want to put the JDK on my Mac PC
I want to give a class name to the select attribute
I want to set the video playback time (HH: MM: SS) to seconds, and vice versa.
I want to recursively search the class list under the package
I want to distinct the duplicated data with has_many through
How to run React and Rails on the same server
I want to transition to the same screen in the saved state
I want to implement various functions with kotlin and java!
I want to narrow down the display of docker ps
Rails web server and application server
I want to return multiple return values for the input argument