-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.
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, 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