持续集成&(Gitlab部署)

来源:互联网 发布:英语网络课程推荐 编辑:程序博客网 时间:2024/05/22 09:42
一、Gitlab概述GitLab是一个利用 Ruby on Rails 开发的开源应用程序,实现一个自托管的Git项目仓库,可通过Web界面进行访问公开的或者私人项目。 GitLab拥有与Github类似的功能,能够浏览源代码,管理缺陷和注释。可以管理团队对仓库的访问,它非常易于浏览提交过的版本并提供一个文件历史库,它还提供一个代码片段收集功能可以轻松实现代码复用,便于日后有需要的时候进行查找。二、安装及配置1、环境准备操作系统:CentOS release 6.8 (Final)Gitlab软件版本:gitlab-ce-9.3.0-ce.0.el6.x86_64.rpm IP:172.16.8.112、关闭防火及SELinux可以参考如下:http://blog.csdn.net/xiegh2014/article/details/530317813、使用yum源安装rpm -ivh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpmyum install curl policycoreutils openssh-server openssh-clients postfix -ycurl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bashyum install -y gitlab-ceyum install -y git也可以使用国yum源,速度会快点vim /etc/yum.repos.d/gitlab-ce.repo[gitlab-ce]name=gitlab-cebaseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7repo_gpgcheck=0gpgcheck=0enabled=1gpgkey=https://packages.gitlab.com/gpg.key4、启动及配置gitlab服务gitlab-ctl reconfigure漫长的等待.................................5、gitlab常用管理gitlab-ctl startgitlab-ctl restartgitlab-ctl stop配置完成之后端口查看状态(需要用到80端口)gitlab-ctl statusrun: gitaly: (pid 3709) 168s; run: log: (pid 3553) 217srun: gitlab-monitor: (pid 3756) 164s; run: log: (pid 3678) 185srun: gitlab-workhorse: (pid 3721) 166s; run: log: (pid 3566) 215srun: logrotate: (pid 3595) 202s; run: log: (pid 3594) 202srun: nginx: (pid 3580) 209s; run: log: (pid 3579) 209srun: node-exporter: (pid 3641) 195s; run: log: (pid 3640) 195srun: postgres-exporter: (pid 3745) 164s; run: log: (pid 3664) 187srun: postgresql: (pid 3392) 287s; run: log: (pid 3391) 287srun: prometheus: (pid 3733) 165s; run: log: (pid 3630) 196srun: redis: (pid 3335) 299s; run: log: (pid 3334) 299srun: redis-exporter: (pid 3653) 193s; run: log: (pid 3652) 193srun: sidekiq: (pid 3543) 223s; run: log: (pid 3542) 223srun: unicorn: (pid 3512) 225s; run: log: (pid 3511) 225sgitlab-ctl restartok: run: gitaly: (pid 4489) 0sok: run: gitlab-monitor: (pid 4496) 0sok: run: gitlab-workhorse: (pid 4499) 0sok: run: logrotate: (pid 4509) 1sok: run: nginx: (pid 4516) 0sok: run: node-exporter: (pid 4522) 1sok: run: postgres-exporter: (pid 4528) 0sok: run: postgresql: (pid 4538) 0sok: run: prometheus: (pid 4546) 0sok: run: redis: (pid 4555) 1sok: run: redis-exporter: (pid 4564) 0sok: run: sidekiq: (pid 4573) 1sok: run: unicorn: (pid 4578) 0s6、访问URLhttp://172.16.8.11/进行配置
设置密码(密码长度8位)gitlabgitlab默认管理员:root