1、CentOS上,以下命令也将在系统防火墙中打开HTTP和SSH访问。
sudo yum install curl policycoreutils openssh-server openssh-clients -y 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、在 https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/找到需要的版本 下载 使用rpm安装
curl -LJO https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-XXX.rpm/download rpm -i gitlab-ce-XXX.rpm
3、配置并启动GitLab
sudo gitlab-ctl reconfigure
修改root账号密码方法
官方修改密码:(http://docs.gitlab.com/ce/security/reset_root_password.html)
root用户下执行
gitlab-rails console production
[root@svr34 bin]# gitlab-rails console production Loading production environment (Rails 4.2.5.2) irb(main):001:0> user = User.where(id: 1).first => #<User id: 1, email: "admin@example.com", ... irb(main):002:0> user.password=12345678 => 12345678 irb(main):003:0> user.password_confirmation=12345678 => 12345678 irb(main):004:0> user.save! => true irb(main):005:0> quit