1. Installation
Installation is relatively simple, see gitlab official website
Install dependencies first
sudo yum install -y curl policycoreutils-python openssh-server
1. Enter the gitlab configuration directory /etc/gitlab, you can modify gitlab related configuration information and obtain gitlab initial login password
2. Regarding the configuration modification of the backup file, the default configuration of the system shall prevail here, which can be modified according to actual needs
3. If the configuration file is updated, the gitlab configuration needs to be updated
#执行更新gitlab配置命令
gitlab-ctl reconfigure
4. Execute the backup command to realize the backup of the gitlab warehouse
#gitlab备份
gitlab-rake gitlab:backup:create
2. Gitlab warehouse address
The default warehouse storage path of gitlab is in the /var/opt/gitlab/git-data directory, and the warehouse is stored in the subdirectory repositories.
Modify the warehouse storage address: modify the git_data_dirs parameter in the /etc/gitlab/gitlab.rb file to customize the warehouse storage path
3. Gitlab common commands
gitlab-ctl status: View the status of gitlab components
gitlab-ctl start: start all services
gitlab-ctl restart: restart all services
gitlab-ctl stop: stop all services
gitlab-ctl tail <service name> View service logs
gitlab-ctl reconfigure: Make the configuration file take effect (generally after modifying the main configuration file /etc/gitlab/gitlab.rb, you need to execute this command)
gitlab-ctl show-config: verify configuration file
0 3 * * * /opt/gitlab/bin/gitlab-rake gitlab:backup:create Schedule backup
gitlab-rake gitlab:backup:create to manually perform a backup
4. GitLab user rights management:
GitLab users have five permissions in the group: Guest, Reporter, Developer, Master, Owner
1.Guest: Can create issues, post comments, cannot read and write version library
2. Reporter: You can clone the code, but you cannot submit it. QA and PM can grant this permission
3.Developer: Can clone code, develop, submit, push, RD can grant this permission
4. Master: Can create projects, add tags, protect branches, add project members, edit projects, and the person in charge of the core RD can grant this permission
5.Owner: You can set the access rights of the project-Visibility Level, delete projects, migrate projects, management group members, and development group leaders can grant this permission
Groups and projects in GitLab have three access permissions: Private, Internal, Public
1.private: only group members can see
2.internal: as long as the logged-in user can see
3. public: all open source people can see
Five, Gitlab warehouse backup and recovery
Gitlab warehouse management GitLab backup, restore, upgrade - take a look