Help us understand the problem. What is going on with this article?

GitBucket on Ubuntu

GitbucketのHOMEを設定

cat /usr/share/tomcat9/bin/setenv.sh

CATALINA_OPTS="-Dfile.encoding=UTF-8 -Dgitbucket.home=/var/lib/gitbucket"

が、/var/lib/gitbucketが出来てない。。。

Caused by: java.io.FileNotFoundException: /var/lib/gitbucket/database.conf (Read-only file system)

なので、一旦、jarファイルを起動し作成。アクセス権もtomcatに変更

sudo java -jar gitbucket.war --gitbucket.home=/var/lib/gitbucket/
sudo chown -R tomcat:tomcat ../../gitbucket

ls -al /var/lib/gitbucket
total 84
drwxr-xr-x  4 tomcat tomcat  4096 Sep 15 23:30 .
drwxr-xr-x 38 root   root    4096 Sep 15 23:02 ..
-rw-r--r--  1 tomcat tomcat   205 Sep 15 23:29 database.conf
-rw-r--r--  1 tomcat tomcat 65536 Sep 15 23:30 data.mv.db
drwxr-xr-x  2 tomcat tomcat  4096 Sep 15 23:29 gist
drwxr-xr-x  3 tomcat tomcat  4096 Sep 15 23:29 plugins

それでもまだエラーがでる。systemdで読み書き用?pathの追加

/lib/systemd/system/tomcat9.service

ReadWritePaths=/var/lib/gitbucket/

apache2経由でアクセスできるようにおまじない。。追加

/etc/apache2/apache2.conf

<VirtualHost *:80>
  DocumentRoot /var/lib/tomcat9/webapps
  #ServerName yourhost.domain

    <Proxy *>
      Order deny,allow
      Allow from all
    </Proxy>


  ProxyPass /gitbucket ajp://localhost:8009/gitbucket

</VirtualHost>
Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away