虚拟机 centos7安装 Gitlab私服
1 安装依赖
yum install -y curl policycoreutils-python openssh-server perl
systemctl enable sshd
systemctl start sshd
2 配置镜像
curl -fsSL https://packages.gitlab.cn/repository/raw/scripts/setup.sh | /bin/bash
3.安装(xxx填写自己虚拟机的ip地址)
EXTERNAL_URL="http://xxx" yum install -y gitlab-jh
root用户的初始密码在/etc/gitlab/initial_root_password文件里查看
gitlab常用命令
gitlab-ctl start # 启动所有 gitlab 组件;
gitlab-ctl stop # 停止所有 gitlab 组件;
gitlab-ctl restart # 重启所有 gitlab 组件;
gitlab-ctl status # 查看服务状态;
gitlab-ctl reconfigure # 启动服务;
vi /etc/gitlab/gitlab.rb # 修改默认的配置文件;
gitlab-ctl tail # 查看日志;
这时候在网页上直接输入虚拟机的ip地址就可以直接访问gitlab
用户名输入root,密码使用刚刚查到的进行登录
搞定!!!