- 安装
- 申请证书
centos8: 推荐cpu核心数量为4核,推荐内存大小为4GB。
vim /etc/yum.repos.d/gitlab-ce.repo [gitlab-ce] name=Gitlab CE Repository baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/ gpgcheck=0 enabled=1
yum -y install policycoreutils openssh-server openssh-clients postfix #安装相关依赖 curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash #添加GitLab包存储库。 yum install -y gitlab-ee #安装最新Gitlib
vim /etc/gitlab/gitlab.rb #x修改服务器地址,改成自己IP
external_url = '你的IP:端口'
gitlab-ctl reconfigure #重启服务
cat /etc/gitlab/initial_root_password #查看root的密码 gitlab-rake "gitlab:password:reset" #重置密码命令,会提示输入用户名,密码
访问:IP:端口
GitLab常用命令 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 # 查看日志;申请证书



