脚本宝典收集整理的这篇文章主要介绍了搭建本地GitLab,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
注意:
安装使用GitLab需要至少
4GB
可用内存(Ram + Swap)! 由于操作系统和其他正在运行的应用也会使用内存, 所以安装GitLab前一定要注意当前服务器至少有4GB
的可用内存. 少于4GB内存会导致在reconfigure的时候出现各种问题, 而且在使用过程中也经常会出现500错误。
sudo yum install curl policycoreutils oPEnssh-server openssh-clients policycoreutils-python
sudo Systemctl enable sshd
sudo systemctl start sshd
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
[root@VM-0-15-centos /]# cd /usr/local/src/
[root@VM-0-15-centos src]# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.2.3-ce.0.el7.x86_64.rpm
[root@VM-0-15-centos src]# rpm -ivh gitlab-ce-11.2.3-ce.0.el7.x86_64.rpm
warning: gitlab-ce-11.2.3-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
PReparing... ################################# [100%]
Updating / installing...
1:gitlab-ce-11.2.3-ce.0.el7 ################################# [100%]
It looks like GitLab has not been configured yet; skipping the upgrade script.
*. *.
*** ***
***** *****
.****** *******
******** ********
,,,,,,,,,***********,,,,,,,,,
,,,,,,,,,,,*********,,,,,,,,,,,
.,,,,,,,,,,,*******,,,,,,,,,,,,
,,,,,,,,,*****,,,,,,,,,.
,,,,,,,****,,,,,,
.,,,***,,,,
,*,.
_______ __ __ __
/ ____(_) /_/ / ____ _/ /_
/ / __/ / __/ / / __ `/ __
/ /_/ / / /_/ /___/ /_/ / /_/ /
____/_/__/_____/__,_/_.___/
Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting `external_url`
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your GitLab instance by running the following command:
sudo gitlab-ctl reconfigure
For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.COM/gitlab-org/omnibus-gitlab/blob/master/README.md
[root@VM-0-15-centos src]#
修改配置文件:
/etc/gitlab/gitlab.rb
修改
external_url
的地址为:http://IP地址修改完主配置文件后,使用
gitlab-ctl reconfigure
重新配置gitlab
命令功能 | 执行命令 |
---|---|
重启配置,并启动gitlab服务 | gitlab-ctl reconfigure |
启动所有 gitlab | gitlab-ctl start |
重新启动GitLab | gitlab-ctl restart |
停止所有 gitlab | gitlab-ctl stop |
查看服务状态 | gitlab-ctl status |
查看Gitlab日志 | gitlab-ctl tail |
修改默认的配置文件 | vim /etc/gitlab/gitlab.rb |
检查gitlab | gitlab-rake gitlab:check SANITIZE=true --trace |
至此我们的GitLab安装已经完成
gitlab-ctl stop
rpm -e gitlab-ce
ps aux | grep gitlab
kill -9 PId
杀掉后,在Ps aux | grep gitlab确认一遍,还有没有gitlab的进程
find / -name gitlab | xargs rm -rf
以上是脚本宝典为你收集整理的搭建本地GitLab全部内容,希望文章能够帮你解决搭建本地GitLab所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。