gitlab CI / CD deployment

  1. Install dependencies, run commands

     sudo apt-get install curl openssh-server ca-certificates postfix
    
  2. After the execution is complete, mail configuration, select the Internet that one (without the Smarthost)

 
gitlab1.png
  1. Using mirror Tsinghua University https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/ to the main installation.
    First Trust GitLab the GPG public key:
    curl https://packages.gitlab.com/gpg.key 2> / dev / null | sudo APT-Key the Add - &> / dev / null
  2. Using the root user sudo su, vim open file /etc/apt/sources.list.d/gitlab-ce.list, a line is added following
    the deb https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu xenial main
  3. 安装 gitlab-ce:
    sudo apt-get update
    sudo apt-get install gitlab-ce
  4. Run
    sudo gitlab-ctl reconfigure
  5. Open sshd service and postfix
    Service sshd Start
    Service Start postfix
  6. To make GitLab Community Edition Web interface can be accessed through the network, we need to allow port 80 through the firewall, this port is the default port GitLab Community Edition. To do this, run the following command
    sudo iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
  7. Check whether GitLab already installed and running correctly, enter the following command
    sudo gitlab-ctl status
  8. If the obtained similar to the following results, then GitLab normal operation
    RUN: gitlab-Workhorse: (PID 1148) 884s; RUN: log: (PID 1132) 884s
    RUN: logrotate: (PID 1150) 884s; RUN: log: (PID 1131 ) 884s
    RUN: nginx: (pid 1144) 884s; RUN: log: (pid 1129) 884s
    RUN: PostgreSQL: (pid 1147) 884s; RUN: log: (pid 1130) 884s
    RUN: Redis: (pid 1146) 884s; RUN: log: (PID 1133) 884s
    RUN: sidekiq: (PID 1145) 884s; RUN: log: (PID 1128) 884s
    RUN: Unicorn: (PID 1149) 885s; RUN: log: (PID 1134) 885s
  9. In the address bar of your browser: http: //127.0.0.1: 8080, you can access the Web page GitLab




Author link: https: //www.jianshu.com/p/92f97939e33a

Guess you like

Origin www.cnblogs.com/bobokekemeile/p/11315574.html