1、安装和配置必需的依赖项
在CentOS上将系统防火墙打开HTTP和SSH访问。
2、下载并安装gitlab
添加gitlab封装库
Next, install the GitLab package. Change `http://gitlab.example.com` to the URL at which you want to access your GitLab instance. Installation will automatically configure and start GitLab at that URL. HTTPS requires additional configuration after installation.
下一步,安装gitlab包。这个`http://gitlab.example.com` 是你指定的URL,用它来访问你的gitlab实例。如果想启用HTTPS需要在安装后重新配置。
3、修改gitlab配置(访问url),并重新加载配置
为了gitlab能够显示正确的库克隆链接地址,它由你的用户达到,例如http://gitlab.example.com。
or
修改监听ip及端口号,如果80端口未被占用可以不用修改端口
运行如下命令使配置生效
4、登录gitlab修改默认密码
第一次访问,需要为默认root用户设置默认密码。
注:如果centos上安装了git有可能gitlab启动报错,修改 vi /etc/gitlab/gitlab.rb 文件的如下内容和git不同即可
再次执行
1、CentOS 6 安装GitLab
2、gitlab 新建项目
3、SourceTree通过SSH连接GitLab
参考文献:
https://about.gitlab.com/installation/#centos-6