Gitlab的安装和使用
安装和配置必要的依赖项
yum install dnf
sudo dnf install -y curl policycoreutils openssh-server
#将SSH服务设置成开机自启动
sudo systemctl enable sshd
sudo systemctl start sshd
#安装防火墙
yum install firewalld systemd -y
# Check if opening the firewall is needed with: sudo systemctl status firewalld
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo systemctl reload firewalld
#安装Postfix以发送通知邮件
sudo dnf install postfix
#将postfix服务设置成开机自启动
sudo systemctl enable postfix
#启动postfix
sudo systemctl start postfix
GitLab软件包存储库并安装软件包
curl <https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh> | sudo bash
sudo EXTERNAL_URL="<http://git.vliao7.com:8099/>" dnf install -y gitlab-ee
配置
vim /etc/gitlab/gitlab.rb
命令
#加载配置
gitlab-ctl reconfigure
#重启
gitlab-ctl restart
初始账户: root 密码:5iveL!fe
日志
#查看所有的logs; 按 Ctrl-C 退出
sudo gitlab-ctl tail
#拉取某个指定的日志文件
sudo gitlab-ctl tail nginx/gitlab_error.log
/var/log/gitlab
#gitlab-rails
production.log:其作用是记录gitlab的每次请求的具体信息,包括请求的URL、ip地址、请求类型、以及此次请求所涉及的具体代码、SQL请求以及SQL请求消耗的时间。
application.log:其作用是记录创建用户、创建项目、移动项目等日志。
githost.log:此日志的作用是记录对gitlab服务器的错误请求日志。
sidekiq.log:gitlab中可能存在一些任务需要运行很长时间,因此会选择将这些任务在后台执行,sidekiq.log文件就是用来记录这一类任务的处理信息,此日志文件是一个软连接文件。
#gitlab-shell
gitlab-shell.log:此日志文件位于/home/gitlab/logs/gitlab-shell中,该日志文件的作用是记录执行gitlab命令以及为项目添加ssh权限的日志文件
unicorn/stderr.log:此日志文件位于/home/gitlab/logs/unicorn,该日志文件的作用是记录gitlab的web服务器的相关记录。
repochec.log:此日志文件位于/home/gitlab/logs/prometheus
gitlab定时自动备份
0 2 * * * /opt/gitlab/bin/gitlab-rake gitlab:backup:create
gitlab修改备份路径:
修改/etc/gitlab/gitlab.rb文件
gitlab_rails['backup_path'] = '/mnt/backups'
gitlab恢复
# 停止相关数据连接服务
gitlab-ctl stop unicorn
gitlab-ctl stop sidekiq
# 从1393513186编号备份中恢复
gitlab-rake gitlab:backup:restore BACKUP=1393513186
# 启动Gitlab
sudo gitlab-ctl start
Gitlab迁移
注意要是同版本
把备份文件拷贝到gitlab的备份目录下,根据上面gitlab恢复步骤即可。
Gitlab502
先等等看,有时候只是启动比较慢
Note that on a single-core server it may take up to a minute to restart Unicorn and Sidekiq. Your GitLab instance will give a 502 error until Unicorn is up again.
It is also possible to start, stop or restart individual components.
sudo gitlab-ctl restart sidekiq
Unicorn supports zero-downtime reloads. These can be triggered as follows:
sudo gitlab-ctl hup unicorn
Note that you cannot use a Unicorn reload to update the Ruby runtime.
Gitlab更换代码URL
vi /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml
host: 192.168.1.108
gitlab-ctl restart
卸载
sudo gitlab-ctl stop
find / -name gitlab|xargs rm -rfv
Gitlab的安装和使用的更多相关文章
- 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 ...
- docker+gitlab的安装和迁移
docker+gitlab的安装 docker search gitlab docker pull docker.io/gitlab/gitlab-ce docker run --name=: -- ...
- Gitlab的安装汉化及问题解决
Gitlab的安装汉化及问题解决(2017/12/14目前版本为10.2.4) 一.前言 Gitlab需要安装的包太TM多了,源码安装能愁死个人,一直出错,后来发现几行命令就装的真是遇到的新大陆一样. ...
- 持续集成(1)gitlab的安装
操作系统:centos 6.5 关闭selinux # 修改/etc/selinux/config 文件 将SELINUX=enforcing改为SELINUX=disabled ,然后重启电脑 # ...
随机推荐
- Solution Set - DP
CF101E Candies and Stones Link&Submission. DP 的状态设计和转移都是显然的,唯一的问题在于需要输出方案,而这题卡空间.会发现如果用 bitset 存 ...
- Solution Set - NOI级别真题选做
[NOI2007] 社交网络 Link&Submission. key:Floyd Floyd求出任意两点间最短路,以及最短路的条数.求点 \(k\) 的答案时枚举所有点对 \(i,j\),若 ...
- 从 Rollover+curator 到 ILM
数据量增长,当前存在的问题: 查询与写入越来越慢,聚合的速度慢的离谱,聚合的数据量大一些的话,可能出现超时失败,甚至OOM 磁盘和内存资源以肉眼可见的速度快速消耗,甚至出现满载的情况 JVM频繁GC, ...
- Critical Expression
什么是Critical Expression 所谓Critical Expression就是一个表达式依赖的值,必须出现在这个表达式前面.比如: times (label-$) db 0 ;times ...
- cesium常见问题和解决
- istio sidecar 工作方式
istio 是什么 Istio 是一个开放源代码的服务网格,它为基于微服务的应用程序提供了一种统一的方式来连接.保护.监控和管理服务.Istio 主要解决的是在微服务架构中的服务间通信的复杂性问题,它 ...
- text/event-stream协议
客户端接收 text/event-stream html <!DOCTYPE html> <html> <head> <meta charset=" ...
- 史上最全shell脚本编程语法上册
1. shell 脚本语言的基本用法 1.1 shell 脚本的用途 将简单的命令组合完成复杂的工作,自动化执行命令,提高工作效率: 减少手工命令的输入,一定程度上避免人为错误: 将软件或应用的安装及 ...
- c# - 如何在圆角 WPF 窗体中创建圆角矩形?
我正在 WPF 中创建一个应用程序,我想要圆角.收到.现在窗体是无边框的,我正在尝试创建一个圆角矩形并将其放在顶部,使其看起来像 Windows 应用程序的顶部栏. 我做不到. 这是我的代码: < ...
- 利用instruments工具查看其它app的性能
1.随便建立一个新的工程文件,profile,进入instruments 2.选中activity,可以看到所有进程,以及其它进程的CPU占用情况