美文网首页
centos 安装gitlab

centos 安装gitlab

作者: 青漾 | 来源:发表于2021-07-05 00:18 被阅读0次

1.安装ssh

sudo yum install -y curl policycoreutils-python openssh-server

2.将SSH服务设置成开机自启动,安装命令:

  • sudo systemctl enable sshd *

3.启动SSH服务,
安装命令:

sudo systemctl start sshd

4.接下来,安装Postfix以发送通知邮件,
安装命令:

sudo yum install postfix

5.将postfix服务设置成开机自启动,
安装命令:

sudo systemctl enable postfix

  1. 启动postfix,
    安装命令:

sudo systemctl start postfix

7.添加gitlab镜像

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm

安装gitlab 安装命令:

rpm -i gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm

4.修改gitlab配置文件指定服务器ip和自定义端口:

vim /etc/gitlab/gitlab.rb


修改端口

5.重置并启动GitLab


gitlab-ctl reconfigure

gitlab-ctl restart  

6.添加公钥至gitlab


添加公匙

git remote add origin git@git-node1:root/git_demo.gitxxx

相关文章

网友评论

      本文标题:centos 安装gitlab

      本文链接:https://www.haomeiwen.com/subject/zqcvultx.html