{"id":18,"date":"2020-10-12T10:14:20","date_gmt":"2020-10-12T01:14:20","guid":{"rendered":"https:\/\/centos.ihavenomoney.co.kr\/?page_id=18"},"modified":"2021-01-25T19:25:22","modified_gmt":"2021-01-25T10:25:22","slug":"tomcat-8-%ec%84%a4%ec%b9%98","status":"publish","type":"page","link":"https:\/\/centos.ihavenomoney.co.kr\/?page_id=18","title":{"rendered":"Tomcat 8 \uc124\uce58"},"content":{"rendered":"<p>Install Java  <\/p>\n<pre class=\"lang:vim decode:true \" ># sudo yum install java-1.8.0-openjdk-devel<\/pre>\n<pre class=\"lang:vim decode:true \" ># which javac\r\n\/usr\/bin\/javac\r\n\r\n\uc2e4\uacbd\ub85c\r\n# readlink -f \/usr\/bin\/javac\r\n\/usr\/lib\/jvm\/java-1.8.0-openjdk-1.8.0.275.b01-0.el7_9.x86_64\/bin\/javac\r\n\r\n\r\nvi \/etc\/profile\r\nexport JAVA_HOME=\/usr\/lib\/jvm\/java-1.8.0-openjdk-1.8.0.275.b01-0.el7_9.x86_64<\/pre>\n<p>Install Tomcat<br \/>\nhttp:\/\/archive.apache.org\/dist\/tomcat\/<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/centos.ihavenomoney.co.kr\/wp-content\/uploads\/2021\/01\/tomcat_site.jpg\" alt=\"\" width=\"488\" height=\"452\" class=\"alignnone size-full wp-image-226\" srcset=\"https:\/\/centos.ihavenomoney.co.kr\/wp-content\/uploads\/2021\/01\/tomcat_site.jpg 488w, https:\/\/centos.ihavenomoney.co.kr\/wp-content\/uploads\/2021\/01\/tomcat_site-300x278.jpg 300w\" sizes=\"auto, (max-width: 488px) 100vw, 488px\" \/><\/p>\n<pre class=\"lang:vim decode:true \" ># cd \/tmp\r\n# wget http:\/\/archive.apache.org\/dist\/tomcat\/tomcat-8\/v8.5.39\/bin\/apache-tomcat-8.5.39.tar.gz\r\n<\/pre>\n<pre class=\"lang:vim decode:true \" >sudo mkdir \/opt\/tomcat\r\nsudo tar xvf apache-tomcat-8.5.39.tar.gz -C \/opt\/tomcat --strip-components=1<\/pre>\n<p>http:\/\/archive.apache.org\/dist\/tomcat\/tomcat-8\/v8.5.39\/bin\/apache-tomcat-8.5.39.tar.gz<\/p>\n<p>Update Permissions<\/p>\n<pre class=\"lang:vim decode:true \" >\r\nsudo groupadd tomcat\r\n\r\ncd \/opt\/tomcat\r\n\r\nsudo useradd -M -s \/bin\/nologin -g tomcat -d \/opt\/tomcat tomcat\r\n\r\nsudo chgrp -R tomcat \/opt\/tomcat\r\n\r\nsudo chmod -R g+r conf\r\n\r\n\r\n\r\nsudo chmod g+x conf\r\n\r\nsudo chown -R tomcat webapps\/ work\/ temp\/ logs\/<\/pre>\n<p>Install Systemd Unit File<\/p>\n<pre class=\"lang:vim decode:true \" >sudo vi \/etc\/systemd\/system\/tomcat.service<\/pre>\n<pre class=\"lang:vim decode:true \" ># Systemd unit file for tomcat\r\n[Unit]\r\nDescription=Apache Tomcat Web Application Container\r\nAfter=syslog.target network.target\r\n\r\n[Service]\r\nType=forking\r\n\r\nEnvironment=JAVA_HOME=\/usr\/lib\/jvm\/jre\r\nEnvironment=CATALINA_PID=\/opt\/tomcat\/temp\/tomcat.pid\r\nEnvironment=CATALINA_HOME=\/opt\/tomcat\r\nEnvironment=CATALINA_BASE=\/opt\/tomcat\r\nEnvironment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC'\r\nEnvironment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:\/dev\/.\/urandom'\r\n\r\nExecStart=\/opt\/tomcat\/bin\/startup.sh\r\nExecStop=\/bin\/kill -15 $MAINPID\r\n\r\nUser=tomcat\r\nGroup=tomcat\r\nUMask=0007\r\nRestartSec=10\r\nRestart=always\r\n\r\n[Install]\r\nWantedBy=multi-user.target<\/pre>\n<p>reload Systemd to load the Tomcat<\/p>\n<pre class=\"lang:vim decode:true \" >sudo systemctl daemon-reload\r\n\r\nsudo systemctl start tomcat\r\n\r\nsudo systemctl status tomcat\r\n\r\nsudo systemctl enable tomcat<\/pre>\n<p>http:\/\/server_IP_address:8080<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/centos.ihavenomoney.co.kr\/wp-content\/uploads\/2021\/01\/tomcat_open.jpg\" alt=\"\" width=\"1007\" height=\"739\" class=\"alignnone size-full wp-image-230\" srcset=\"https:\/\/centos.ihavenomoney.co.kr\/wp-content\/uploads\/2021\/01\/tomcat_open.jpg 1007w, https:\/\/centos.ihavenomoney.co.kr\/wp-content\/uploads\/2021\/01\/tomcat_open-300x220.jpg 300w, https:\/\/centos.ihavenomoney.co.kr\/wp-content\/uploads\/2021\/01\/tomcat_open-768x564.jpg 768w\" sizes=\"auto, (max-width: 1007px) 100vw, 1007px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Install Java # sudo yum install java-1.8.0-openjdk-devel # which javac \/usr\/bin\/javac \uc2e4\uacbd\ub85c # readlink -f \/usr\/bin\/javac \/usr\/lib\/jvm\/java-1.8.0-openjdk-1.8.0.275.b01-0.el7_9.x86_64\/bin\/javac vi \/etc\/profile export JAVA_HOME=\/usr\/lib\/jvm\/java-1.8.0-openjdk-1.8.0.275.b01-0.el7_9.x86_64 Install Tomcat http:\/\/archive.apache.org\/dist\/tomcat\/ # cd \/tmp # wget http:\/\/archive.apache.org\/dist\/tomcat\/tomcat-8\/v8.5.39\/bin\/apache-tomcat-8.5.39.tar.gz sudo mkdir \/opt\/tomcat sudo tar xvf apache-tomcat-8.5.39.tar.gz -C \/opt\/tomcat &#8211;strip-components=1 http:\/\/archive.apache.org\/dist\/tomcat\/tomcat-8\/v8.5.39\/bin\/apache-tomcat-8.5.39.tar.gz Update Permissions sudo groupadd tomcat cd \/opt\/tomcat sudo useradd -M -s \/bin\/nologin -g tomcat &hellip;<br \/><a href=\"https:\/\/centos.ihavenomoney.co.kr\/?page_id=18\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\"><span class=\"screen-reader-text\">Tomcat 8 \uc124\uce58<\/span> \ub354\ubcf4\uae30<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-18","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/18","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18"}],"version-history":[{"count":9,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/18\/revisions"}],"predecessor-version":[{"id":237,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/18\/revisions\/237"}],"wp:attachment":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}