Centos offline installation of Chinese version of GitLab

PHPz
Release: 2024-02-19 11:36:18
forward
948 people have browsed it

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
Copy after login

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
Copy after login

Centos offline installation of Chinese version of GitLab

Modify gitlab configuration file

vim /etc/gitlab/gitlab.rb
Copy after login

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或域名:端口
Copy after login

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     #重新生成相关配置文件,执行此命令时间比较长
Copy after login

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
Copy after login

Start GitLab

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

Centos offline installation of Chinese version of GitLab

用户名: root
Copy after login

Default password reading

cat /etc/gitlab/initial_root_password
Copy after login

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
Copy after login
u=User.where(id:1).first # u定义为root用户
u.password='zbbmeta' # 设置root密码, 注意需要符合密码强度
u.password_confirmation='zbbmeta' # 确认当前密码
u.save! # 保存操作
quit # 退出交互界面
Copy after login

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!

Related labels:
source:mryunwei.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template