首页 > 其他分享 >gitlab部署

gitlab部署

时间:2022-09-22 21:25:31浏览次数:49  
标签:x86 部署 root gitlab 64 rpm localhost

Gitlab部署

//配置yum源
[root@localhost ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
[root@localhost ~]# sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
[root@localhost ~]# rm -f /etc/yum.repos.d/
[root@localhost ~]# dnf clean all
[root@localhost ~]# dnf list all

//配置epel源
[root@localhost ~]# dnf -y install epel-release

//安装git
[root@localhost ~]# dnf -y install git

//安装依赖包
[root@localhost ~]# dnf -y install openssh-server openssh-clients postfix cronie

//启动postfix服务并设置开机自启
[root@localhost ~]# systemctl enable --now postfix.service 
Created symlink /etc/systemd/system/multi-user.target.wants/postfix.service → /usr/lib/systemd/system/postfix.service.

//下载gitlab的rpm包
[root@localhost ~]# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-15.3.3-ce.0.el7.x86_64.rpm

//下载policycoreutils-python的rpm包
[root@localhost ~]# wget http://mirror.centos.org/centos/7/os/x86_64/Packages/policycoreutils-python-2.5-34.el7.x86_64.rpm


[root@localhost ~]# rpm -qa | grep policycoreutils
policycoreutils-2.9-9.el8.x86_64
//如果系统有这个报的话,请先卸载
[root@localhost ~]# rpm -e policycoreutils-2.9-9.el8.x86_64

//安装policycoreutils-python
[root@localhost ~]# rpm -ivh policycoreutils-python-2.5-34.el7.x86_64.rpm --nodeps
warning: policycoreutils-python-2.5-34.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:policycoreutils-python-2.5-34.el7################################# [100%]

//安装gitlab
[root@localhost ~]# rpm -ivh gitlab-ce-15.3.3-ce.0.el7.x86_64.rpm  --nodeps
warning: gitlab-ce-15.3.3-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
…………
       *.                  *.
      ***                 ***
     *****               *****
    .******             *******
    ********            ********
   ,,,,,,,,,***********,,,,,,,,,
  ,,,,,,,,,,,*********,,,,,,,,,,,
  .,,,,,,,,,,,*******,,,,,,,,,,,,
      ,,,,,,,,,*****,,,,,,,,,.
         ,,,,,,,****,,,,,,
            .,,,***,,,,
                ,*,.
  


     _______ __  __          __
    / ____(_) /_/ /   ____ _/ /_
   / / __/ / __/ /   / __ `/ __ \
  / /_/ / / /_/ /___/ /_/ / /_/ /
  \____/_/\__/_____/\__,_/_.___/

//修改配置文件
[root@localhost ~]# vim /etc/gitlab/gitlab.rb 
external_url 'http://192.168.169.139'   //将此处设为gitlab的服务器ip地址亦或域名

//重载配置文件并重启gitlab
[root@localhost ~]# gitlab-ctl reconfigure   //时间有点久,请耐心等待
[root@localhost ~]# gitlab-ctl restart

//破解管理员密码
[root@localhost ~]# gitlab-rails console -e  production
--------------------------------------------------------------------------------
 Ruby:         ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux]
 GitLab:       15.3.3 (c629a47f87f) FOSS
 GitLab Shell: 14.10.0
 PostgreSQL:   13.6
------------------------------------------------------------[ booted in 18.26s ]
Loading production environment (Rails 6.1.6.1)
irb(main):001:0> user = User.where(id: 1).first		//id为1是超级管理员
=> #<User id:1 @root>
irb(main):002:0> user.password = 'zic12345'			//设置密码,最少8位
=> "zic12345"
irb(main):003:0> user.password_confirmation = 'zic12345' 
=> "zic12345"
irb(main):004:0> user.save!			//保存,没问题会返回true
=> true
irb(main):005:0> exit			//退出

去浏览器输入ip访问

标签:x86,部署,root,gitlab,64,rpm,localhost
From: https://www.cnblogs.com/zicnotes/p/16720879.html

相关文章

  • minikube部署
    安装minikubecurl-LOhttps://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64sudoinstallminikube-linux-amd64/usr/local/bin/minikube......
  • helm部署redis-culster集群
    helm部署redis-culster集群安装helmwgethttps://repo.huaweicloud.com/helm/v3.8.0/helm-v3.8.0-linux-amd64.tar.gztar-zxfhelm-v3.8.0-linux-amd64.tar.gzmvlin......
  • 将微服务容器部署到 Kubernetes
    将Docker映像推送到DockerHub,使映像可供Kubernetes实例下载,然后创建了部署文件,以声明方式描述了Kubernetes应对每个微服务执行的操作。你还了解到,使用Kubernetes......
  • Linux下was9集群部署(NC was集群)
    首先在另外一台服务器上也安装was,安装请看集群部署拓扑图如下(拓扑图片来源于用友was安装手册)部署拓扑图要点说明部署机器为:192.168.31.128(主)、192.168.31.130(从)。......
  • Kubernetes(K8s)部署 SpringCloud
    1.概述老话说的好:有可能性就不要放弃,要敢于尝试。言归正传,之前我们聊了一下如何在Kubernetes(K8s)中部署容器,今天我们来聊一下如何将SpringCloud的服务部署到Kubern......
  • dt804部署脚本
    #!/bin/bash$1=192.168.8.111passwd=gd654321Guobiao=99993201002000008111cat<<EOF1.部署docker程序cat<<EOF1.部署docker程序2.部署redis3.部署mysql4.安装媒体5.安......
  • Windows - 部署 Elasticsearch
    Windows-部署Elasticsearch                                      引用:https://blog......
  • gitlab删除远程分支后,本地还显示已删除的分支
    gitlab删除分支后,本地查看远程分支仍显示已删除的分支,解决办法1、查看远程分支gitbranch-r使用gitbranch-r命令查看远程分支,发现远程分支已经删除,但本地还显示2、......
  • CI持续集成系统环境---部署Gitlab环境完整记录
    ​最近在看CI/CD集成的相关部分,发现几篇好文,转载分享一波。 来源网络:[原创]CI持续集成系统环境---部署Gitlab环境完整记录-散尽浮华-博客园Gitlab是一个代码托管......
  • kafka之单节点多Broker部署及使用
    (1)单节点建立多Broker的集群多个server.properties文件表示多个Broker,一个server.properties文件对应一个Brokercpserver.propertiesserver-1.properties(复制一个......