centos安装gitlablinux
参考安装步骤
https://www.gitlab.com.cn/downloads/#centos7git
1. 安装配置依赖项centos
如想使用Postfix来发送邮件,在安装期间请选择'Internet Site'. 您也能够用sendmai或者 配置SMTP服务 并 使用SMTP发送邮件.浏览器
在 Centos 6 和 7 系统上, 下面的命令将在系统防火墙里面开放HTTP和SSH端口.bash
sudo yum install curl policycoreutils openssh-server openssh-clients
sudo systemctl enable sshd
sudo systemctl start sshd
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld
2. 添加GitLab仓库,并安装到服务器上服务器
curl -sS http://packages.gitlab.cc/install/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce
若是你不习惯使用命令管道的安装方式, 你能够在这里下载 安装脚本 或者 手动下载您使用的系统相应的安装包(RPM/Deb) 而后安装ssh
curl -LJO https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-XXX.rpm
rpm -i gitlab-ce-XXX.rpm
3. 启动GitLabcurl
sudo gitlab-ctl reconfigure
4. 使用浏览器访问GitLabgitlab
首次访问GitLab,系统会让你从新设置管理员的密码,设置成功后会返回登陆界面.post
默认的管理员帐号是root,若是你想更改默认管理员帐号,请输入上面设置的新密码登陆系统后修改账号名.
遇到错误
Error executing action `run` on resource 'execute[semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-7.2.0-ssh-keygen.pp]'
执行如下命令 sudo yum install libsemanage-static libsemanage-devel