aini 发表于 2018-9-19 08:17:47

centos7搭建gitlab-12266890

  一、安装配置依赖项
  如想使用Postfix来发送邮件,在安装期间请选择’Internet Site’. 您也可以用sendmai或者 配置SMTP服务 并 使用SMTP发送邮件.
  在 Centos7 系统上, 下面的命令将在系统防火墙里面开放HTTP和SSH端口.
  # yum -y install curl policycoreutils openssh-server openssh-clients
  # systemctl enable sshd
  # systemctl start sshd
  # yum -y install postfix
  # systemctl enable postfix
  # systemctl start postfix
  # firewall-cmd --permanent --add-service=http

  # systemctl>  如果不需要开防火墙就:
                     systemctl stop firewalld.service                     systemctl disable firewalld.service  二、添加GitLab仓库,并安装到服务器上
  # curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
  # yum -y install gitlab-ce
  如果不习惯使用命令管道的安装方式, 你可以在这里下载 安装脚本 或者 手动下载您使用的系统相应的安装包(RPM/Deb) 然后安装
  # curl -LJO https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-XXX.rpm
  #这个是目前最新的安装包gitlab-ce-9.2.7-ce.0.el7.x86_64.rpm
  # rpm -ivh gitlab-ce-XXX.rpm
  三、启动GitLab
  # gitlab-ctl reconfigure
  访问: http://192.168.93.129/
  注意事项以及异常故障排查
  ①按照该方式,我安装了一个确实没问题,只不过是英文版。没有经过汉化。
  ②默认安装登录需要重置root密码。可以自己单独设置一个复杂密码后登录。
  ③gitlab本身采用80端口,如安装前服务器有启用80,安装完访问会报错。需更改gitlab的默认端口。
  ④unicorn本身采用8080端口,如安装前服务器有启用8080,安装完访问会报错。需更改unicorn的默认端口。
  ⑤每次重新配置,都需要执行 gitlab-ctl reconfigure 使之生效。
  ⑥日志位置:/var/log/gitlab 可以进去查看访问日志以及报错日志等,供访问查看以及异常排查。
  # gitlab-ctl tail                  #查看所有日志
  # gitlab-ctl tail nginx/gitlab_access.log   #查看nginx访问日志


页: [1]
查看完整版本: centos7搭建gitlab-12266890