设为首页 收藏本站
查看: 1017|回复: 0

[经验分享] CentOS/Debian配置Gitlab 7.1x来搭建自建的Git仓库

[复制链接]

尚未签到

发表于 2015-12-12 11:18:07 | 显示全部楼层 |阅读模式
CentOS/Debian配置Gitlab 7.1x来搭建自建的Git仓库
[日期:2015-06-11]来源:Linux社区  作者:rainysia[字体:大 中 小]


  前言:因为公司的某些历史原因, 有大量的代码还在csv/svn上. 新来的项目不得不走这个,同时,github的enterprise 2500$/y/10p的价格对于多变的项目和人员也不合适. 也为了让某些不习惯使用linux的开发使用上git, 就放弃了之前的gitolite server, 进而采用gitlab来搭建.
  --------------------------------------------------------------------------------
  www.gitlab.com 是gitlab的仓库, 以前的历史版本, 需要先配置gitolite, 然后配server端来支持web功能. 新的已经实现一键包了.
  -下载
  使用https://about.gitlab.com/downloads/ 来选择对应的版本
wget 后直接运行一键脚本就可以了.
  这个官方的版本非常不友好, 一键装完, 什么都没配置. 配了半天, 发现repo的地址还是domain.com…
  gitlab也支持分开安装, 你自己指定server, 数据库这些, 如果一个一个装, 7个流程走下来, 也太过繁琐. 所以我们换一个公司出的,bitnami出的一键包.
  地址在https://bitnami.com/stack/gitlab/installer
  可以根据系统来选择是32还是64bit的, 推荐用recommended的版本.
  下载到服务器后, 先去检查下服务器的80端口是否给占用. 停掉nginx or apache/httpd
把它们转到808x. 我这里要用一个完整的域名来使用gitlab,
e.g:http://dev.domain.org
  安装前, 删除掉已经有的git帐号, 和git的home目录. 保证系统干净.
  
[iyunv@www.iyunv.com]# wget https://downloads.bitnami.com/files/stacks/gitlab/7.11.4-0/bitnami-gitlab-7.11.4-0-linux-x64-installer.run
--2015-06-09 19:31:19--  https://downloads.bitnami.com/files/stacks/gitlab/7.11.4-0/bitnami-gitlab-7.11.4-0-linux-x64-installer.run
Resolving downloads.bitnami.com... 216.235.167.23
Connecting to downloads.bitnami.com|216.235.167.23|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 311542012 (297M) [application/x-makeself]
Saving to: “bitnami-gitlab-7.11.4-0-linux-x64-installer.run”
  100%[===========================================================================================================================================================>] 311,542,012 2.06M/s  in 2m 40s
  2015-06-09 19:34:05 (1.86 MB/s) - “bitnami-gitlab-7.11.4-0-linux-x64-installer.run” saved [311542012/311542012]
  [iyunv@fca-vm-demo-opt]# chmod a+x bitnami-gitlab-7.11.4-0-linux-x64-installer.run
  [iyunv@fca-vm-demo-opt]# ./bitnami-gitlab-7.11.4-0-linux-x64-installer.run
The installer detects that exists a 'git' user in the system. This installer will change the configuration for this user. Do you want to continue the installation? [y/N]: y
  The installer detects that exists a 'gitlab_ci' user in the system. This installer will change the configuration for this user. Do you want to continue the installation? [y/N]: y
  ----------------------------------------------------------------------------
Welcome to the Bitnami Gitlab Stack Setup Wizard.
  ----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want
to install. Click Next when you are ready to continue.
  PhpPgAdmin [Y/n] :Y
  GitLab : Y (Cannot be edited)
  GitLab CI [Y/n] :Y
  Is the selection above correct? [Y/n]: Y
  ----------------------------------------------------------------------------
Installation folder
  Please, choose a folder to install Bitnami Gitlab Stack
  Select a folder [/opt/gitlab-7.11.4-0]: /opt/bitnami
  ----------------------------------------------------------------------------
Create Admin account
  Bitnami Gitlab Stack admin user creation
  Email Address [user@example.com]: rainysia@gmail.com
  Login [user]:  rainysia
  Password :
Please confirm your password :
  ----------------------------------------------------------------------------
Hostname that will be used to create internal URLs. If this value is incorrect,
you may be unable to access your Gitlab installation from other computers. It is
advisable to use a Domain instead of an IP address for compatibility with
different browsers.
  Domain [127.0.0.1]:  dev.domain.org
Do you want to configure mail support? [y/N]: N
  ----------------------------------------------------------------------------
Setup is now ready to begin installing Bitnami Gitlab Stack on your computer.
  Do you want to continue? [Y/n]: Y
  ----------------------------------------------------------------------------
Please wait while Setup installs Bitnami Gitlab Stack on your computer.
  Installing
0% ______________ 50% ______________ 100%
#########################################
  ----------------------------------------------------------------------------
Setup has finished installing Bitnami Gitlab Stack on your computer.
  Info: To access the Bitnami Gitlab Stack, go to
http://dev.domain.org:80 from your browser.
Press [Enter] to continue:
  
这样就装好了. 中间容易出问题的地方, git本来的帐号, 各个gitlab和git的home目录, 以及/var/opt下的gitlab目录, 我这里没有设置mail server
  使用很简单了
有几个使用的说明,
  gitlab不支持initial repo, 所以你需要先用一个https://的git仓库来导入.
配置ssh key后, 是在 /profile这里面的/profile/key e.g:http://dev.domain.org/profile/keys
保证你要使用仓库的用户的ssh key是id_ras.pub key
拉取的时候直接用 git@dev.domain.org:username/project_name.git ,如果是read, 可以走http.
因为这里为没有走其它端口或者2级,3级域名, 所以需要走其他端口的, 需要在域名那里重配. 整个gitlab都在/opt/下, 里面的apps是应用,ctlscript.sh是配置重置重启shell
DSC0000.png
DSC0001.png
  在 Ubuntu 12.04 上安装 GitLab http://www.iyunv.com/Linux/2012-12/75249.htm
  GitLab 5.3 升级注意事项 http://www.iyunv.com/Linux/2013-06/86473.htm
  在 CentOS 上部署 GitLab (自托管的Git项目仓库) http://www.iyunv.com/Linux/2013-06/85754.htm
  在RHEL6/CentOS6/ScientificLinux6上安装GitLab 6.0.2 http://www.iyunv.com/Linux/2014-03/97831.htm
  CentOS 6.5安装GitLab教程及相关问题解决 http://www.iyunv.com/Linux/2014-05/101526.htm
  GitLab 的详细介绍:请点这里
GitLab 的下载地址:请点这里
  本文永久更新链接地址:http://www.iyunv.com/Linux/2015-06/118679.htm
DSC0002.gif

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-149998-1-1.html 上篇帖子: gitlab8邮件通知配置 下篇帖子: ubuntu 下git安装及使用笔记
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表