最近公司业务频繁更新,为了提高效率和减少人为失误。决定使用持续集成工具。目前主流的工具有gitlab和jenkins。版本控制使用的是git,简单看了看两都,觉的gitlab看起来简单,而且和git是配套的。所以决定上手gitab-ci。
官网社区版本安装
https://about.gitlab.com/installation/#centos-6?version=ce
没什么好说的,官网的命令粘贴复制就行了。
1.安装并配置必要的依赖项
在CentOS 6上,以下命令还将在系统防火墙中打开HTTP和SSH访问。sudo yum install -y curl policycoreutils-python openssh-server openssh-clients cronie sudo lokkit -s http -s ssh
在Postfix安装期间,可能会出现配置屏幕。选择“Internet Site”并按Enter键。使用服务器的外部DNS作为“邮件名称”,然后按Enter键。如果出现其他屏幕,请继续按Enter键接受默认值。
2.添加GitLab软件包存储库并安装软件包
添加GitLab包存储库。
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
接下来,安装GitLab包。将`http:// gitlab.example.com`更改为您要访问GitLab实例的URL。安装将自动配置并启动该URL的GitLab。HTTPS 在安装后需要其他配置。
sudo EXTERNAL_URL =“http://gitlab.example.com”yum install -y gitlab-ce
<button class="btn copy-btn js-copy-btn" data-clipboard-text="" sudo="" external_url=""http://gitlab.example.com"" yum="" install="" -y="" gitlab-ce"="" data-placement="top" data-toggle="tooltip" title="" type="button" data-original-title="Copy to clipboard" style="box-sizing: border-box; color: rgb(107, 79, 187); font-style: inherit; font-variant: inherit; font-weight: normal; font-stretch: inherit; font-size: 18px; line-height: 1.5; font-family: inherit; margin: 5px; overflow: visible; text-transform: none; -webkit-appearance: button; cursor: pointer; display: inline-block; text-align: center; vertical-align: middle; touch-action: manipulation; background-image: none; border: 1px solid transparent; white-space: nowrap; padding: 5px; border-radius: 4px; user-select: none; background-color: transparent;">
3.浏览到主机名并登录
首次访问时,您将被重定向到密码重置屏幕。提供初始管理员帐户的密码,您将被重定向回登录屏幕。使用默认帐户的用户名root
登录。
有关安装和配置的详细说明,请参阅我们的文档。
4.设置您的通信首选项
访问我们的电子邮件订阅首选项中心,告知我们何时与您沟通。我们有明确的电子邮件选择加入政策,因此您可以完全控制我们向您发送电子邮件的频率和频率。
我们每月发送两次您需要了解的GitLab新闻,包括我们的开发团队的新功能,集成,文档和幕后故事。有关错误和系统性能的重要安全更新,请注册我们的专用安全通讯。