Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Gitlab Code Management Warehouse installation deployment

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

GitLab uses Ruby on Rails, an open source version management system, to implement a self-hosted Git project repository, which can be accessed through the Web interface for public or private projects. It has features similar to Github, the ability to browse source code, manage defects and comments. You can manage the team's access to the warehouse, which is very easy to browse the submitted version and provides a file history library. It also provides a code snippet collection feature that makes it easy to reuse code and make it easier to find it later when you need it.

Gitlab CE Community Edition is completely open source and free, and is used to build its own code repository and provide a Github-style web interface, which is still very sharp.

1. Deployment environment

Centos 6.3kernel version 2.6.32-358.6.2.el6.x86_64 is used

(centos7 deployment is recommended. Due to conditions, centos6 is used here.)

Gitlab uses the gitlab-ce-8.8.4 version, which is not the latest version, but can only be used stably.

Download address: https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/

2. Start the installation

Gitlab CE integrated installation package, integrated Nginx, postgresql. The mail here does not use mail agents such as Postfix, but directly uses 126mailboxes to forward registered emails.

12yum install curl policycoreutils openssh-server openssh-clientsrpm-I gitlab-ce-8.8.4-ce.0.el6.x86_64.rpm

3. Refresh the configuration

1Gitlab-ctl reconfigure

4. Start the service

1gitlab-ctl start | stop | restart | status

When the service is running, it can be accessed using the host address, and the interface looks like this, or it is quite clean, and the root user is required to change the password when logging in for the first time.

Although the service is already running, it still uses the default configuration. Gitlab uses supporting files to control various functions, such as mail notification, database, nginx, etc.

Configuration file address: / etc/gitlab/gitlab.rb

5. Each configuration item

Because there are too many items that can be configured, we will not explain them one by one, but only the items that are guaranteed to be available:

Note: after the modification of the configuration file is completed, you need to refresh the configuration with the gitlab-ctl reconfigure command

The access address of the 12#gitlab warehouse external_url 'http://*****.*****.com'

1234567891011121314 email configuration, in code upload, permission change Send a notification email when the password is recovered Here lazily used the 126mail server to forward gitlab_rails ['gitlab_email_enabled'] = true gitlab_rails [' gitlab_email_from'] = 'd564roomdfdprinter 126.com' gitlab_rails ['gitlab_email_display_name'] =' 543543popular email b' gitlab_rails ['gitlab_email_reply_to'] =' 65464th email 126com' gitlab_rails ['smtp_enable'] = true gitlab_rails [' smtp_address'] = " Smtp.126.com "gitlab_rails ['smtp_port'] = 25 gitlab_rails [' smtp_user_name'] =" 55458**@126.com "# 126The user name of the server is the full email address gitlab_rails ['smtp_password'] =" 254254subscription * "gitlab_rails [' smtp_domain'] =" 126.com "gitlab_rails ['smtp_authentication'] =" login "gitlab_rails [' smtp_enable_starttls_auto'] = false gitlab_rails ['smtp_openssl_verify_mode'] =' peer'12# data backup directory Gitlab_rails ['backup_path'] = "/ path/gitlab-back" 1 database storage directory git_data_dir "/ datapath/git-data" will be used immediately after this.

Gitlab CE integrates nginx server and postgresql database. Whether the integrated nginx service is enabled, whether to connect to the mysql database separately, and so on, can be set in the gitlab.rb file. The amount of information is too large to enumerate one by one.

Again, after the modification of the configuration file is completed, you need to refresh the configuration with the gitlab-ctl reconfigure command before it can take effect.

6. Data backup and recovery

After 12sudo gitlab-rake gitlab:backup:create SKIP=db # database backup is successful You will see the file # _ gitlab_backup.tar in the folder set by the gitlab_rails ['backup_path'] item in the configuration file. 1234 data recovery sudo gitlab-ctl stop # deactivate Gitlab sudo gitlab-rake gitlab:backup:restore BACKUP=# # restore backup\ backup the number after the backup file prefix sudo gitlab-ctl start # restart GitLab sudo gitlab-rake gitlab:check SANITIZE=true # check the GitLab status

The PS:WEB page defaults to English, the screenshot is the result of Sinicization, and there are tutorials on the process of Sinicization. It is easy to use Gitlab, and you will be familiar with it in a few more days.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report