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

相关推荐
NiKo_W8 分钟前
Linux 开发工具(1)
linux·运维·服务器
笑口常开xpr14 分钟前
Linux动静态库开发基础:静态库与动态库的编译构建、链接使用及问题排查
linux·c语言·动态库·静态库
艾莉丝努力练剑39 分钟前
【C++】类和对象(下):初始化列表、类型转换、Static、友元、内部类、匿名对象/有名对象、优化
linux·运维·c++·经验分享
风_峰1 小时前
PuTTY软件访问ZYNQ板卡的Linux系统
linux·服务器·嵌入式硬件·fpga开发
数智顾问1 小时前
从ENIAC到Linux:计算机技术与商业模式的协同演进——云原生重塑闭源主机,eBPF+WebAssembly 双引擎的“Linux 内核即服务”实践
linux
-SGlow-1 小时前
Linux相关概念和易错知识点(45)(网络层、网段划分)
linux·运维·服务器·网络
三体世界1 小时前
测试用例全解析:从入门到精通(1)
linux·c语言·c++·python·功能测试·测试用例·测试覆盖率
过尽漉雪千山1 小时前
Flink1.17.0集群的搭建
java·大数据·linux·flink·centos
csdn_aspnet1 小时前
Windows、Linux 系统 nodejs 和 npm 版本更新及错误修复
linux·windows·npm·node.js
潘潘潘潘潘潘潘潘潘潘潘潘2 小时前
【MySQL】从零开始学习MySQL:基础与安装指南
linux·运维·服务器·数据库·学习·mysql