zoukankan      html  css  js  c++  java
  • gitlab

    centos7官网安装gitlab

    sudo yum install -y curl policycoreutils-python openssh-server
    sudo systemctl enable sshd
    sudo systemctl start sshd
    sudo firewall-cmd --permanent --add-service=http
    sudo systemctl reload firewalld
    
    sudo yum install postfix
    sudo systemctl enable postfix
    sudo systemctl start postfix
    
    Add the GitLab package repository and install the package
    curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
    sudo EXTERNAL_URL="http://gitlab.example.com" yum install -y gitlab-ce

    配置国内镜像安装源

    vim /etc/yum.repos.d/gitlab-ce.repo
    [gitlab-ce]
    name=gitlab-ce
    baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
    repo_gpgcheck=0
    gpgcheck=0
    enabled=1
    gpgkey=https://packages.gitlab.com/gpg.key

    配置ssl 

    mkdir /etc/gitlab/ssl
    cd /etc/gitlab/ssl
    openssl genrsa -out /etc/gitlab/ssl/gitlab.example.com.key 2048
    openssl req -new -key "gitlab.example.com.key" -out "gitlab.example.com.csr"
    openssl x509 -req -days 3650 -in "gitlab.example.com.csr" -signkey "gitlab.example.com.key" -out "gitlab.example.com.crt"
    openssl dhparam -out dhparams.pem 2048
    chmod 600 *

    vim /etc/gitlab/gitlab.rb

    external_url 'https://gitlab.example.com'
    nginx['redirect_http_to_https'] = true
    nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.example.com.crt"
    nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.example.com.key"
    nginx['ssl_dhparam'] = /etc/gitlab/ssl/dhparams.pem # Path to dhparams.pem, eg. /etc/gitlab/ssl/dhparams.pem

    vim /var/opt/gitlab/nginx/conf/gitlab-httpd.conf

    server {
      listen *:80;
      server_name gitlab.example.com;
    
      rewrite ^(.*)$ https://$host$1 permanent;
    
      server_tokens off; ## Don't show the nginx version number, a security best practice
  • 相关阅读:
    二 关键词关键词扩展(五)
    二 关键词关键词竞争程度判断(三)
    discuz X2.5 门户diy风格模版制作教程
    二 关键词关键词分布(六)
    seo各种跳转
    js 判断未定义
    网站运营赚钱的小心得
    二 关键词核心关键词(四)
    asp实现301跳转的方法
    UVA 11258 String Partition
  • 原文地址:https://www.cnblogs.com/hougang/p/gitlab.html
Copyright © 2011-2022 走看看