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
  • 相关阅读:
    cookie,请求报文,
    ser,ver
    关于 通知的 死循环,
    这读取的好蛋疼,为什么一写 一读就有问题了,不一致了,
    缓存小姐 挡拆,网络请求 不同步 惹的祸,
    viewdidload ,viewwillappear,
    提示输入 用户名 ,密码,--》转
    前端面试
    npm与cnpm
    vue与node和npm关系
  • 原文地址:https://www.cnblogs.com/hougang/p/gitlab.html
Copyright © 2011-2022 走看看