首页 > 代码库 > Gitlab初体验(一)

Gitlab初体验(一)

系统版本:

[root@web_1 ~]# uname -r

3.10.0-327.el7.x86_64

[root@web_1 ~]# cat /etc/redhat-release 

CentOS Linux release 7.2.1511 (Core) 

[root@web_1 ~]# ip addr show enp0s8 | awk ‘NR==3{print $2}‘

192.168.56.101/24


YUM配置:

[root@web_1 ~]# cat /etc/yum.repos.d/epel.repo 

[EPEL]

name=EPEL

baseurl=https://mirrors.aliyun.com/epel/7Server/x86_64/

gpgcheck=0

enabled=1

[root@web_1 ~]# cat /etc/yum.repos.d/gitlab.repo 

[gitlab]

name=gitlab

baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/

enabled=1

gpgcheck=0


关闭防火墙:

[root@web_1 ~]# systemctl stop firewalld.service 


关闭selinux:

[root@web_1 ~]# getenforce 

Enforcing


安装依赖:

[root@web_1 ~]# yum install curl policycoreutils openssh-server openssh-clients postfix -y


安装gitlab:

[root@web_1 ~]# yum install -y gitlab-ce


配置并启动gitlab:

[root@web_1 ~]# gitlab-ctl reconfigure


查看状态:

[root@web_1 ~]# gitlab-ctl status

run: gitlab-workhorse: (pid 14952) 882s; run: log: (pid 14776) 915s

run: logrotate: (pid 14871) 903s; run: log: (pid 14870) 903s

run: nginx: (pid 14817) 909s; run: log: (pid 14816) 909s

run: postgresql: (pid 14525) 949s; run: log: (pid 14524) 949s

run: redis: (pid 14413) 955s; run: log: (pid 14412) 955s

run: sidekiq: (pid 14736) 921s; run: log: (pid 14735) 921s

run: unicorn: (pid 14687) 923s; run: log: (pid 14686) 923s



****************

常用命令:

[root@web_1 ~]# gitlab-ctl stop

[root@web_1 ~]# gitlab-ctl status

[root@web_1 ~]# gitlab-ctl start

***************


访问:192.168.56.101

技术分享

输入密码:12345678


************

默认账户:admin@example.com

***********

技术分享


修改管理密码:http://docs.gitlab.com/ce/security/reset_root_password.html

汉化:git clone https://github.com/larryli/gitlabhq.git (未测试)


本文出自 “梦1场ー〉╯” 博客,请务必保留此出处http://cqwujiang.blog.51cto.com/10808946/1909015

Gitlab初体验(一)