CentOS 7 安装配置Gitlab

亡梦爱人 提交于 2019-12-02 00:25:14

centos:http://www.centos.org/download/
download:https://about.gitlab.com/downloads/
update:https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/update.md
trouble:https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md

之前使用gitlab原生的包安装,升级过于麻烦,换成Omnibus就方便很多。

#安装CentOS

vmware简易安装linux系统,默认只能自己创建一个非root用户(因为root用户默认存在),所以你安装好后,是没法使用root用户登陆的。
进入超级用户模式给root用户设置密码
[irving@localhost ~]$ su
Password:
桥接
1. ONBOOT=yes
2. 配置static

[root@localhost network-scripts]# cat ifcfg-eno16777736
WADDR=00:0C:29:83:EF:27TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eno16777736
UUID=74fd9464-5ad3-4c73-861a-79f66df41231
ONBOOT=yes
IPADDR0=10.200.66.10PRRFIXO0=16GATEWAY0=10.200.0.2DNS1=114.114.114.114[root@localhost network-scripts]#

#更新包

yum update
yum -y install wget

#下载安装

curl -O https://downloads-packages.s3.amazonaws.com/centos-7.0.1406/gitlab-7.6.2_omnibus.5.3.0.ci.1-1.el7.x86_64.rpm
sudo yum install openssh-server
sudo systemctl enable sshd
sudo systemctl start sshd
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
sudo rpm -i gitlab-7.6.2_omnibus.5.3.0.ci.1-1.el7.x86_64.rpm

#配置

sudo gitlab-ctl reconfigure
sudo firewall-cmd --permanent --add-service=http # open up the firewall for HTTP and SSH requests
sudo systemctl reload firewalld

#查看运行情况

sudo gitlab-ctl status;
#配置external_url
Try specifying an external_url in /etc/gitlab/gitlab.rb. Also check your firewall settings; port 80 (HTTP) or 443 (HTTPS) might be closed on your GitLab server.

#配置域名或IP生效

sudo gitlab-ctl reconfigure

Refer:http://www.osyunwei.com/archives/7829.html


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!