部署 GitLab 服务器

部署 GitLab 服务器

下载地址
官方教程

# 安装依赖包
[root@root ~]# sudo yum install -y curl policycoreutils-python openssh-server
# 设置SSH开机自启动
[root@root ~]# sudo systemctl enable sshd
# 启动SSH服务
[root@root ~]# sudo systemctl start sshd
# 安装Postfix来发送通知邮件
[root@root ~]# sudo yum install postfix
# 设置Postfix开机自启动
[root@root ~]# sudo systemctl enable postfix
# 修改 Postfix 配置文件
[root@root ~]# vim /etc/postfix/main.cf
# 启动Postfix服务
[root@root ~]# sudo systemctl start postfix
inet_interfaces = localhost 改成 inet_interfaces = all
# 添加GitLab软件包仓库
[root@root ~]# curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
# 安装GitLab
[root@root ~]# sudo EXTERNAL_URL="GitLab服务器的公网IP地址" yum install -y gitlab-ce

阿里云添加安全组规则

汉化GitLab

下载地址(选择对应版本)

# 查看gitlab版本
cat /opt/gitlab/embedded/service/gitlab-rails/VERSION

# 下载汉化包
wget方式(指定版本)
wget https://gitlab.com/xhang/gitlab/-/archive/11-9-stable/gitlab-11-9-stable.tar.gz

# 解压
tar -axvf gitlab-11-9-stable.tar.gz 
解压后可以直接删除下载的压缩文件了

# 查看版本号   gitlab-11-9-stable  是我的解压文件,你自己要看下你的是什么
cat gitlab-11-9-stable/VERSION
或者
cat gitlab/VERSION

# 备份gitlab
cd /opt/gitlab/embedded/service
mv gitlab-rails  pre  // 将原配置文件更名为 pre
mv /home/vagrant/gitlab-11-9-stable/   gitlab-rails   // 将下载的汉化包,移动过来,并更名

# 重启配置及重启gitlab
sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章