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

相关推荐
Ares-Wang3 小时前
Linux》》systemd 、service、systemctl daemon-reload、systemctl restart docker
linux·运维·docker
阿拉斯攀登5 小时前
从入门到实战:CMake 与 Android JNI/NDK 开发全解析
android·linux·c++·yolo·cmake
风曦Kisaki8 小时前
# Linux 磁盘查看命令详解:df 与 du
linux·运维·网络
路溪非溪8 小时前
Linux中gpio子系统的现代接口
linux·arm开发·驱动开发
文静小土豆9 小时前
Centos7负载异常过高排查思路(Load Average)
linux
Deitymoon9 小时前
linux——原子操作
linux
亚空间仓鼠9 小时前
OpenEuler系统常用服务(四)
linux·运维·服务器·网络
昪彧翀忞10 小时前
dhcp小实验
linux·服务器·网络
bukeyiwanshui10 小时前
20260407系统间复制文档
linux
23.11 小时前
【Linux】grep -F 及 双横线--的妙用
linux·命令模式