GitLab与GitHub的共同点与区别

GitLab和GitHub同样属于第三方基于Git开发的作品,免费且开源(基于MIT协议),与Github类似,可以注册用户,任意提交你的代码,添加SSHkey等。不同的是GitLab是可以部署到自己的服务器上,数据库等一切信息掌握在自己手里,适合团队协作开发,团队内部的智慧肯定不能放在别人的服务器上 。

可以把GitLab看作个人版的GitHub。

安装方法:

安装依赖包:policycoreutils     openssh-server   openssh-clients   postfix    

 

设置ssh服务&设置为开机启动

 

 

启动 postfix服务并设置开机启动  postfix支持GitLab发信、(邮件)

功能

systemctl enable postfix    并    systemctl  start  postfix

 

开放ssh以及http服务,然后重新加载防火墙列表

firewall-cmd --add-service=ssh --permanent

firewall-cmd --add-service=http --permanent

firewall-cmd --reload

如果关闭防火墙就不需要做以上配置

 

下载GitLab包并且安装

 

修改GitLab配置

vi /etc/gitlab/gitlab.rb

更改 external_url 'http://192.168.1.185:85'                当前安装GitLab安装服务器的IP地址:外部访问的端口,默认是80

nginx['listen_port']=85                                更改监听端口

 

重载配置及启动|Gitlab

gitlab-ctl  reconfigure                    重载配置

gitlab-ctl  restart                        重启

 

把端口添加到防火墙

firewall-cmd --zone=publc --add-port=85/tcp --permanent          把82端口添加

到防火墙

firewall-cmd  --reload                       重载防火墙

 

使用IP访问             访问登录用root账号

创建新用户创建用户组

 

posted @ 2020-06-27 14:10  tu破  阅读(554)  评论(0)    收藏  举报