安装Gitlab

来源:互联网 发布:全景补地软件 编辑:程序博客网 时间:2024/06/15 17:27

安装步骤

  1. 根据服务器系统,按照官网步骤安装,本机器为CentOS 6.9,故选择 https://www.gitlab.com.cn/installation/#centos-6

  2. 自定义域名解析,在腾讯云增加 repo.sutpc.org 的解析

  3. 增加nginx对二级域名的解析
    vim /usr/local/nginx/conf/vhost/repo.conf

    server{    listen 80;    server_name repo.sutpc.org;    location / {        proxy_pass http://10.10.2.56:8091;        proxy_set_header Host $host;        proxy_set_header X-Real-IP $remote_addr;        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;    }}
  4. 修改/etc/gitlab/gitlab.rb文件
    vim /etc/gitlab/gitlab.rb,修改访问域名和端口号

  5. 配置并启动GitLab

    sudo gitlab-ctl reconfiguresudo gitlab-ctl restartsudo gitlab-ctl status
  6. 浏览器访问 http://repo.sutpc.org,首次访问会提示修改管理员账号密码,默认管理员账号为root
  7. 大功告成

其他

查看gitlab版本号

cat /opt/gitlab/embedded/service/gitlab-rails/VERSION

原创粉丝点击