• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

gitlab部署和破解密码

武飞扬头像
qq_58328312
帮助1

部署gitlab

部署gitlab至少需要4GB内存来运行

  1.  
    //安装epel和git
  2.  
    [root@localhost ~]# yum -y install epel-release git
  3.  
     
  4.  
    //安装依赖包
  5.  
    [root@localhost ~]# yum -y install curl openssh-server openssh-clients postfix cronie
  6.  
    [root@localhost ~]# wget http://mirror.centos.org/centos/7/os/x86_64/Packages/policycoreutils-python-2.5-34.el7.x86_64.rpm
  7.  
    [root@localhost ~]# rpm -ivh --nodeps policycoreutils-python-2.5-34.el7.x86_64.rpm //忽略依赖关系强制安装
  8.  
     
  9.  
    //启动postfix服务并设置开机自启
  10.  
    [root@localhost ~]# systemctl restart postfix.service
  11.  
    [root@localhost ~]# systemctl enable postfix.service
  12.  
    Created symlink /etc/systemd/system/multi-user.target.wants/postfix.service → /usr/lib/systemd/system/postfix.service.
  13.  
     
  14.  
    //关闭防火墙和selinux
  15.  
    [root@localhost ~]# systemctl disable --now firewalld.service
  16.  
    Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
  17.  
    Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
  18.  
    [root@localhost ~]# vim /etc/selinux/config
  19.  
    SELINUX=disabled
  20.  
     
  21.  
     
  22.  
     
  23.  
    #下载gitlab的rpm包
  24.  
    地址:https://mirror.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-15.2.2-ce.0.el7.x86_64.rpm
  25.  
    [root@localhost ~]# ls
  26.  
    anaconda-ks.cfg gitlab-ce-15.2.2-ce.0.el7.x86_64.rpm initial-setup-ks.cfg
  27.  
     
  28.  
    //安装 gitlab包
  29.  
    [root@localhost ~]# rpm -ivh gitlab-ce-15.2.2-ce.0.el7.x86_64.rpm
  30.  
    警告:gitlab-ce-15.2.2-ce.0.el7.x86_64.rpm: 头V4 RSA/SHA1 Signature, 密钥 ID f27eab47: NOKEY
  31.  
    Verifying... ################################# [100%]
  32.  
    准备中... ################################# [100%]
  33.  
    正在升级/安装...
  34.  
    1:gitlab-ce-15.2.2-ce.0.el7 ################################# [100%]
  35.  
    It looks like GitLab has not been configured yet; skipping the upgrade script.
  36.  
    *. *.
  37.  
    *** ***
  38.  
    ***** *****
  39.  
    .****** *******
  40.  
    ******** ********
  41.  
    ,,,,,,,,,***********,,,,,,,,,
  42.  
    ,,,,,,,,,,,*********,,,,,,,,,,,
  43.  
    .,,,,,,,,,,,*******,,,,,,,,,,,,
  44.  
    ,,,,,,,,,*****,,,,,,,,,.
  45.  
    ,,,,,,,****,,,,,,
  46.  
    .,,,***,,,,
  47.  
    ,*,.
  48.  
     
  49.  
    _______ __ __ __
  50.  
    / ____(_) /_/ / ____ _/ /_
  51.  
    / / __/ / __/ / / __ `/ __ \
  52.  
    / /_/ / / /_/ /___/ /_/ / /_/ /
  53.  
    \____/_/\__/_____/\__,_/_.___/
  54.  
     
  55.  
    Thank you for installing GitLab!
  56.  
    GitLab was unable to detect a valid hostname for your instance.
  57.  
    Please configure a URL for your GitLab instance by setting `external_url`
  58.  
    configuration in /etc/gitlab/gitlab.rb file.
  59.  
    Then, you can start your GitLab instance by running the following command:
  60.  
    sudo gitlab-ctl reconfigure
  61.  
    For a comprehensive list of configuration options please see the Omnibus GitLab readme
  62.  
    https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
  63.  
    Help us improve the installation experience, let us know how we did with a 1 minute survey:
  64.  
    https://gitlab.fra1.qualtrics.com/jfe/form/SV_6kVqZANThUQ1bZb?installation=omnibus&release=15-2
  65.  
    //修改配置文件
  66.  
    [root@localhost ~]# vim /etc/gitlab/gitlab.rb
  67.  
    external_url 'http://192.168.80.129' //将此处设为gitlab的服务器ip地址亦或域名
  68.  
    //重载配置文件并重启gitlab
  69.  
    [root@localhost ~]# gitlab-ctl reconfigure
  70.  
    [root@localhost ~]# gitlab-ctl restart
  71.  
    ok: run: alertmanager: (pid 1952) 1s
  72.  
    ok: run: gitaly: (pid 1960) 0s
  73.  
    ok: run: gitlab-exporter: (pid 1974) 0s
  74.  
    ok: run: gitlab-kas: (pid 1976) 1s
  75.  
    ok: run: gitlab-workhorse: (pid 1984) 0s
  76.  
    ok: run: grafana: (pid 1992) 1s
  77.  
    ok: run: logrotate: (pid 2000) 0s
  78.  
    ok: run: nginx: (pid 2006) 0s
  79.  
    ok: run: node-exporter: (pid 2013) 1s
  80.  
    ok: run: postgres-exporter: (pid 2021) 0s
  81.  
    ok: run: postgresql: (pid 2032) 0s
  82.  
    ok: run: prometheus: (pid 2041) 0s
  83.  
    ok: run: puma: (pid 2049) 1s
  84.  
    ok: run: redis: (pid 2054) 0s
  85.  
    ok: run: redis-exporter: (pid 2060) 1s
  86.  
    ok: run: sidekiq: (pid 2066) 0s
  87.  
    [root@localhost ~]# ss -antl //启动后查看会有很多相关服务的端口
  88.  
    State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
  89.  
    LISTEN 0 1024 127.0.0.1:9100 0.0.0.0:*
  90.  
    LISTEN 0 1024 127.0.0.1:9229 0.0.0.0:*
  91.  
    LISTEN 0 1024 127.0.0.1:8080 0.0.0.0:*
  92.  
    LISTEN 0 511 0.0.0.0:80 0.0.0.0:*
  93.  
    LISTEN 0 128 127.0.0.1:9168 0.0.0.0:*
  94.  
    LISTEN 0 128 127.0.0.1:8082 0.0.0.0:*
  95.  
    LISTEN 0 1024 127.0.0.1:9236 0.0.0.0:*
  96.  
    LISTEN 0 1024 127.0.0.1:8150 0.0.0.0:*
  97.  
    LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
  98.  
    LISTEN 0 1024 127.0.0.1:8151 0.0.0.0:*
  99.  
    LISTEN 0 5 127.0.0.1:631 0.0.0.0:*
  100.  
    LISTEN 0 1024 127.0.0.1:3000 0.0.0.0:*
  101.  
    LISTEN 0 1024 127.0.0.1:8153 0.0.0.0:*
  102.  
    LISTEN 0 100 127.0.0.1:25 0.0.0.0:*
  103.  
    LISTEN 0 1024 127.0.0.1:8154 0.0.0.0:*
  104.  
    LISTEN 0 1024 127.0.0.1:8155 0.0.0.0:*
  105.  
    LISTEN 0 128 127.0.0.1:8092 0.0.0.0:*
  106.  
    LISTEN 0 511 0.0.0.0:8060 0.0.0.0:*
  107.  
    LISTEN 0 1024 127.0.0.1:9121 0.0.0.0:*
  108.  
    LISTEN 0 1024 127.0.0.1:9090 0.0.0.0:*
  109.  
    LISTEN 0 1024 127.0.0.1:9187 0.0.0.0:*
  110.  
    LISTEN 0 1024 127.0.0.1:9093 0.0.0.0:*
  111.  
    LISTEN 0 128 [::1]:9168 [::]:*
  112.  
    LISTEN 0 128 [::]:22 [::]:*
  113.  
    LISTEN 0 5 [::1]:631 [::]:*
  114.  
    LISTEN 0 100 [::1]:25 [::]:*
  115.  
    LISTEN 0 1024 *:9094 *:*
学新通

在浏览器使用ip访问,部署成功则出现以下页面

学新通

 密码破解

  1.  
    [root@localhost ~]# gitlab-rails console -e production
  2.  
    --------------------------------------------------------------------------------
  3.  
    Ruby: ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux]
  4.  
    GitLab: 15.2.2 (4ecb014a935) FOSS
  5.  
    GitLab Shell: 14.9.0
  6.  
    PostgreSQL: 13.6
  7.  
    ------------------------------------------------------------[ booted in 30.36s ]
  8.  
    Loading production environment (Rails 6.1.4.7)
  9.  
    irb(main):001:0> user = User.where(id: 1).first //id为root账户
  10.  
    => #<User id:1 @root>
  11.  
    irb(main):002:0> user.password = '12345678' //设置密码
  12.  
    => "12345678"
  13.  
    irb(main):003:0> user.password_confirmation = '12345678'
  14.  
    => "12345678"
  15.  
    irb(main):004:0> user.save! //保存修改
  16.  
    => true
  17.  
    irb(main):005:0> exit
学新通

破解密码后登录

学新通

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhiacgkg
系列文章
更多 icon
同类精品
更多 icon
继续加载