首页 > 其他分享 >gitlab部署

gitlab部署

时间:2022-09-23 13:58:08浏览次数:53  
标签:127.0 部署 0.0 gitlab root localhost LISTEN


目录

gitlab部署

//关闭防火墙和selinux
[root@localhost ~]# systemctl disable --now firewalld.service 
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@localhost ~]# setenforce 0
[root@localhost ~]# sed -ri 's/^(SELINUX=).*/\1disabled/g' /etc/selinux/config

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

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

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

 //下载或上传policycoreutils-python和gitlab包
[root@localhost ~]# wget http://mirror.centos.org/centos/7/os/x86_64/Packages/policycoreutils-python-2.5-34.el7.x86_64.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

//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
//再进行安装
[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%]

[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...
   1:gitlab-ce-15.3.3-ce.0.el7        ################################# [100%]
It looks like GitLab has not been configured yet; skipping the upgrade script.

       *.                  *.
      ***                 ***
     *****               *****
    .******             *******
    ********            ********
   ,,,,,,,,,***********,,,,,,,,,
  ,,,,,,,,,,,*********,,,,,,,,,,,
  .,,,,,,,,,,,*******,,,,,,,,,,,,
      ,,,,,,,,,*****,,,,,,,,,.
         ,,,,,,,****,,,,,,
            .,,,***,,,,
                ,*,.
  


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

//修改配置文件
[root@localhost ~]# vi /etc/gitlab/gitlab.rb
external_url 'http://192.168.26.132'   //修改此处为本机ip或域名

//重载配置文件并重启gitlab
[root@localhost ~]# gitlab-ctl reconfigure
......
[root@localhost ~]# gitlab-ctl restart
ok: run: alertmanager: (pid 17349) 0s
ok: run: gitaly: (pid 17360) 0s
ok: run: gitlab-exporter: (pid 17371) 0s
ok: run: gitlab-kas: (pid 17373) 0s
ok: run: gitlab-workhorse: (pid 17380) 0s
ok: run: logrotate: (pid 17385) 0s
ok: run: nginx: (pid 17395) 0s
ok: run: node-exporter: (pid 17397) 0s
ok: run: postgres-exporter: (pid 17404) 0s
ok: run: postgresql: (pid 17412) 0s
ok: run: prometheus: (pid 17424) 0s
timeout: run: puma: (pid 15137) 2856s
ok: run: redis: (pid 17453) 0s
ok: run: redis-exporter: (pid 17455) 1s
ok: run: sidekiq: (pid 17489) 1s


//查看当前的gitlab版本
[root@localhost ~]# head -1 /opt/gitlab/version-manifest.txt
gitlab-ce 15.3.3
[root@localhost ~]# ss -anlt
State   Recv-Q  Send-Q    Local Address:Port     Peer Address:Port  Process  
LISTEN  0       1024          127.0.0.1:8080          0.0.0.0:*              
LISTEN  0       128           127.0.0.1:9168          0.0.0.0:*              
LISTEN  0       511             0.0.0.0:80            0.0.0.0:*              
LISTEN  0       128           127.0.0.1:8082          0.0.0.0:*              
LISTEN  0       1024          127.0.0.1:9236          0.0.0.0:*              
LISTEN  0       1024          127.0.0.1:8150          0.0.0.0:*              
LISTEN  0       128             0.0.0.0:22            0.0.0.0:*              
LISTEN  0       1024          127.0.0.1:8151          0.0.0.0:*              
LISTEN  0       1024          127.0.0.1:8153          0.0.0.0:*              
LISTEN  0       100           127.0.0.1:25            0.0.0.0:*              
LISTEN  0       1024          127.0.0.1:8154          0.0.0.0:*              
LISTEN  0       1024          127.0.0.1:8155          0.0.0.0:*              
LISTEN  0       128           127.0.0.1:8092          0.0.0.0:*              
LISTEN  0       511             0.0.0.0:8060          0.0.0.0:*              
LISTEN  0       1024          127.0.0.1:9121          0.0.0.0:*              
LISTEN  0       1024          127.0.0.1:9090          0.0.0.0:*              
LISTEN  0       1024          127.0.0.1:9187          0.0.0.0:*              
LISTEN  0       1024          127.0.0.1:9093          0.0.0.0:*              
LISTEN  0       1024          127.0.0.1:9100          0.0.0.0:*              
LISTEN  0       1024          127.0.0.1:9229          0.0.0.0:*              
LISTEN  0       128               [::1]:9168             [::]:*              
LISTEN  0       128                [::]:22               [::]:*              
LISTEN  0       100               [::1]:25               [::]:*              
LISTEN  0       1024                  *:9094                *:*

//破解管理员密码
[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 20.57s ]
Loading production environment (Rails 6.1.6.1)
irb(main):001:0> user = User.where(id: 1).first
=> #<User id:1 @root>
irb(main):002:0> user.password = 'zdz123456!'
=> "zdz123456!"
irb(main):003:0> user.password_confirmation = 'zdz123456!'
=> "zdz123456!"
irb(main):004:0> user.save!
=> true
irb(main):005:0> exit

gitlab管理

在浏览器中使用gitlab服务器的ip访问,页面如下图所示

主页如下图所示

标签:127.0,部署,0.0,gitlab,root,localhost,LISTEN
From: https://www.cnblogs.com/z696/p/16722443.html

相关文章

  • Visual Studio发布到IIS及Web Deploy配置部署
    1、官方教程https://learn.microsoft.com/zh-cn/visualstudio/deployment/tutorial-import-publish-settings-iis?view=vs-20222、错误排查如果是请求不通,请检测IP端口......
  • 版本控制gitlab
    版本控制gitlab目录版本控制gitlab版本控制介绍常用的版本控制工具:gitlab部署版本控制介绍版本控制是指对软件开发过程中各种程序代码、配置文件及说明文档等文件变更......
  • rsync部署
    目录rsync部署什么是rsyncrsync特性rsync的ssh认证协议rsync命令部署rsyncrsync部署什么是rsyncrsync是linux系统下的数据镜像备份工具。使用快速增量备份工具RemoteS......
  • gitlab部署
    目录gitlab部署gitlab部署安装所需得包[[email protected]]#dnf-yinstallepel-releasegitopenssh-serveropenssh-clientspostfixcronie设置postfi......
  • gitlab
    gitlab目录gitlabgitlab仓库管理系统gitlab特点gitlab部署gitlab仓库管理系统GitLab是一个用于仓库管理系统的开源项目,使用Git作为代码管理工具,并在此基础上搭建起来的......
  • gitlab
    版本控制gitlab目录1.版本控制介绍2.gitlab部署1.版本控制介绍版本控制是指对软件开发过程中各种程序代码、配置文件及说明文档等文件变更的管理,是软件配置管理的核......
  • 版本控制gitlab
    版本控制gitlab什么是版本控制gitlabGitLab是一个用于仓库管理系统的开源项目,使用Git作为代码管理工具,并在此基础上搭建起来的Web服务。安装方法是参考GitLab在GitHub上......
  • .NET 部署Https(SSL)通过代码方式
    在上一个文章中,传送门,给大家介绍了怎么在配置文件中使用 Kestrel部署Https,正好今天有小伙伴稳问到:可以通过代码的方式实现 Kestrel的Https的部署吗?答案是肯定的......
  • 版本控制gitlab
    版本控制gitlab目录版本控制gitlab什么是版本控制gitlabgitlab部署什么是版本控制gitlabGitLab是一个用于仓库管理系统的开源项目,使用Git作为代码管理工具,并在此基础上......
  • 【云原生】MySQL on k8s 环境部署
    目录一、概述二、开始部署(一主两从)1)添加源2)修改配置3)开始安装4)测试验证5)Prometheus监控6)卸载一、概述MySQL是一个关系型数据库管理系统,由瑞典MySQLAB公司开发,属于Ora......