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



安装成功!

相关推荐
共享家952717 小时前
linux-数据链路层
linux·网络·macos
运维开发王义杰1 天前
YAML:锚点深度解析,告别重复,拥抱优雅的配置艺术
ci/cd·gitlab
CZIDC1 天前
MacOS字体看起来比在 Windows 上更好?
macos
Cosmoshhhyyy1 天前
linux远程部署dify和mac本地部署dify
linux·运维·macos
行星0081 天前
mac 通过homebrew 安装和使用nvm
macos·npm·node.js
2501_928094652 天前
Mac电脑录屏工具 Omi录屏专家(Mac中文)
macos·mac·录屏工具·omi
森之鸟2 天前
Mac chrome浏览器下载DevEco Studio 6.0.0 Beta2失败
前端·chrome·macos
hkNaruto2 天前
【Docker】openEuler 使用docker-compose部署gitlab-ce
docker·容器·gitlab
FairGuard手游加固2 天前
版本更新!FairGuard-Mac加固工具已上线!
macos