gitlab安装及汉化
2022/8/22 6:53:18
本文主要是介绍gitlab安装及汉化,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
gitlab的安装
首先在网上下载好任意版本gitlab的rpm包
推荐下面的地址:
https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-8.8.5-ce.1.el7.x86_64.rpm
[[email protected] ~]# rz -E
rz waiting to receive.
[[email protected] ~]# ls
anaconda-ks.cfg gitlab-ce-8.8.5-ce.1.el7.x86_64.rpm
[[email protected] ~]# rpm -ivh gitlab-ce-8.8.5-ce.1.el7.x86_64.rpm
#安装
Preparing... ################################# [100%]
Updating / installing...
1:gitlab-ce-8.8.5-ce.1.el7 ################################# [100%]
gitlab: Thank you for installing GitLab!
gitlab: To configure and start GitLab, RUN THE FOLLOWING COMMAND:
sudo
gitlab-ctl reconfigure #配置并启动gitlab
gitlab: GitLab should be reachable at http://linux-node1 默认的访问地址
gitlab: Otherwise configure GitLab for your system by editing /etc/gitlab/gitlab.rb file #gitlab的配置文件,修改之后需要重新gitlab-ctl reconfigure
gitlab: And running reconfigure again.
gitlab:
gitlab: For a comprehensive list of configuration options please see the Omnibus GitLab readme
gitlab: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
gitlab:
It looks like GitLab has not been configured yet; skipping the upgrade script.
[[email protected] ~]#
gitlab的配置
这里我先修改下配置文件
vim /etc/gitlab/gitlab.rb #修改配置文件
修改结果如下:
[[email protected] ~]# grep -n "^[a-Z]" /etc/gitlab/gitlab.rb
11:external_url 'http://192.168.56.11'
[[email protected] ~]# gitlab-ctl reconfigure #配置并启动gitlab
打开浏览器输入http://192.168.56.11 #192.168.56.11我的本机ip
第一次登录要求设置root密码
登录成功之后,是这样的
gitlab的汉化:
[[email protected] ~]# rz
[[email protected] ~]# ls
anaconda-ks.cfg gitlab-ce-8.8.5-ce.1.el7.x86_64.rpm gitlabhq.tar.gz
[[email protected] ~]# tar xf gitlabhq.tar.gz
[[email protected] ~]# ls
anaconda-ks.cfg gitlab-ce-8.8.5-ce.1.el7.x86_64.rpm gitlabhq gitlabhq.tar.gz
###关于这个也可以直接git clone git clone https://github.com/larryli/gitlabhq.git
[[email protected] ~]# cp -r /opt/gitlab/embedded/service/gitlab-rails{,.ori}
[[email protected] ~]# gitlab-ctl stop
ok: down: gitlab-workhorse: 1s, normally up
ok: down: logrotate: 0s, normally up
ok: down: nginx: 0s, normally up
ok: down: postgresql: 1s, normally up
ok: down: redis: 0s, normally up
ok: down: sidekiq: 0s, normally up
ok: down: unicorn: 0s, normally up
[[email protected] ~]# \cp -rf /root/gitlabhq/* /opt/gitlab/embedded/service/gitlab-rails/
cp: cannot overwrite non-directory '/opt/gitlab/embedded/service/gitlab-rails/log' with directory '/root/gitlabhq/log'
cp: cannot overwrite non-directory '/opt/gitlab/embedded/service/gitlab-rails/tmp' with directory '/root/gitlabhq/tmp'
#这里的错误,忽略,因为之前已经设置gitlab的root密码了
[[email protected] ~]# gitlab-ctl start
ok: run: gitlab-workhorse: (pid 25910) 0s
ok: run: logrotate: (pid 25914) 0s
ok: run: nginx: (pid 25920) 1s
ok: run: postgresql: (pid 25925) 0s
ok: run: redis: (pid 25933) 1s
ok: run: sidekiq: (pid 25937) 0s
ok: run: unicorn: (pid 25941) 0s
汉化完成之后的效果
注意事项
汉化之后,不要进行版本升级,很容易出现502!切记!还有生产环境中,尽量用域名,迁移方便
这篇关于gitlab安装及汉化的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-05-15鸿蒙生态设备数量超8亿台
- 2024-05-13TiDB + ES:转转业财系统亿级数据存储优化实践
- 2024-05-09“2024鸿蒙零基础快速实战-仿抖音App开发(ArkTS版)”实战课程已上线
- 2024-05-09聊聊如何通过arthas-tunnel-server来远程管理所有需要arthas监控的应用
- 2024-05-09log4j2这么配就对了
- 2024-05-09nginx修改Content-Type
- 2024-05-09Redis多数据源,看这篇就够了
- 2024-05-09Google Chrome驱动程序 124.0.6367.62(正式版本)去哪下载?
- 2024-05-09有没有大佬知道这种数据应该怎么抓取呀?
- 2024-05-09这种运行结果里的10.100000001,怎么能最快改成10.1?