How to start tomcat local server without using eclipse

Purpose

-Build a lightweight environment for a little Java learning. ・ Deeply understand how Tomcat works. I usually start the server from eclipse by pressing the start button (Tom cat mark), but I tried how to move only Tomcat from the command.

The main body is in the bin directory in the Tomcat folder.

There is a bin directory in the unzipped tomcat file downloaded from the apache site, so just run the shell in it. So it works no matter where you put it as long as you move the entire tomcat folder. The script that starts the server is startup.sh, so you can start it. However, since these shells do not initially have execute permission, For example, if the root of the tomcat folder is named ~ / tomcat8 directly under the home,

terminal


chmod -R 755 ~/tomcat8

Give the owner execute permission like this. Please make the number as strict as 740 if necessary.

afterwards

terminal


cd ~/tomcat8/bin/
sh startup.sh

Then the server will start In the browser http://localhost:8080 do it, スクリーンショット 2020-02-22 18.57.31.png If this page opens, you are successful.

later ~ / tomcat8 / webapps / examples / index.jsp Since it corresponds like http: //localhost:8080/examples/index.jsp Place and use your own project.

Also Logs in ~ / tomcat8 / logs / catalina.out Because it is output

terminal


tail -f ~/tomcat8/logs/catlina.out

You can see something like the log screen of eclipse.

Recommended Posts

How to start tomcat local server without using eclipse
When the server fails to start in Eclipse
Migrating from Eclipse server function (Tomcat) to Embed Tomcat
[Java] [SQL Server] Connect to local SQL Server 2017 using JDBC for SQL Server
How to switch Tomcat context.xml with WTP in Eclipse
How to start TOMCAT by specifying JAVA_HOME on Windows
How to use Play Framework without using typesafe activator
How to use Eclipse Debug_Shell
How to terminate rails server
How to authorize using graphql-ruby
I want to bring Tomcat to the server and start the application
How to develop separately into Xib files without using Storyboard
How to output array values without using a for statement
How to install JDK 8 on Windows without using the installer
How to join a table without using DBFlute and sql
How to register as a customer with Square using Tomcat
How to control transactions in Spring Boot without using @Transactional
How to run JUnit in Eclipse
Create a tomcat project using Eclipse
How to run a mock server on Swagger-ui using stoplight/prism (using AWS/EC2/Docker)
Unable to start ServletWebServerApplicationContext without SpringBootApplication
How to set Lombok in Eclipse
java Eclipse How to debug javaScript
How to build CloudStack using Docker
How to start Camunda with Docker
Homebrew on Mac allows you to use Tomcat right away without Eclipse
[Swift] How to set an image in the background without using UIImageView.
How to execute a contract using web3j
How to add local jar to maven pom.xml
How to sort a List using Comparator
How to use Apache Derby on Eclipse
[Rails] How to upload images using Carrierwave
[Java] How to calculate age using LocalDate
How to include Spring Tool in Eclipse 4.6.3?
How to install Eclipse (Photon) on Mac
Connect from Java to MySQL using Eclipse
[Servlet / Ajax] How to resolve NoClassDefFoundError [Eclipse]
[Swift5] How to implement animation using "lottie-ios"
How to implement image posting using rails
How to make asynchronous pagenations using Kaminari
Note: [Docker] How to start and stop
[Rails] How to handle data using enum
[For beginners] How to debug in Eclipse
How to insert icons using Font awesome
How to output Excel and PDF using Excella
[JavaFX] How to write Eclipse permissions in build.gradle
[Rails] How to create a graph using lazy_high_charts
How to color code console output in Eclipse
What to do if the server tomcat dies
How to delete a controller etc. using a command
How to play audio and music using javascript
[Ethereum] How to execute a contract using web3j-Part 2-
How to implement the breadcrumb function using gretel
[Servlet / Ajax] How to resolve NoClassDefFoundError [Eclipse]
How to get started with Eclipse Micro Profile
[Rails] How to upload multiple images using Carrierwave
How to generate a primary key using @GeneratedValue
How to create hierarchical category data using ancestry
How to link images using FactoryBot Active Storage
I tried to implement a server using Netty
[Java] How to operate List using Stream API