RPM安装方式

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

【最好给服务器分配至少4G内存

先检查一下依赖:sshd

[root@localhost soft]# rpm -qa|grep openssh-server
openssh-server-.4p1-.el7.x86_64
[root@localhost soft]# ps -e|grep sshd
? :: sshd
? :: sshd
? :: sshd

如果你没有,那么:

sudo yum install -y curl policycoreutils-python openssh-server
sudo systemctl enable sshd
sudo systemctl start sshd
sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld

再检查一下postfix

[root@localhost soft]# rpm -qa|grep postfix
postfix-2.10.-.el7.x86_64
[root@localhost soft]# ps -e|grep postfix

如果你没有,那么

sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix

..

最后找到你存放rpm目录并进入

[root@localhost soft]# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.0.6-ce.0.el7.x86_64.rpm
---- ::-- https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.0.6-ce.0.el7.x86_64.rpm
Resolving mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)... 101.6.8.193, :f000:::::
Connecting to mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)|101.6.8.193|:... connected.
HTTP request sent, awaiting response... OK
Length: (416M) [application/x-redhat-package-manager]
Saving to: ‘gitlab-ce-11.0.-ce..el7.x86_64.rpm’ %[=========================================================================================================================================================>] ,, .50MB/s in 4m 37s -- :: (1.50 MB/s) - ‘gitlab-ce-11.0.-ce..el7.x86_64.rpm’ saved [/]

..查看

[root@localhost soft]# ll
total
-rw-r--r--. root root Sep : gitlab-ce-11.0.6-ce.0.el7.x86_64.rpm
-rw-r--r--. root root Mar : jdk-8u161-linux-x64.tar.gz
-rw-r--r--. root root Mar : kafka_2.11-1.0.1.tgz
-rw-r--r--. root root Mar : zookeeper-3.4.11.tar.gz
[root@localhost soft]#

安装

[root@localhost soft]# rpm -ivh gitlab-ce-11.0.-ce..el7.x86_64.rpm
warning: gitlab-ce-11.0.-ce..el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
Preparing... ################################# [%]
Updating / installing...
:gitlab-ce-11.0.-ce..el7 ################################# [%]
It looks like GitLab has not been configured yet; skipping the upgrade script. *. *.
*** ***
***** *****
.****** *******
******** ********
,,,,,,,,,***********,,,,,,,,,
,,,,,,,,,,,*********,,,,,,,,,,,
.,,,,,,,,,,,*******,,,,,,,,,,,,
,,,,,,,,,*****,,,,,,,,,.
,,,,,,,****,,,,,,
.,,,***,,,,
,*,. _______ __ __ __
/ ____(_) /_/ / ____ _/ /_
/ / __/ / __/ / / __ `/ __ \
/ /_/ / / /_/ /___/ /_/ / /_/ /
\____/_/\__/_____/\__,_/_.___/ Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting `external_url`
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your GitLab instance by running the following command:
sudo gitlab-ctl reconfigure For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md

然后编辑

vim /etc/gitlab/gitlab.rb

修改

然后执行

gitlab-ctl reconfigure

..

..启动

gitlab-ctl restart

..

..

查看端口占用

[root@localhost soft]# netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 127.0.0.1: 0.0.0.0:* LISTEN /node_exporter
tcp 127.0.0.1: 0.0.0.0:* LISTEN /gitlab-workho
tcp 0.0.0.0: 0.0.0.0:* LISTEN /systemd
tcp 127.0.0.1: 0.0.0.0:* LISTEN /unicorn maste
tcp 127.0.0.1: 0.0.0.0:* LISTEN /ruby
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 18765/nginx: master
tcp 127.0.0.1: 0.0.0.0:* LISTEN /sidekiq 5.1.
tcp 127.0.0.1: 0.0.0.0:* LISTEN /gitaly
tcp 192.168.122.1: 0.0.0.0:* LISTEN /dnsmasq
tcp 0.0.0.0: 0.0.0.0:* LISTEN /sshd
tcp 127.0.0.1: 0.0.0.0:* LISTEN /cupsd
tcp 127.0.0.1: 0.0.0.0:* LISTEN /master
tcp 0.0.0.0: 0.0.0.0:* LISTEN /nginx: master
tcp 0.0.0.0: 0.0.0.0:* LISTEN /alertmanager
tcp 127.0.0.1: 0.0.0.0:* LISTEN /redis_exporte
tcp 127.0.0.1: 0.0.0.0:* LISTEN /prometheus
tcp 127.0.0.1: 0.0.0.0:* LISTEN /postgres_expo
tcp 127.0.0.1: 0.0.0.0:* LISTEN /alertmanager
tcp6 ::: :::* LISTEN /systemd
tcp6 ::: :::* LISTEN /ruby
tcp6 ::: :::* LISTEN /sshd
tcp6 ::: :::* LISTEN /cupsd
tcp6 ::: :::* LISTEN /master
udp 0.0.0.0: 0.0.0.0:* /avahi-daemon: r
udp 0.0.0.0: 0.0.0.0:* /avahi-daemon: r
udp 192.168.122.1: 0.0.0.0:* /dnsmasq
udp 0.0.0.0: 0.0.0.0:* /dnsmasq
udp 0.0.0.0: 0.0.0.0:* /dhclient
udp 0.0.0.0: 0.0.0.0:* /dhclient
udp 127.0.0.1: 0.0.0.0:* /chronyd
udp6 ::: :::* /dhclient
udp6 ::: :::* /chronyd

..

查看防火墙

[root@localhost soft]#  firewall-cmd --zone=public --list-ports
/tcp /tcp /tcp
[root@localhost soft]# firewall-cmd --zone=public --add-port=/tcp --permanent
success
[root@localhost soft]# firewall-cmd --reload
success

打开浏览器,访问

..会让你重置密码,并且至少8位,我输入的12345678。然后会让你登录,用户名是root,密码是你重置的那个

你可以创建用户,创建项目。还可以设置SSH Key。

到此就完成啦。

脚本安装

打开:https://packages.gitlab.com/gitlab/gitlab-ce/install

现在我们换一台机器

[root@localhost admin]# cd /soft/
[root@localhost soft]# curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | bash
Detected operating system as centos/.
Checking for curl...
Detected curl...
Downloading repository file: https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/config_file.repo?os=centos&dist=7&source=script
done.
Installing pygpgme to verify GPG signatures...
Loaded plugins: fastestmirror, langpacks
base | 3.6 kB ::
extras | 3.4 kB ::
https://packages.gitlab.com/gitlab/gitlab-ce/el/7/SRPMS/repodata/repomd.xml: [Errno 12] Timeout on https://packages-gitlab-com.s3-accelerate.amazonaws.com/empty/rpm/repomd.xml?AWSAccessKeyId=AKIAJ74R7IHMTQVGFCEA&Signature=iiqnja2rIZZgVhZPOxxLPMg8vWI=&Expires=1537345200: (28, 'Operation timed out after 30827 milliseconds with 0 out of 0 bytes received')
Trying other mirror.

问题在于访问超时

我不玩了好吧~

GitLab 环境搭建【CentOS7】的更多相关文章

  1. 基于【 centos7】五 || GitLab环境搭建

    一.基于Docker部署GitLab环境搭建 1.下载镜像 docker pull beginor/gitlab-ce:11.0.1-ce.0 2.创建GitLab 的配置 (etc) . 日志 (l ...

  2. 基于CentOS7.x gitlab环境搭建,卸载,汉化 --汉化篇

    gitlab环境搭建,卸载,汉化--汉化篇 注意gitlab的版本需和汉化版本一致 安装git yum install -y git 下载最新的汉化包 cd git clone https://git ...

  3. 基于CentOS7.x gitlab环境搭建,卸载,汉化 --卸载篇

    gitlab环境搭建,卸载,汉化 --卸载篇 完全卸载 停止gitlab gitlab-ctl stop 卸载gitlab rpm -e gitlab-ce 查看gitlab进程  ps aux | ...

  4. 基于CentOS7.x gitlab环境搭建,卸载,汉化 --搭建篇

    gitlab环境搭建,卸载,汉化 --搭建篇 环境搭建 安装依赖软件 yum -y install policycoreutils openssh-server openssh-clients pos ...

  5. LNMP环境搭建--Centos7

    LNMP环境搭建--Centos7 | 刘鹏--博客 盒子 盒子 博客 分类 搜索 文章目录 在Centos7环境安装LAMP环境,备忘哈哈. 准备 首先去官网下载php,nginx 编译安装php ...

  6. 基于Bitnami gitlab OVA包的gitlab 环境搭建

    前言 最近在折腾gitlab,本篇记录搭建的过程方便以后查找 环境 Windows server + VMware 安装 为方便本次我们直接采用Bitnami的VOA安装包(VOA格式可同时兼容Vir ...

  7. gitlab环境搭建

    企业级的git管理程序.最好用的之一吧.估计其它的也得叫之二. 怎么搭建呢? 2G以上配置的机器才可以搞. . 如下 安装需要注意的是.如果开了80端口,8080的需要修改配置文件  下面会提到 1. ...

  8. Hyperledger Fabric 开发环境搭建 centos7系统

    一.安装GO语言 下载最新版的go 打开Terminal,输入命令(以下命令都是以root管理员的角色进行的) su 输入密码:***** wget https://storage.googleapi ...

  9. EOS2.0环境搭建-centos7

    需要安装启动的有三个组件 nodes,keosd,cleos,看看三者的关系 nodeos:核心程序,用于启动eos节点服务,在后台运行,可以配置不同 插件.该进程负责账户管理.区块生成.共识建立,并 ...

随机推荐

  1. ArcGIS 中UniqueValueRenderer和SimpleRenderer的异同点

    唯一值渲染器:UniqueValueRenderer用符号表示一组有匹配属性的图形,这通常用于名词或字符串数据.SimpleRenderer是使用单一符号进行着色分类,不涉及对要素的数据进行处理.这种 ...

  2. StringBuilder与String有哪些区别?

    System.String具备不可修改性,在程序中这样的特性容易产生性能上的问题.针对这个问题.NET提供的StringBuilder类可以解决类似的问题. String 和 StringBuilde ...

  3. 生成统计数据并导出Excel

    需求:看如下表格的统计需求 生产调度中心部门需要从IT技术部门得到这些统计数据 步骤: (1)获取所有的子公司列表 (2)遍历所有的子公司,获取每个子公司的库存信息 (3)遍历所有的库存信息,并对库存 ...

  4. 1064 - You have an error in your SQL syntax;

    mysql 1064 错误: SQL语法错误,check the manual that corresponds to your MySQL server version for the right ...

  5. Linux压缩和解压命令

    zip命令: 压缩 :zip -r files.zip fileFolder 解压:unzip files.zip tar命令: 压缩:tar -cvf files.tar fileFolder 解压 ...

  6. HTTP协议那些事儿(Web开发补充知识点)

    HTTP协议 超文本传输协议(英文:HyperText Transfer Protocol,缩写:HTTP)是一种用于分布式.协作式和超媒体信息系统的应用层协议.HTTP是万维网的数据通信的基础. H ...

  7. java 转义字符"\u0010" "\010" "\2"等

    java转义字符 \xxx                八进制转义符 \uxxxx          十六进制转义符 像"\010","\u0010"这种字符 ...

  8. python爬虫requests模块

    requests库的七个主要方法 1. requests.requests(method, url, **kwargs) 构造一个请求,支撑以下各方法的基础方法 method:请求方式,对应get/p ...

  9. web scraper——简单的爬取数据【二】

    web scraper——安装[一] 在上文中我们已经安装好了web scraper现在我们来进行简单的爬取,就来爬取百度的实时热点吧. http://top.baidu.com/buzz?b=1&a ...

  10. 【XSY2669】归并排序 树状数组 简单组合数学

    题目描述 有一个长度为\(n\)的排列\(n=2^k\),你要把这个数组归并排序.但是在长度为\(2\)的时候有\(\frac{1}{2}\)的概率会把两个数交换(就是有\(\frac{1}{2}\) ...