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



安装成功!

相关推荐
xingxing_F几秒前
Beyond Compare 5 for Mac 好用的文件对比工具
macos
一张假钞1 小时前
Mac OS 安装 VirtualBox
macos·virtualbox
哦豁灬1 小时前
macOS 基本使用
macos
aerror3 小时前
如何解压一个MacOs PKG 安装包修改内容后重新打包
macos
猫头虎3 小时前
openAI发布的AI浏览器:什么是Atlas?(含 ChatGPT 浏览功能)macOS 离线下载安装Atlas完整教程
人工智能·macos·chatgpt·langchain·prompt·aigc·agi
fukai77223 小时前
uTools 最新版优化macOS 26 高 GPU 占用问题
macos
Cosmoshhhyyy3 小时前
macOS环境安装jupyter notebook(极简版)
ide·macos·jupyter
夕秋一梦3 小时前
mac 安装 dmg 格式程序,打开显示已损坏问题
macos
AAA小肥杨6 小时前
Mac 从零开始配置 VS Code + Claude/Codex AI 协同开发环境教程
人工智能·macos·ai·mcp
2501_915921436 小时前
掌握 iOS 26 App 性能监控,从监测到优化的多工具组合流程
android·macos·ios·小程序·uni-app·cocoa·iphone