Home >Computer Tutorials >Computer Knowledge >Centos offline installation of Chinese version of GitLab

Centos offline installation of Chinese version of GitLab

PHPz
PHPzforward
2024-02-19 11:36:18990browse

1. Download the gitlab installation package

Download the latest Chinese version of gitlab installation package from [Tsinghua University Open Source Software Mirror Station]. The installation package comes with a simplified Chinese localization package.

Download the latest gitlab installation package from [gitlab official website].

Centos offline installation of Chinese version of GitLab

2. Install gitlab

Take gitlab-ce-14.9.4-ce.0.el7.x86_64 as an example and upload it to the centos server

Use yum to install gitlab

yum -y install gitlab-ce-14.3.2-ce.0.el7.x86_64.rpm

Centos offline installation of Chinese version of GitLab

Centos offline installation of Chinese version of GitLab

Use yum to install git

yum -y install git #安装git

Centos offline installation of Chinese version of GitLab

Modify gitlab configuration file

vim /etc/gitlab/gitlab.rb

Centos offline installation of Chinese version of GitLab

Modify the domain name or IP for external access:

# 修改 external_url 'example.gitlab.com' 这一句
external_url 'http://192.168.150.102:8899'#修改成你自己的IP或域名:端口

Note: The port set here cannot be occupied. The default port is 8080. If 8080 is already used, please customize other ports and set ports within the open range in the firewall.

Reload configuration

gitlab-ctl reconfigure     #重新生成相关配置文件,执行此命令时间比较长

Note: Regenerating the relevant configuration files will take a long time to execute this command

Configure gitlab to start automatically at boot

systemctl enable gitlab-runsvdir.service
systemctl start gitlab-runsvdir.service

Start GitLab

systemctl stop firewalld #关掉防火墙,要不然9091端口不能对外访问
gitlab-ctl restart #重启gitlab

Centos offline installation of Chinese version of GitLab

用户名: root

Default password reading

cat /etc/gitlab/initial_root_password

Centos offline installation of Chinese version of GitLab

Change password method

Centos offline installation of Chinese version of GitLab

Change password method 2

cd /opt/gitlab/bin
sudo gitlab-rails console -e production
u=User.where(id:1).first # u定义为root用户
u.password='zbbmeta' # 设置root密码, 注意需要符合密码强度
u.password_confirmation='zbbmeta' # 确认当前密码
u.save! # 保存操作
quit # 退出交互界面

Set to Simplified Chinese

Log in to GitLab first. After successful login, configure Simplified Chinese in the system settings of the Gitlab backend.

Setting path: Setting–>Preferences–>Language, change the character set to Simplified Chinese.

Centos offline installation of Chinese version of GitLab

Centos offline installation of Chinese version of GitLab

Note: Don’t forget to click Save

The above is the detailed content of Centos offline installation of Chinese version of GitLab. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:mryunwei.com. If there is any infringement, please contact admin@php.cn delete