Ubuntu 20上安装 gitlab git 服务器

官方的建议是使用脚本直接执行安装,对于网络不好的情况,还是直接下载安装包吧。

下载安装包,访问链接:

gitlab/gitlab-ce - Packages · packages.gitlab.com

这里选择最新版本, gitlab-ce_14.7.3-ce.0_arm64.deb

Ubuntu 20上安装 gitlab git 服务器_第1张图片

 在这里选择合适自己Linux系统的版本

点击 进行,选择进行安装

Ubuntu 20上安装 gitlab git 服务器_第2张图片

curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash

 在执行:

sudo apt-get install gitlab-ce=14.7.3-ce.0

出现以下提示,表示安装成功

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


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

修改配置文件

vim /etc/gitlab/gitlab.rb

修改以下信息

external_url 'http://192.168.2.61:80'
......
gitlab_rails['time_zone'] = 'Asia/Shanghai'
gitlab_rails['gitlab_email_from'] = '[email protected]'
......
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.163.com"
gitlab_rails['smtp_port'] = 25
gitlab_rails['smtp_user_name'] = "[email protected]"
gitlab_rails['smtp_password'] = "111111" # 客户端授权密码
gitlab_rails['smtp_domain'] = "163.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
......
user["git_user_email"] = "[email protected]"

只要修改配置文件就要reconfigure

sudo gitlab-ctl reconfigure
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!

出现上面表示成功了,默认密码根据提示保存在

 sudo cat /etc/gitlab/initial_root_password

访问web页面 

Sign in · GitLabicon-default.png?t=M1H3http://192.168.2.61/users/sign_in

 账号/密码  root /  密码在文件里面复制出来 Ubuntu 20上安装 gitlab git 服务器_第3张图片

Gitlab设置中文界面

Ubuntu 20上安装 gitlab git 服务器_第4张图片

 Ubuntu 20上安装 gitlab git 服务器_第5张图片

完成

 

你可能感兴趣的:(git,ubuntu,git)