首页 > 其他分享 >使用离线安装包搭建gitlab服务器

使用离线安装包搭建gitlab服务器

时间:2022-08-31 11:45:10浏览次数:80  
标签:x86 ce.0 gitlab 离线 ce 64 安装包 el7

1 下载Gitlab服务器软件包

下载地址:https://packages.gitlab.com/gitlab/gitlab-ce

选择自己需要的版本下载即可,我是用的是centos 7,所以我下载的是gitlab-ce-15.3.2-ce.0.el7.x86_64.rpm

点击右上方download下载,或者复制下方的wget下载

我这里选择的是wget下载方式,不需要单独在上传一次。建议用download方式先下载下来,MD5校验一下,和页面上的MD5值对比,保证文件的完整性

[root@k8s-node2 ~]# wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-15.3.2-ce.0.el7.x86_64.rpm/download.rpm
--2022-08-31 10:30:25--  https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-15.3.2-ce.0.el7.x86_64.rpm/download.rpm
Resolving packages.gitlab.com (packages.gitlab.com)... 104.18.27.123, 104.18.26.123, 2606:4700::6812:1a7b, ...
Connecting to packages.gitlab.com (packages.gitlab.com)|104.18.27.123|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://d20rj4el6vkp4c.cloudfront.net/7/8/el/7/package_files/88759.rpm?t=1661913359_2efbf97e9189648ad90f368be3b5c24df5d51e21 [following]
--2022-08-31 10:30:25--  https://d20rj4el6vkp4c.cloudfront.net/7/8/el/7/package_files/88759.rpm?t=1661913359_2efbf97e9189648ad90f368be3b5c24df5d51e21
Resolving d20rj4el6vkp4c.cloudfront.net (d20rj4el6vkp4c.cloudfront.net)... 65.9.58.119, 65.9.58.38, 65.9.58.228, ...
Connecting to d20rj4el6vkp4c.cloudfront.net (d20rj4el6vkp4c.cloudfront.net)|65.9.58.119|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1101655026 (1.0G) [application/x-rpm]
Saving to: ‘gitlab-ce-15.3.2-ce.0.el7.x86_64.rpm’

100%[========================================================================================================================>] 1,101,655,026  977KB/s   in 16m 8s 

2022-08-31 10:46:35 (1.09 MB/s) - ‘gitlab-ce-15.3.2-ce.0.el7.x86_64.rpm’ saved [1101655026/1101655026]

2 安装Gitlab

下载网页也有对应install命令,复制直接在服务器运行即可

yum install gitlab-ce-15.3.2-ce.0.el7.x86_64.rpm  -y

[root@k8s-node2 ~]# yum install gitlab-ce-15.3.2-ce.0.el7.x86_64.rpm  -y
Loaded plugins: fastestmirror
Examining gitlab-ce-15.3.2-ce.0.el7.x86_64.rpm: gitlab-ce-15.3.2-ce.0.el7.x86_64
Marking gitlab-ce-15.3.2-ce.0.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package gitlab-ce.x86_64 0:15.3.2-ce.0.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================================
 Package                         Arch                         Version                                 Repository                                               Size
====================================================================================================================================================================
Installing:
 gitlab-ce                       x86_64                       15.3.2-ce.0.el7                         /gitlab-ce-15.3.2-ce.0.el7.x86_64                       2.3 G

Transaction Summary
====================================================================================================================================================================
Install  1 Package

Total size: 2.3 G
Installed size: 2.3 G
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : gitlab-ce-15.3.2-ce.0.el7.x86_64                                                                                                                 1/1 
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

Help us improve the installation experience, let us know how we did with a 1 minute survey:
https://gitlab.fra1.qualtrics.com/jfe/form/SV_6kVqZANThUQ1bZb?installation=omnibus&release=15-3

  Verifying  : gitlab-ce-15.3.2-ce.0.el7.x86_64                                                                                                                 1/1 

Installed:
  gitlab-ce.x86_64 0:15.3.2-ce.0.el7                                                                                                                                

Complete!

3 配置Gitlab

默认使用的是80端口,如果需要修改端口还需要修改配置文件vim /var/opt/gitlab/nginx/conf/gitlab-http.conf,把80监听端口改掉

vim /etc/gitlab/gitlab.rb 

把external_url 'http://gitlab.example.com'  修改成节点地址或者域名

[root@k8s-node2 ~]# cat /etc/gitlab/gitlab.rb | grep -v ^# | grep -v ^$
external_url 'http://192.168.198.147'

4 重新配置gitlab

[root@k8s-node2 ~]# gitlab-ctl reconfigure    
Running handlers:
[2022-08-31T11:19:23+08:00] INFO: Running report handlers
Running handlers complete
[2022-08-31T11:19:23+08:00] INFO: Report handlers complete
Infra Phase complete, 571/1532 resources updated in 03 minutes 47 seconds

Notes:
Default admin account has been configured with following details:
Username: root
Password: You didn't opt-in to print initial root password to STDOUT.
Password stored to /etc/gitlab/initial_root_password. This file will be cleaned up in first reconfigure run after 24 hours.

NOTE: Because these credentials might be present in your log files in plain text, it is highly recommended to reset the password following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.

gitlab Reconfigured!

5 访问gitlab 

访问地址:http://192.168.198.147

默认账户名是root,密码存放在配置文件 /etc/gitlab/initial_root_password

登录后可自行修改密码

 

标签:x86,ce.0,gitlab,离线,ce,64,安装包,el7
From: https://www.cnblogs.com/xmwan/p/16642241.html

相关文章

  • 离线强化学习 Offline Reinforcement Learning 之 BEAR 算法
    BEARBootstrappingErrorAccumulationReduction时间:2019NIPSConferenceandWorkshoponNeuralInformationProcessingSystem题目:StabilizingOff-policyQ-Lear......
  • Centos7 离线升级SSH9.0
    前两天也是看到园里大佬的在线升级SSH的脚本,所以利用晚上的时候把离线包下载下来,做成可离线升级的包。百度网盘地址:链接:https://pan.baidu.com/s/15oW9K-hQ8ZITIbYKJ4TVD......
  • 私有远程仓库Gitlab
    私有远程仓库GitlabGitlab介绍私有代码仓库,除了Gitlab还有gogs精细化的权限配置控制用户/用户组权限,避免任何用户都可以将代码提交masterGitlab的架构部署Gitlab-......
  • 运维老鸟教你安装centos6.9如何选择安装包
    近来发现越来越多的运维小伙伴们都有最小化安装系统的洁癖,因此,找老男孩来咨询,这个“洁癖”好习惯啊,必须支持,,因此发布本文和大家分享下。(1)系统安装类型选择及自定义额外包......
  • vs打包程序安装包
    VisualStudio打包程序安装包一个安装包执行后会做些什么将目标软件所需要的所有文件释放在指定的磁盘位置上,完成注册表的修改,系统设置的修改,并可选择创建快捷方式......
  • linux离线安装JDK方法
    下载文件:jdk-8u241-linux-x64.tar.gz一.卸载1.检查系统中原版本:[root@localhost~]#java-versionjavaversion"1.7.0_"OpenJDKRuntimeEnvironment(IcedTea61.......
  • E 华华和月月种树 添加子节点并给子树加权值 树状数组+dfs序+离线操作
     链接:https://ac.nowcoder.com/acm/problem/23051来源:牛客网题目描述华华看书了解到,一起玩养成类的游戏有助于两人培养感情。所以他决定和月月......
  • 5.Springboot离线新建环境
    1.新建Maven项目2.pom文件导入org.springframework.bootspring-boot-starter-parent2.7.2org.springframework.bootspring-boot-starter-web<dependency>......
  • ecs离线方式安装ansilbe的rpm包
    1.安装包下载文章背景:因为ecs机器没有连接外网,同时需要安装ansilbe,这时就需要从其他机器将包下载到本地。系统:AlibabaCloudLinux2.1903LTS64位软件包名版本......
  • visual studio 2022离线安装包制作教程
    1、在线下载VisualStudi安装包https://aka.ms/vs/17/release/vs_enterprise.exe  2、在线安装visualsudio22布局 2.1.NETWeb和.NET桌面开发,运行(不选en-US......