Gitlab部署流程

安装准备

需要开启ssh:(已开启可跳过)

复制代码
sudo systemctl status sshd
sudo systemctl enable sshd
sudo systemctl start sshd

防火墙开放http、https服务:(已关闭防火墙可跳过)

复制代码
sudo systemctl status firewalld
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo systemctl reload firewalld

rpm 包安装

下载地址:https://packages.gitlab.com/gitlab/gitlab-ce

编写安装脚本

复制代码
cd ~/bin

vim gitlab-install.sh

脚本内容如下:

复制代码
sudo yum install -y curl policycoreutils-python openssh-server perl

sudo rpm -ivh /opt/software/gitlab-ce-16.2.1-ce.0.el7.x86_64.rpm

sudo yum install -y postfix

sudo systemctl enable postfix

sudo systemctl start postfix

修改脚本执行权限并执行

复制代码
chmod +x gitlab-install.sh
sh gitlab-install.sh

执行初始化

安装完成后,需要执行初始化

复制代码
sudo gitlab-ctl reconfigure

启停命令

复制代码
sudo gitlab-ctl start

停止命令

复制代码
sudo gitlab-ctl stop

重装需要彻底卸载

1 卸载gitlab

复制代码
 sudo rpm -e gitlab-ce-16.2.1-ce.0.el7.x86_64

2 删除gitlab文件

复制代码
sudo rm -rf /etc/gitlab
sudo rm -rf /var/opt/gitlab
sudo rm -rf /opt/gitlab

修改 root 密码

访问web界面:默认使用服务器80端口

账号root,密码将随机生成并在 /etc/gitlab/initial_root_password 中保存24 小时。

复制代码
sudo cat /etc/gitlab/initial_root_password

设置简体中文

在UserSettings 里的Preferences修改为中文。

相关推荐
CAFEBABE 3417 小时前
linux离线安装docker并启动
linux·docker·eureka
OnlyEasyCode18 小时前
快速上手!查看、拷贝、编辑、远程连接Linux命令
linux·运维·服务器
dualven_in_csdn18 小时前
UDP广播接收小优化
linux·运维·服务器
Xの哲學19 小时前
Linux二层转发: 从数据包到网络之桥的深度解剖
linux·服务器·算法·架构·边缘计算
石像鬼₧魂石19 小时前
Termux ↔ Windows 靶机 反向连接实操命令清单
linux·windows·学习
啃火龙果的兔子19 小时前
如何将D:\BaiduNetdiskDownload所有目录下的所有图片复制提取到D:\bacPic
linux·运维·服务器
FF-Studio20 小时前
RTX 5060 Ti Linux 驱动黑屏避坑指南:CUDA 13.1, Open Kernel 与 BIOS 设置
linux·运维·服务器·cuda
坐吃山猪20 小时前
BrowserUse14-源码-ScreenShot模块-整理
linux·数据库·python
Jelly-小丑鱼20 小时前
Linux搭建syslog日志服务器
linux·服务器·docker·日志服务器·syslog服务器
yilan_n20 小时前
在Linux下使用Termony搭建HNP自验证环境全指南
linux·harmonyos·termony·hnp·命令行适配