0
点赞
收藏
分享

微信扫一扫

GitLab安装

五殳师兄 2022-04-14 阅读 82
git

Gitlab下载地址:

国外:gitlab/gitlab-ce - Packages · packages.gitlab.com

国内清华镜像:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/

注意:虚拟机需要2G内存2个CPU

  • 关闭centos的防火墙,并设置不在开机启动

systemctl stop firewalld.service

systemctl disable firewalld.service

  • 安装依赖软件openssh(ssh协议的服务端和客户端)
 yum install -y curl policycoreutils-python openssh-server cronie 
安装lokkit
yum -y install lokkit
启动ssh
lokkit -s http -s ssh 
设置ssh开机自启动
systemctl enable sshd
 
三、安装依赖软件postfix(邮件传输代理软件)
 yum -y install postfix
设置postfix自启动
 systemctl enable postfix
启动postfix
 systemctl start postfix
 
四、将Gitlib rpm包上传到centos root目录,安装rpm
rpm -ivh /root/gitlab-ce-13.5.3-ce.0.el7.x86_64.rpm
出现下列图标表示安装成功
 
 
 
 
上述步骤完成后重启centOS
五、配置gitlab(此步骤执行时间较长20-30分钟左右,需耐心等待)
gitlab-ctl reconfigure
 
六、启动gitlab
gitlab-ctl start 
 
七、设置gitlib开机自启动
systemctl enable gitlab-runsvdir.service
 
 
 
  • 安装完成后,使用服务器IP即可打开gitlab网页。并设置gitlab root用户密码。
 
九:使用root账号及密码登录
 
十、可以点击NewProject创建新项目
 
 
 
gitlib基本维护命令:
sudo gitlab-ctl start    # 启动所有 gitlab 组件;

sudo gitlab-ctl stop        # 停止所有 gitlab 组件;

sudo gitlab-ctl restart        # 重启所有 gitlab 组件;

sudo gitlab-ctl status        # 查看服务状态;

sudo gitlab-ctl reconfigure        # 启动服务;

sudo vim /etc/gitlab/gitlab.rb        # 修改默认的配置文件;

gitlab-rake gitlab:check SANITIZE=true --trace    # 检查gitlab;

sudo gitlab-ctl tail        # 查看日志; 
举报

相关推荐

0 条评论