Mac M1 Parallels Debian10 Install Gitlab

安装Debian10

Debian10百度网盘下载链接: https://pan.baidu.com/s/1ovBWIhTpljIVOxEkjJQjkQ?pwd=6666 提取码: 6666

--来自百度网盘超级会员v7的分享

bash 复制代码
# 1.install
# 2.localtion: 中国 → 语言: 中文(简体)
# 3.网络 默认、自动配置
# 4.主机名域名(随意),这里主机名叫gitlab,域名localhost
# 5.root密码(随意),这里设置为123456
# 6.设置新用户及新用户名称和密码(强制), 这里随便写了个zhinian/123456
# 7.时区时间配置默认或自改
# 8.使用整盘(可自操作分盘)
# 9.不需要扫描其他CD/DVD
# 10.网络镜像默认、更新系统默认回车即可, 不参与调查
# 11.选择安装软件(自选),这里我选择SSH server(必须)、standard system utilities(空格勾选或取消勾选)
# 12.继续回车完成安装

开启root远程登录

bash 复制代码
# 安装sudo、curl、vim、wget
apt install sudo curl vim wget -y
# 启用root 远程登陆、编辑 sshd 配置文件
vim /etc/ssh/sshd_config
# 修改或添加内容(按i进入编辑,修改完,按ESC,并输入:wq保存退出)
# 添加
vim /etc/ssh/sshd_config
# 应用并生效、重启ssh服务
systemctl restart sshd.service

一、前置配置

bash 复制代码
# 更新apt
sudo apt update

# 安装依赖: 对于 Postfix 邮件服务器,请确保邮件配置选项为 Internet Site. 邮件名称随意
apt install ca-certificates curl openssh-server postfix

二、安装Gitlab

bash 复制代码
root@gitlab:~# mkdir gitlab-ce
root@gitlab:~# cd gitlab-ce

root@gitlab:~/gitlab-ce# wget https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh
--2024-01-07 20:12:30--  https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh
正在解析主机 packages.gitlab.com (packages.gitlab.com)... 	172.64.148.245, 104.18.39.11, 2606:4700:4400::ac40:94f5, ...
正在连接 packages.gitlab.com (packages.gitlab.com)|172.64.148.245|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:6865 (6.7K) [text/install_instructions]
正在保存至: "script.deb.sh"

script.deb.sh                             100%[===================================================================================>]   6.70K  --.-KB/s  用时 0.001s  

2024-01-07 20:12:36 (10.2 MB/s) - 已保存 "script.deb.sh" [6865/6865])

root@gitlab:~/gitlab-ce# bash script.deb.sh
# xxxxxx...
The repository is setup! You can now install packages.

# 完成存储库的设置后,执行命令安装 GitLab CE
apt install gitlab-ce
bash 复制代码
It looks like GitLab has not been configured yet; skipping the upgrade script.
尚未配置有效主机名, 需要进行必要的配置

# 要优化 GitLab 安装,需要编辑 github.rb 文件,我们将使用 vim 编辑器打开文件
vim /etc/gitlab/gitlab.rb

# 更改
# external_url 'http://gitlab.example.com'
external_url 'http://gitlab.zhinian.com'

# letsencrypt['contact_emails'] = [] # This should be an array of email addresses to add as contacts
letsencrypt['contact_emails'] = ['wangfeihu_ly@163.com']

# 保存文件并重新配置 GitLab 安装
gitlab-ctl reconfigure


设置gitlab root管理员密码

bash 复制代码
# gitlab忘记root密码解决方法

# 进入gitlab rails控制台
gitlab-rails console

# 输入以下命令重置root密码(zhinian123456)
user = User.where(id: 1).first
user.password = 'new_password'
user.password_confirmation = 'new_password'
user.save!
说明:将 new_password 替换为您要设置的新密码

# 退出gitlab rails控制台
exit

# 重启gitlab使更改生效
gitlab-ctl restart

三、访问测试

点击访问: http://gitlab.zhinian.com



安装成功!

相关推荐
fhf4 小时前
2025年了你会卸载Macbook上的应用吗?
macos·shell
归辞...5 小时前
「iOS」——内存五大分区
macos·ios·cocoa
穆雄雄8 小时前
备份一下我的 mac mini 的环境变量配置情况
macos
不念霉运12 小时前
2025 Gitee vs. GitLab:全面对比与选择指南
gitee·gitlab
水瓶_bxt12 小时前
创建 GitLab Runner 使用CICD自动化部署容器
eureka·自动化·gitlab
秃然想通20 小时前
mac电脑搭载c、c++环境(基于vs code)
macos
归辞...21 小时前
「iOS」——GCD其他方法详解
macos·ios·cocoa
啊啊啊~~1 天前
新mac电脑软件安装指南(前端开发用)
macos·node·n·oh my zsh·solarized
lm down1 天前
ComfyUI中运行Wan 2.1工作流,电影级视频,兼容Mac, Windows
人工智能·macos·ai作画·视频
天安彩1 天前
mac下 vscode 运行 c++无法弹出窗口
c++·vscode·macos·clang