Linux Change Gitlab storage location

Source: Internet
Author: User

Change the warehouse storage location
By default, the warehouse storage location of the Gitlab is "/var/opt/gitlab/git-data/repositories", in the actual production environment we will not be stored in this location, generally divided into a separate partition to store the warehouse data, I plan to store the data in the "/data/git-data" directory.

[Email protected]:~/tools# mkdir-pv/data/git-data
mkdir: The directory "/data" has been created
mkdir: The directory "/data/git-data" has been created
[Email protected]:~# chown-r git.git/data/git-data #修改创建目录的属主和属组为git用户
[Email protected]:~/tools# Cp/etc/gitlab/gitlab.rb/etc/gitlab/gitlab.rb.bak
[Email protected]:~/tools# vim/etc/gitlab/gitlab.rb
#启用git_data_dirs参数, and modify the following:
Git_data_dirs path "/data/git-data"


#并修改external_url的值修改为规划的访问域名
External_url ' Http://test.gitlab.net '
[Email protected]:~/tools# gitlab-ctl reconfigure #重新编译gitlab. rb file, using the changes that were made to take effect
After re-editing, Gitlab will automatically create a repositories file in the warehouse directory, as follows:
[Email protected]:~# ls-ld/data/git-data/repositories/
DRWXRWS---2 git git 4096 January 4 14:15/data/git-data/repositories/

Linux Change Gitlab storage location

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.