gitlab安装

步骤1:更新系统并安装依赖项

apt-get update
sudo apt upgrade -y
apt-get install -y curl openssh-server ca-certificates

步骤2:邮件配置

选择Internet那一项,不带Smarthost的

apt-get install -y postfix

步骤3:添加GitLab CE存储库

免费版
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | bash
企业版
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | bash

步骤4:安装GitLab CE

sudo apt-get update
sudo apt-get install gitlab-ce 或者 sudo apt-get install gitlab-ee

---------或
sudo apt update

sudo EXTERNAL_URL="http://xx.xxx.com" apt -y install gitlab-ce

步骤5:更新配置

在执行命令之前,将xx.xxx.com替换为你的实际域名。完成后,通过运行以下命令启动GitLab实例:

sudo gitlab-ctl reconfigure

步骤6:重新启动

sudo gitlab-ctl restart

步骤7:打开 sshd 和 postfix 服务

service sshd start
service postfix start

步骤8:查看gitlab服务器状态

sudo gitlab-ctl status

 

附:GitLab Administrations

每当你编辑GitLab配置文件 - /etc/gitlab/gitlab.rb时,通过运行以下命令重新配置GitLab服务:

sudo gitlab-ctl reconfigure 

sudo gitlab-rake gitlab:check

要检查所有GitLab服务的状态,请使用:

sudo gitlab-ctl status

要停止所有GitLab服务,请使用:

sudo gitlab-ctl stop

要重新启动所有GitLab服务,请使用:

sudo gitlab-ctl restart

你可以通过在最后证明服务名称来重新启动特定服务:

$ sudo gitlab-ctl restart logrotate

ok: run: logrotate: (pid 22824) 0s

 

 

Linux 卸载gitlab

  1. 执行gitlab-ctl stop 停止服务;
  2. 执行rpm -e gitlab-ce 卸载gitlab;
  3. 执行ps aux | grep gitlab 查看当前进程中是否还有gitlab进程;如果有执行 kill -9 ****.
  4. 执行find / -name gitlab | xargs rm -rf 删除所有相关文件;
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值