- stop gitlab:
gitlab-ctl stop
- move
/var/opt/gitlab
inside our prefix:
mv /var/opt/gitlab /opt/gitlab/data
ln -s /opt/gitlab/data /var/opt/gitlab
- set the
git_data_dir
in/etc/gitlab/gitlab.rb
, because this path couldn't content symlinks:
git_data_dir "/opt/gitlab/data/git-data"
and re-create configuration files (the first run of gitlab-ctl reconfigure
after a major change often fails):
gitlab-ctl reconfigure || gitlab-ctl reconfigure
- move
/var/log/gitlab
there:
mv /var/log/gitlab /opt/gitlab/logs
ln -s /opt/gitlab/logs /var/log/gitlab
- and finally, move
/etc/gitlab
under the prefix, and start gitlab:
mv /etc/gitlab /opt/gitlab/conf
ln -s /opt/gitlab/conf /etc/gitlab
gitlab-ctl start
tested against omnibus-gitlab-ce-7.14.3