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修改为中文。

相关推荐
生活很暖很治愈4 分钟前
Linux——TCP通信
linux·运维·tcp/ip
开开心心就好12 分钟前
小巧绿色免费关机工具,支持定时倒计时
linux·运维·服务器·安全·powerpoint·1024程序员节·foxmail
孫治AllenSun1 小时前
【Linux】配置服务自启动
linux·运维·服务器
小生不才yz2 小时前
【Makefile 专家之路 | 基础篇】03. 规矩方圆:书写规则详解(通配符、文件搜索与伪目标)
linux
Lueeee.2 小时前
Linux下的ULN2003驱动板与28BYJ-48步进电机驱动移植
linux·驱动开发
洛菡夕2 小时前
nginx核心功能
linux·nginx
原来是猿2 小时前
Linux - 基础IO【下】
linux·运维·服务器
xyd陈宇阳3 小时前
面向网络协议初学者的入门指南
linux·运维·网络协议
_DCG_3 小时前
用户态和内核态的区别
linux
肖恭伟3 小时前
QtCreator Linux ubuntu24.04问题集合
linux·windows·qt