[转]Centos 7 安装部署 GitLab 服务器
Centos 7 安装部署 GitLab 服务器
转自:https://www.jianshu.com/p/79bfded68899
文前说明
作为码农中的一员,需要不断的学习,我工作之余将一些分析总结和学习笔记写成博客与大家一起交流,也希望采用这种方式记录自己的学习之旅。
本文仅供学习交流使用,侵权必删。
不用于商业目的,转载请注明出处。
Centos 版本:Centos 7.3.10.0-514.el7.x86_64
GitLab 服务器版本:gitlab-ce-8.17.8-ce.0.el7.x86_64.rpm
Git 下载地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
安装依赖
yum -y install policycoreutils openssh-server openssh-clients postfix
安装 GitLab
rpm -i gitlab-ce-8.0.0-ce.0.el7.x86_64.rpm
- 修改 gitlab 配置文件指定服务器的 ip/域名 和 自定义端口。
vi /etc/gitlab/gitlab.rb
1 ## GitLab configuration settings
2 ##! This file is generated during initial installation and **is not** modified
3 ##! during upgrades.
4 ##! Check out the latest version of this file to know about the different
5 ##! settings that can be configured by this file, which may be found at:
6 ##! https://gitlab.com/gitlab-org/omnibus-gitlab/raw/master/files/gitlab-config-template/gitlab.rb.template
7
8
9 ## GitLab URL
10 ##! URL on which GitLab will be reachable.
11 ##! For more details on configuring external_url see:
12 ##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab
13 external_url 'http://gitlab.develop.com:6666'
- 修改 gitlab 数据存储路径,默认的 gitlab 数据存储路径,在目录 /var/opt/gitlab/git-data 下,可能根目录的空间比较小,修改配置文件中的路径。
259 ### For setting up different data storing directory
260 ###! Docs: https://docs.gitlab.com/omnibus/settings/configuration.html#storing-git-data-in-an-alternative-directory
261 ###! **If you want to use a single non-default directory to store git data use a
262 ###! path that doesn't contain symlinks.**
263 # git_data_dirs({"default" => "/home/develop/data/gitlab-data"})
- 重置配置信息。
gitlab-ctl reconfigure
......
Recipe: gitlab::gitlab-rails
* execute[clear the gitlab-rails cache] action run
- execute /opt/gitlab/bin/gitlab-rake cache:clear
Recipe: gitlab::unicorn
* service[unicorn] action restart
- restart service service[unicorn]
Recipe: gitlab::sidekiq
* service[sidekiq] action restart
- restart service service[sidekiq]
Recipe: gitlab::nginx
* service[nginx] action restart
- restart service service[nginx]
Running handlers:
Running handlers complete
Chef Client finished, 12/319 resources updated in 24 seconds
gitlab Reconfigured!
- 重启 gitlab 服务。
# gitlab-ctl restart
ok: run: gitlab-workhorse: (pid 47282) 0s
ok: run: logrotate: (pid 47289) 1s
ok: run: nginx: (pid 47296) 0s
ok: run: postgresql: (pid 47303) 0s
ok: run: redis: (pid 47312) 1s
ok: run: sidekiq: (pid 47317) 0s
ok: run: unicorn: (pid 47322) 1s
- 通过 http://gitlab.develop.com:6666 就可以访问 gitlab。
| 常用 gitlab 命令 | 说明 |
|---|---|
| gitlab-ctl reconfigure | 重置配置信息 |
| gitlab-ctl restart | 重启 gitlab 服务 |
| gitlab-ctl status | 查看 gitlab 状态 |
| gitlab-ctl stop | 停止 gitlab 服务 |
| gitlab-ctl tail | 查看 gitlab 运行日志 |
| gitlab-ctl stop unicorn | 停止 unicorn 服务 |
作者:羽杰
链接:https://www.jianshu.com/p/79bfded68899
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。
[转]Centos 7 安装部署 GitLab 服务器的更多相关文章
- 一、CentOS 7安装部署GitLab服务器
一.CentOS 7安装部署GitLab服务器 1.安装依赖软件 yum -y install policycoreutils policycoreutils-python openssh-serve ...
- 二、CentOS 7安装部署GitLab服务器(解决邮箱发信问题)
一.环境安装(10.0.0) 1.安装依赖软件 yum -y install policycoreutils policycoreutils-python openssh-server openssh ...
- centos7安装部署gitlab服务器
[gitlab需要内存至少4GB] 我这里使用的是centos 7 64bit,我试过centos 6也是可以的! 1. 安装依赖软件 yum -y install policycoreutils ...
- linux centos7安装部署gitlab服务器
refer:https://www.globo.tech/learning-center/install-gitlab-centos-7/#:~:text=How%20to%20Install%20G ...
- Asp.NetCore程序发布到CentOs(含安装部署netcore)--最佳实践(二)
Asp.NetCore程序发布到CentOs(含安装部署netcore)--最佳实践(一) 接上一篇 3. Nginx配置反向代理 3.1 cnetos 安装nginx 首先,我们需要在服务器上安装N ...
- Asp.NetCore程序发布到CentOs(含安装部署netcore)--最佳实践(一)
环境 本地 win7 服务器:Virtual Box 上的Centos ssh工具: Xshell 文件传输: xftp 1.在本地创建asp.net core应用发布 1.1 使用Vs2017 新建 ...
- Asp.NetCore程序发布到CentOs(含安装部署netcore)--最佳实践
原文:Asp.NetCore程序发布到CentOs(含安装部署netcore)--最佳实践 环境 本地 win7 服务器:Virtual Box 上的Centos ssh工具: Xshell 文件传输 ...
- CentOS 7.2部署NTP服务器实现时间同步
CentOS 7.2部署NTP服务器实现时间同步 [日期:2017-12-18] 来源:Linux社区 作者:梁明远 [字体:大 中 小] 1. 前言 对于容器编排系统,前段时间主要研究kube ...
- CentOS 7安装配置Samba服务器
CentOS 7安装配置Samba服务器 CentOS 7下Samba服务器安装配置过程笔记. 假设我们有这样一个场景 共享名 路径 权限 SHAREDOC /smb/docs 所有人员包括来宾均可以 ...
随机推荐
- python builtin列表
Python Builtin function获得通过 python3 -c "import builtins;ff=open('test.txt','w');strlist=[(i+'\n ...
- 页面制作学习笔记:D1.概述
一.Web发展历史 Web1.0 :早期HTML页面:例:网易的门户网站163.com. Web2.0:AJAX技术规模应用:例:网易邮箱126.com. Web3.0:HTML5技术规模应用:例:网 ...
- 策略模式(Strategy Model)
定义:一个类的行为或算法能在运行时被改变,将一组算法封装成一系列对象,通过这些对象灵活改变系统功能: 实现方式: 首先定义个strategy接口,然后创建一系列对象(strategy objects) ...
- 【译】REM vs EM - 世纪之争
原文链接:https://zellwk.com/blog/rem-vs-em/ 在网络上排版的最佳做法之一是使用像rem和em这样的相对单位. 问题是,你应该使用哪个? 在rem支持者和em支持者之间 ...
- Python成长之路【第三篇】函数
函数 一.背景 在学习函数之前,一直遵循:面向过程编程,即:根据业务逻辑从上到下实现功能,其往往用一长段代码来实现指定功能,开发过程中最常见的操作就是粘贴复制,也就是将之前实现的代码块复制到现需功能处 ...
- 关于第一次在IDEA上使用lombok时注解完全不起作用
当你第一次在IDEA上使用lombok这个工具包时,如果你没有在setting--->Plugins-->Marketplace-->安装Lombok plugin 同时设置 Set ...
- react 组件导出
前段时间忙于公司的招聘,导致react学习停滞了一段时间.今天通过react官方文档在本地创建了一个项目,把里面的文件自己重新开发.遇到了一个有意思的问题 class App extends Reac ...
- [转载] HBase入门
转载地址:https://dxer.github.io/2016/03/18/hbase/ HBase一些基本概念 1.Row key 行主键,在对HBase进行查询时候只能依靠Row key,HBa ...
- 2018-2019-2 网络对抗技术 20165228 Exp3 免杀原理与实践
2018-2019-2 网络对抗技术 20165228 Exp3 免杀原理与实践 免杀 一般是对恶意软件做处理,让它不被杀毒软件所检测.也是渗透测试中需要使用到的技术. 要做好免杀,就时清楚杀毒软件( ...
- java数组的for遍历
class ArrayDome { public static void main(String[] args) { int[] arr = {12,51,12,11}; //顺序遍历 for(int ...