CentOS7安装GitLab服务
安装GitLab服务
1.安装必要依赖
yum install -y curl policycoreutils openssh-server openssh-clients postfix
2.下载安装镜像
#执行安装检查,添加yum源 脚本
curl -sS http://packages.gitlab.com.cn/install/gitlab-ce/script.rpm.sh | bash
#执行安装
yum -y install gitlab-ce
3.修改配置项目
配置文件 /etc/gitlab/gitlab.rb
#配置git域名
external_url 'http://git.gitexample.com' #配置路径(注意,配置完成之后,原有项目的路径不会改变,所以请在一开始就设置好)
git_data_dirs({
"default" => {
"path" => "/home/git-data"
}
})
配置邮件
###SMTP Config
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.exmail.qq.com"
gitlab_rails['smtp_port'] = 25
gitlab_rails['smtp_user_name'] = "***@***.com"
gitlab_rails['smtp_password'] = "***"
gitlab_rails['smtp_domain'] = "***.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = false ### Email Settings
gitlab_rails['gitlab_email_enabled'] = true
gitlab_rails['gitlab_email_from'] = 'example@example.com'
gitlab_rails['gitlab_email_display_name'] = '通知中心'
gitlab_rails['gitlab_email_subject_suffix'] = '' ###配置发信人
user['git_user_email'] = "***@***.com"
配置时区
gitlab_rails['time_zone'] = 'Asia/Shanghai'
配置redis
#有2个地方需要配置 (没有特殊要求,可以不配置)
#1 : 可以在此处配置redis地址
gitlab_rails['redis_host'] = "127.0.0.1"
gitlab_rails['redis_port'] = 6379
gitlab_rails['redis_password'] = 'password'
gitlab_rails['redis_database'] = 0 #2 : 在此处配置redis连接
redis['bind'] = '0.0.0.0' # or specify an IP to bind to a single one
redis['port'] = 6379
redis['password'] = 'YjHHZoDxXX97vqVnfJv3I5cNzV1QQ0I'
redis_database 配置不为0的时候报错了..不知道什么原因 , 所以建议都配成0
4.配置并启动
默认可以使用
http://git.gitexample.com
http://ip地址
访问
改端口号 : http是nginx服务的,所以直接改nginx配置就行 nginx位置 : /var/opt/gitlab/nginx
gitlab-ctl reconfigure
注意,所有配置的改动,都需要通过reconfigure来重新加载配置
5.管理命令
#启动
gitlab-ctl start
#停止
gitlab-ctl stop
#重启
gitlab-ctl restart
#状态
gitlab-ctl status
6.重置root密码
[root@localhost ~]# gitlab-rails console production
Loading production environment (Rails 4.2.8)
irb(main):001:0> user = User.where(id: 1).first
=> #<User id:1 @root>
irb(main):002:0> user.password=123456
=> 3306835654
irb(main):003:0> user.password_confirmation=123456
=> 3306835654
irb(main):004:0> user.save!
Enqueued ActionMailer::DeliveryJob (Job ID: cb303e52-ec38-4ee6-9702-b3955336cb6f) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", gid://gitlab/User/1
=> true
irb(main):005:0> quit
7.后台错误调试命令
gitlab-ctl tail
可实时看到系统日志
CentOS7安装GitLab服务的更多相关文章
- CentOS7 安装 vsftpd 服务
CentOS7 安装 vsftpd 服务 0.FTP简介 FTP服务是一个跨平台的文件共享解决方案 0.1.FTP两种模式的区分:服务端的主被动模式 1)ftp一般分为两种模式,PORTFTP和PAS ...
- CentOS7安装GitLab、汉化及使用
同步首发:http://www.yuanrengu.com/index.php/20171112.html 一.GitLab简介 GitLab是利用Ruby On Rails开发的一个开源版本管理系统 ...
- CentOS7安装GitLab、汉化、邮箱配置及使用
同步首发:http://www.yuanrengu.com/index.php/20171112.html 一.GitLab简介 GitLab是利用Ruby On Rails开发的一个开源版本管理系统 ...
- centos7安装gitlab并汉化
一.基础环境准备 1.安装依赖包 [root@gitlab-server ~]#yum install curl policycoreutils openssh-server openssh-clie ...
- CentOs7安装gitlab(转!)
沧浪之水清兮,可以濯吾缨; 沧浪之水浊兮,可以濯吾足. ...
- CentOS7安装GitLab、汉化、邮箱配置及使用(转载)
同步首发: https://www.cnblogs.com/heyonggang/p/7778203.html http://www.yuanrengu.com/index.php/20171112. ...
- Centos7安装GitLab
GitLab CE Download Archives gitlab安装调试小记 Gitlab Free Trial GitLab搭建手记 Gitlab社区版的使用 GUI PNG Gitlab升级到 ...
- Centos7 安装gitLab
我这里使用的是centos 7 64bit,我试过centos 6也是可以的! 1. 安装依赖软件 yum -y install policycoreutils openssh-server open ...
- centos7 安装gitlab任意版本
主要还是根据官网:https://www.gitlab.cc/installation/#centos-7 1.安装依赖: sudo yum install curl policycoreutils ...
随机推荐
- 【easy】234. Palindrome Linked List
ques: 判断一个链表是否回文 Could you do it in O(n) time and O(1) space? method:先将链表分为两部分,将后半部分反转,最后从前往后判断是否相等. ...
- c4b和c4f的区别
1. cc.c4b的参数直接填rgba的值. 2 .cc.c4f(r,g,b,透明度),把rgb值填进去,会发现颜色不对,需要把rgb值除以255,所以最终转换公式是: cc.c3b(r,g,b) = ...
- extensible_index
create user ex identified by oracle; grant Resource to ex;grant connect to ex;grant create view to e ...
- wx获取地理位置
1.公众号配置. 2.引入js 一个放在根目录下的txt文件. 3.1)第一个ajax为获取后台传给的wx.config需要的参数:wx.ready().通过ready接口处理成功验证.然后才是wx. ...
- vue——loading组件
<template> <div class="loading" :style="{height:loadingRadiusVal+'px',width: ...
- tp5的phpword使用
1.使用composer安装phpoffice/phpword phpword的使用文档:https://phpword.readthedocs.io/en/latest/index.html 2.使 ...
- ansible的lookup
lookup路径: /usr/lib/python2.7/site-packages/ansible/plugins/lookup 所有的lookup插件列表cartesian.py dnstxt.p ...
- c++ ignore用法
转自 http://blog.sina.com.cn/s/blog_4b3336c50102v45n.html std::cin.ignore() can be called three diffe ...
- scrapy相关:splash 实践
0. 1.参考 https://github.com/scrapy-plugins/scrapy-splash#configuration 以此为准 scrapy相关:splash安装 A javas ...
- ios 运行时特征,动态改变控件字体大小
需求:ex: 在不同尺寸的iPhone上面显示的字体大小不一样 https://github.com/rentzsch/jrswizzle #import <UIKit/UIKit.h> ...