Tomcat8 설정 및 GitBucket 동작 (Ubuntu18.04)

3239 단어 ubuntu18.04Tomcat
OpenJDK와 Tomcat8을 넣어 webapp의 샘플로 GitBucket을 작동시킵니다.

설치


root@cheddar:~# apt search tomcat
Sorting... Done
Full Text Search... Done
root@cheddar:~# 

어라?

조사해 보면, 과연, Universe 리포지토리.
root@cheddar:~# add-apt-repository "deb http://jp.archive.ubuntu.com/ubuntu/ bionic universe"

root@cheddar:~# apt install tomcat8
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  authbind ca-certificates-java default-jre-headless java-common
  libcommons-collections3-java libcommons-dbcp-java libcommons-pool-java
  libecj-java libjpeg-turbo8 libjpeg8 liblcms2-2 libpcsclite1 libtcnative-1
  libtomcat8-java libxi6 libxrender1 libxtst6 openjdk-11-jre-headless
  tomcat8-common x11-common
Suggested packages:
  default-jre libcommons-collections3-java-doc libcommons-dbcp-java-doc
  libgeronimo-jta-1.1-spec-java ant ecj liblcms2-utils pcscd libnss-mdns
  fonts-dejavu-extra fonts-ipafont-gothic fonts-ipafont-mincho
  fonts-wqy-microhei | fonts-wqy-zenhei fonts-indic tomcat8-admin tomcat8-docs
  tomcat8-examples tomcat8-user
The following NEW packages will be installed:
  authbind ca-certificates-java default-jre-headless java-common
  libcommons-collections3-java libcommons-dbcp-java libcommons-pool-java
  libecj-java libjpeg-turbo8 libjpeg8 liblcms2-2 libpcsclite1 libtcnative-1
  libtomcat8-java libxi6 libxrender1 libxtst6 openjdk-11-jre-headless tomcat8
  tomcat8-common x11-common
0 upgraded, 21 newly installed, 0 to remove and 11 not upgraded.
Need to get 47.6 MB of archives.
After this operation, 195 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

...snip...

이제 Tomcat8과 의존하는 OpenJDK도 들어간다.

GitBucket 배포



war 하나로 동작하는 것으로 합리적이었기 때문에. .
zaki@cheddar:~/gitbucket$ curl -LO https://github.com/gitbucket/gitbucket/rele
ases/download/4.29.0/gitbucket.war

.gitbucket 작성을 위해 tomcat8 사용자의 홈 소유자를 tomcat8로 설정합니다. ( $TOMCAT_HOME 지정으로 다른 장소에 만들어도 OK)
root@cheddar:~# chown tomcat8:tomcat8 /var/lib/tomcat8/
root@cheddar:~# 
root@epoisses:~# ls -al /var/lib/tomcat8/
total 24
drwxr-xr-x  6 tomcat8 tomcat8 4096 Dec  8 00:43 .
drwxr-xr-x 37 root    root    4096 Dec  8 00:24 ..
lrwxrwxrwx  1 root    root      12 Aug 14 05:23 conf -> /etc/tomcat8
drwxr-xr-x  2 tomcat8 tomcat8 4096 Aug 14 05:23 lib
lrwxrwxrwx  1 root    root      17 Aug 14 05:23 logs -> ../../log/tomcat8
drwxr-xr-x  2 root    root    4096 Dec  8 00:43 policy
drwxrwxr-x  4 tomcat8 tomcat8 4096 Dec  8 00:29 webapps
lrwxrwxrwx  1 root    root      19 Aug 14 05:23 work -> ../../cache/tomcat8

배포
zaki@cheddar:~/gitbucket$ ls /var/lib/tomcat8/webapps/
ROOT
zaki@cheddar:~/gitbucket$ sudo cp gitbucket.war /var/lib/tomcat8/webapps/
zaki@cheddar:~/gitbucket$ ls /var/lib/tomcat8/webapps/
gitbucket  gitbucket.war  ROOT

그리고 웹 액세스하면 ok

좋은 웹페이지 즐겨찾기