gitlab的安装和基本维护
基本介绍
GitLab是一个自托管的Git项目仓库,可以自己搭建个人代码管理的仓库,功能与github类似。
安装
操作系统:CentOS6.5
gitlab官网下载安装地址:https://about.gitlab.com/downloads/#centos6
1.安装依赖的包
yum install curl openssh-server openssh-clients postfix cronie
service postfix start
chkconfig postfix on
lokkit -s http -s ssh
2.使用gitlab官网的脚本安装
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
yum install gitlab-ce
或者使用gitlab的rpm安装gitlab
curl -LJO https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/6/gitlab-ce-XXX.rpm/download
rpm -i gitlab-ce-XXX.rpm
如果一切顺利,gitlab将安装完成!
3.这里我先修改下配置文件(将访问地址改为主机的ip地址),默认为主机名访问(http://hostname 默认的访问地址)
修改结果如下:
[root@locahost~]# grep -n "^[a-Z]" /etc/gitlab/gitlab.rb :external_url 'http://10.10.100.38'
4.配置并启动gitlab
gitlab-ctl reconfigure
5.安装完毕后,使用Web登录
打开浏览器输入http://10.10.100.38 #10.10.100.38为我的gitlab主机ip地址.
第一次登录要求设置root密码
登录成功之后,是这样的

至此,gitlab的安装访问正常...
安装完gitlab后的运维操作:
初次配置服务
sudo gitlab-ctl reconfigure
启动服务
sudo gitlab-ctl start
停止服务
sudo gitlab-ctl stop
重启服务
sudo gitlab-ctl restart
检查服务状态
sudo gitlab-ctl status
一般服务状态显示信息
显示格式:
状态 : 进程名称:(进程ID)运行时间(秒);进程的日志服务进程和运行时间
[root@localhost~]# gitlab-ctl status
run: gitlab-workhorse: (pid 14584) 3325s; down: log: 0s, normally up, want up
run: logrotate: (pid 14593) 3324s; run: log: (pid 31243) 612s
run: nginx: (pid 14602) 3323s; down: log: 0s, normally up, want up
run: postgresql: (pid 11749) 3741s, want down; down: log: 3721s, normally up, want up
run: redis: (pid 14613) 3322s; down: log: 0s, normally up, want up
run: sidekiq: (pid 8677) 4118s, got TERM; down: log: 0s, normally up, want up
run: unicorn: (pid 14619) 3322s; run: log: (pid 7844) 4153s
| 状态 | 说明 |
| run | 运行状态 |
| down | 服务停止 |
检查服务的日志信息
# 检查redis的日志
sudo gitlab-ctl tail redis # 检查postgresql的日志
sudo gitlab-ctl tail postgresql # 检查gitlab-workhorse的日志
sudo gitlab-ctl tail gitlab-workhorse # 检查logrotate的日志
sudo gitlab-ctl tail logrotate # 检查nginx的日志
sudo gitlab-ctl tail nginx # 检查sidekiq的日志
sudo gitlab-ctl tail sidekiq # 检查unicorn的日志
sudo gitlab-ctl tail unicorn
gitlab管理员密码忘记,怎么重置密码
Gitlab 修改root用户密码
使用rails工具打开终端
sudo gitlab-rails console production
查询用户的email,用户名,密码等信息,id:1 表示root账号
user = User.where(id: 1).first
重新设置密码
user.password = '新密码'
user.password_confirmation = '新密码'
保存密码
user.save!
完整的操作ruby脚本
user = User.where(id: 1).first
user.password = '新密码'
user.password_confirmation = '新密码'
user.save!
然后使用重置过的密码重新登录。
Git 图形界面操作工具
- SourceTree https://www.sourcetreeapp.com/
- TortoiseGit https://code.google.com/p/tortoisegit/wiki/Download?tm=2
参考文档:
http://www.cnblogs.com/stevendes/p/6218928.html
http://www.cnblogs.com/yangliheng/p/5760185.html
https://about.gitlab.com/downloads/#centos6
http://www.tuicool.com/articles/mEbAZbE
gitlab的安装和基本维护的更多相关文章
- Centos下的GitLab的安装汉化和数据备份以及管理员密码重置
前言: 安装版本:gitlab-ce-8.8.5-ce.1.el7.x86_64.rpm 下载地址: https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yu ...
- Gitlab 快速部署及日常维护 (二)
一.概述 上一篇我们将Gitlab的安装部署和初始化设置部分全部讲解完成了,接下来我们介绍Gitlab在日常工作中常遇见的问题进行梳理说明. 二.Gitlab的安装和维护过程中常见问题 1.Gitla ...
- gitlab一键安装 (转)
原文地址:http://www.2cto.com/os/201411/353292.html 0 简介bitnami和gitlab bitnami BitNami是一个开源项目,该项目产生的开源软件包 ...
- gitlab的安装以及汉化
gitlab的安装 首先在网上下载好任意版本gitlab的rpm包 推荐下面的地址: https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gi ...
- gitlab一键安装+配置(备份+LADP认证)
gitlab一键安装+配置(备份+LADP认证) #gitlab一键安装 #centos6 mini, GitLab社区版 #参考官方最新文档 https://www.gitlab.com.cn/in ...
- Gitlab的安装与实践
tucao 先让我来吐槽一下下,使用GitHub以及Bitbucket比较不太稳定,尤其是后者,可以说是极其不稳定,甚至无法克隆仓库到本地.因此,决定安装一款开源且免费的Git服务到自己的服务器主机上 ...
- Gitlab的安装及项目新建
1. Gitlab的安装及仓库创建 1.1下载gitlab安装包 1).官网下载速度较慢 建议先行下载 国内的源里面可以找到最新的版本https://mirrors.tuna.tsinghua.edu ...
- DevOps之一 Gitlab的安装与配置
gitlab的安装 参考治疗:https://www.gitlab.com.cn/installation/#centos-7 http://www.21yunwei.com/archives/435 ...
- gitlab的安装和基本使用
一.gitlab的安装 1)安装依赖包 sudo yum install git vim gcc glibc-statc telnet -y sudo yum install -y curl poli ...
随机推荐
- chrome访问不了go语言中文网
最近开发转用golang语言,所以经常在晚上搜资料,结果发现go语言中文网,我居然访问不了,刚开始以为是跟go有关,所以被防火长城屏蔽了,结果,偶尔讨论发现办公室的其他两个同事都可以访问,真是奇了怪了 ...
- 使用spin.js优化等待ajax返回时的页面效果
[本文出自天外归云的博客园] 最近在做一个JIRA信息统计的系统,在统计JIRA关联信息的过程中由于需要等待ajax返回结果到前端,时间较长,所以要添加一段等待时的loading画面,使用spin.j ...
- regsvr32.exe是什么东西
Regsvr32命令修复系统故障实例使用过activex的人都知道,activex不注册是不能够被系统识别和使用的,一般安装程序都会自动地把它所使用的activex控件注册,但如果你拿到的一个控件需要 ...
- Java 调用cmd.exe命令
原理:java的Runtime.getRuntime().exec(commandText)可以调用执行cmd指令. cmd /c dir 是执行完dir命令后关闭命令窗口. cmd /k dir 是 ...
- <第一次买基金就赚钱>读书笔记
基金,是指专门用于某种特定目的的并进行独立核算的资金 基金的开放日指基金契约规定的投资者可以在销售网点办理基金申购.赎回交易业务的日期 基金资产总值是指一个基金所拥有的资产(包括现金.股票.债券和其他 ...
- Android——Fragment实例精讲——底部导航栏+ViewPager滑动切换页面
说明: 实现效果: 1- 用ViewPager实现Fragmen之间的切换 2- 底部用RadioGroup实现,更方便的实现图片和字体颜色的改变,更方便的通过RadioButton的点击事件来控制页 ...
- Selenium (2) —— Selenium WebDriver + Grid2(101 Tutorial)
Selenium (2) -- Selenium WebDriver + Grid2(101 Tutorial) jvm版本: 1.8.0_65 selenium版本: v2.48.0 (Standa ...
- java中反向转义org.apache.commons.lang3.StringEscapeUtils.unescapeJava
工具类中包含类反向转义的方法: eorderHistory.setSubPrintTemplates(StringEscapeUtils.unescapeJava(eorderHistory.getS ...
- 简单防范SYN_RECV攻击
netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}' 这条语句返回结果如下 TIME_WAIT FIN_WAIT1 ...
- Photoshop图层混合模式计算公式大全
下面是photoshop cs2中所有混合模式的数学计算公式,另外还介绍了不透明度,这些公式仅适用于RGB图像,对于Lab颜色图像而言,这些公式将不再适用. 1.Opacity 不透明度 C=d*A+ ...