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



安装成功!

相关推荐
HIT_Weston12 小时前
47、【Ubuntu】【Gitlab】拉出内网 Web 服务:Nginx 事件驱动分析(一)
前端·ubuntu·gitlab
极简之美17 小时前
Mac 远程连接 Windows 简明教程(2025 实测版)
windows·macos
q***046319 小时前
[golang][MAC]Go环境搭建+VsCode配置
vscode·macos·golang
斌蔚司李20 小时前
笔记本、台式机、平板二合一?Mac、Win、Linux?
linux·macos·电脑
lichong95121 小时前
harmonyos 大屏设备怎么弹出 u 盘
前端·macos·华为·typescript·android studio·harmonyos·大前端
打工人11121 小时前
安卓Android 获取mac地址及sn
android·macos
飞火流星0202721 小时前
MacOS 12(Monterey )PG安装通关指导
macos·postgresql16·mac安装pg·mac brew安装pg16
喵霓1 天前
mac系统的环境变量-bash_profile
开发语言·macos·bash
HIT_Weston1 天前
49、【Ubuntu】【Gitlab】拉出内网 Web 服务:http.server 单/多线程分析(一)
前端·ubuntu·gitlab
Bruce_Liuxiaowei1 天前
[特殊字符] Mac 高效排查:使用 lsof 查找和管理端口占用进程
网络·macos