centos/debian配置gitlab 7.1x来搭建自建的git仓库.

centos/debian配置gitlab 7.1x来搭建自建的git仓库.前言:因为公司的某些历史原因, 有大量的代码还在csv/svn上. 新来的项目不得不走这个,同时,github的enterprise 2500$/y/10p的价格对于多变的项目和人员也不合适. 也为了让某些不习惯使用linux的开发使用上git, 就放弃了之前的gitolite server, 进而采用gitlab来搭建.

是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:

安装前, 删除掉已经有的git帐号, 和git的home目录. 保证系统干净.

[root@fca-vm-demo-opt]# 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.runResolving downloads.bitnami.com… 216.235.167.23Connecting to downloads.bitnami.com|216.235.167.23|:443… connected.HTTP request sent, awaiting response… 200 OKLength: 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][root@fca-vm-demo-opt]# chmod a+x bitnami-gitlab-7.11.4-0-linux-x64-installer.run [root@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]: yThe 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] :YIs the selection above correct? [Y/n]: Y—————————————————————————-Installation folderPlease, choose a folder to install Bitnami Gitlab StackSelect a folder [/opt/gitlab-7.11.4-0]: /opt/bitnami—————————————————————————-Create Admin accountBitnami Gitlab Stack admin user creationEmail Address [user@example.com]: rainysia@gmail.comLogin [user]: rainysiaPassword :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.orgDo 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:80 from your browser.Press [Enter] to continue:

这样就装好了. 中间容易出问题的地方, git本来的帐号, 各个gitlab和git的home目录, 以及/var/opt下的gitlab目录, 我这里没有设置mail server

使用很简单了

有几个使用的说明,

,坚韧是成功的一大要素,只要在门上敲得够久够大声,终会把人唤醒的。

centos/debian配置gitlab 7.1x来搭建自建的git仓库.

相关文章:

你感兴趣的文章:

标签云: