GitLab 安装方法

来源:互联网 发布:和邻居做了 知乎 编辑:程序博客网 时间:2024/04/30 03:12

1. 安装并配置必要的依赖关系

如果你想使用 Postfix 发送邮件,请在安装过程中根据提示选择 'Internet Site'。 你也可以用 Sendmail 或者 配置一个自定义的 SMTP 服务 并 把它作为一个 SMTP 服务器。

在 CentOS 系统上,下面的命令将会打开系统防火墙 HTTP 和 SSH 的访问。

sudo yum install curl openssh-server openssh-clients postfix croniesudo service postfix startsudo chkconfig postfix onsudo lokkit -s http -s ssh

如果你不太习惯使用命令管道的方式安装镜像仓库,你可以在这里找到 完整的安装脚本 或者 选择系统对应的安装包 使用下面的命令手动安装。

curl -LJO https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/gitlab-ce-XXX.rpmrpm -i gitlab-ce-XXX.rpm<button aria-label="Copy to clipboard" class="btn copy-btn js-copy-btn" data-clipboard-text="" curl="" -ljo="" https:="" mirrors.tuna.tsinghua.edu.cn="" gitlab-ce="" yum="" el6="" gitlab-ce-xxx.rpm"="" data-placement="top" data-toggle="tooltip" title="" type="button" data-original-title="Copy to clipboard" style="color: rgb(107, 79, 187); font-style: inherit; font-variant: inherit; font-stretch: inherit; font-size: 14px; line-height: 1.42857; font-family: inherit; margin: 5px; overflow: visible; cursor: pointer; vertical-align: middle; touch-action: manipulation; background-image: none; border-width: 1px; border-style: solid; border-color: transparent; white-space: nowrap; padding: 5px; border-radius: 4px; user-select: none;">

3. 配置并启动 GitLab

sudo gitlab-ctl reconfigure

4. 通过浏览器访问上一步配置的域名

第一次访问 GitLab,系统会重定向 url 到重置密码的页面,你需要输入初始化管理员账号的密码。 设置完成后,系统会重定向到登录界面,你就可以使用刚才输入的密码登录系统了。

系统默认的管理员账号为 root, 登录系统后,你可以修改管理员账号为自己喜欢的账号。


来源:https://www.gitlab.com.cn/installation/#centos-6