centeros安装gitlab

开启配置

  • 在CentOS系统上,打开系统防火墙HTTP和SSH的访问
[root@code ~]# yum install -y curl policycoreutils-python openssh-server
[root@code ~]# systemctl enable sshd
[root@code ~]# systemctl start sshd
[root@code ~]# firewall-cmd --permanent --add-service=http
[root@code ~]# systemctl reload firewalld

  • 安装Postfix,用来发送邮件,在安装Postfix的过程中选择’Internet Site’
[root@code ~]# yum install postfix
[root@code ~]# systemctl enable postfix
[root@code ~]# systemctl start postfix

添加GitLab镜像仓库并安装

  • 使用官方镜像安装
$ curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash

$ EXTERNAL_URL="http://code.local.com" yum install -y gitlab-ce

账号初始化

  • 初始化管理员账号(root)
[root@web1 ~]# gitlab-rails console  -e  production
-------------------------------------------------------------------------------------
 Gitlab:       13.0.5 (2268d0cdfcds) FOSS
 Gitlab Shell: 13.2.0
 postgresql:   11.7
-------------------------------------------------------------------------------------
Loading production environment (Rails 6.0.3)
irb(main):001:0>  user = User.where(id: 1).first    
=> #<User id:1 @root>
irb(main):002:0> user.password="admin12345678"
=> "admin12345678"
irb(main):003:0> user.password_confirmation=“admin12345678"
=> "admin12345678"
irb(main):004:0> user.save!
Enqueued ActionMailer::DeliveryJob (Job ID: 3ef37c47-4b3f-49e5-aa53-904e725bd1a8) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", gid://gitlab/User/1
=> true
irb(main):005:0> quit

注:

gitlab-rails console  -e  production // 进入postgresql命令行
user = User.where(id: 1).first    // 查找第一个默认管理员root
user.password="admin12345678" // 设置密码为admin12345678
user.password="admin12345678" // 设置确认密码为admin12345678
  • 登陆

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
CentOS 是一种基于 Linux 的操作系统,下面是安装 CentOS 的基本步骤: 1. 首先,你需要下载 CentOS安装镜像文件。你可以在 CentOS 官方网站上找到最新的稳定版本并下载。 2. 一旦你下载好了 CentOS安装镜像文件,你需要将其写入到一个可引导的介质上,例如 USB 驱动器或 DVD。 3. 插入可引导介质到你想要安装 CentOS 的计算机上,并启动计算机。确保你的计算机 BIOS 设置为从可引导介质启动。 4. 在启动时,你将看到一个 CentOS 安装程序的启动菜单。选择 "Install CentOS" 并按下回车键。 5. 接下来,你需要选择适合你的语言和键盘布局。点击 "Continue" 继续。 6. 在接下来的屏幕上,你将看到一些硬件检测和配置选项。大多数情况下,使用默认设置即可。点击 "Done" 完成配置。 7. 下一步是设置磁盘分区。你可以选择手动分区或使用自动分区。如果你不熟悉分区,请使用自动分区。点击 "Done" 完成分区设置。 8. 现在,你需要为 CentOS 安装设置主机名、时区和 root 密码。填写所需的信息后,点击 "Done" 继续。 9. 接下来,你将需要选择软件包组。你可以选择服务器、基本桌面或自定义安装。选择适合你的需求的选项,并点击 "Done" 继续。 10. 安装程序将开始复制文件并安装 CentOS。这可能需要一些时间,请耐心等待。 11. 安装完成后,你将看到一个屏幕提示你重新启动计算机。点击 "Reboot" 重新启动。 12. 计算机重新启动后,你将看到一个欢迎屏幕,并提示你接受许可协议。点击 "License Information" 阅读协议并接受。 13. 完成许可协议后,你可以创建一个新的用户帐户。填写所需的信息并点击 "Finish Configuration" 完成设置。 现在,你已经成功安装CentOS 操作系统!请记住,这只是一个基本的安装过程概述,实际安装过程可能会因个人需求而有所不同。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值