GitLab安装与入门
GitLab安装与入门
·
服务器准备: CentOS7 以上版本的服务器,内存 4G
下载地址:
https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-13.10.2-ce.0.el7.x86_64.rpm
其他版本
https://packages.gitlab.com/gitlab/gitlab-ce/el/7/x86_64/gitlab-ce-15.9.0-ce.0.el7.x86_64.rpm
接将此包上传到服务器/opt/module 目录
编写 gitlab 的安装脚本 vim gitlab-install.sh
sudo rpm -ivh /opt/module/gitlab-ce-13.10.2-ce.0.el7.x86_64.rpm
sudo yum install -y curl policycoreutils-python openssh-server cronie
sudo lokkit -s http -s ssh
sudo yum install -y postfix
sudo service postfix start
sudo chkconfig postfix on
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo EXTERNAL_URL="http://gitlab.example.com" yum -y install gitlab-ce
给脚本增加执行权限
chmod +x gitlab-install.sh
开始安装 gitlab-ce
./gitlab-install.sh
初始化 GitLab 服务,大概需要几分钟
gitlab-ctl reconfigure
启动 GitLab 服务
gitlab-ctl start
使用主机名或者 IP 地址即可访问 GitLab 服务,首次登陆之前,需要修改下 GitLab 提供的 root 账户的密码,要求 8 位以上,包含大小写子母和特殊符号
禁止开机自启
systemctl disable gitlab-runsvdir.service
开机自启
systemctl enable gitlab-runsvdir.service
更多推荐
已为社区贡献2条内容
所有评论(0)