当前位置:网站首页>CI / CD of gitlab continuous integrated development environment

CI / CD of gitlab continuous integrated development environment

2020-11-07 16:43:46 Green tea in summer

One 、 preparation :

  1. download Oracle jdk 、apache maven、Ubuntu-20.04.1、gitlab 、Oracle VM VirtualBox、sshd、xshell、 etc. .
  2. Install according to your own needs Oracle VM VirtualBox And change the installation path .
  3. install Ubuntu( Turn off network setup ) Fast , On the contrary, it's very slow .
  4. Upload the downloaded to Ubuntu Under the system directory , Position yourself .

Two 、 Unzip, download and configure the environment

  1. establish java Installation path directory file
  2. mkdir /usr/local/java
  3. establish maven Installation path directory file
  4. mkdir /usr/local/maven
  5. establish tomcat Installation path directory file
  6. mkdir /usr/local/tomcat
  7. Unzip and copy to the destination folder ( Run at the terminal of uploading installation package or downloading installation package )
  8. tar -zxvf jdk-8u171-linux-x64.tar.gz -C /usr/local/java/
  9. tar -zxvf jdk-8u171-linux-x64.tar.gz -C /usr/local/maven/
  10. tar -zxvf jdk-8u171-linux-x64.tar.gz -C /usr/local/tomcat/
  11. Configuration environment :vi or vim
  12. vi /etc/profile The configuration will appear here Restart failure , End of configuration perform source /etc/profile

    vi ~/.bashrc Configure the whole system

  13. # java Installation path
    export JAVA_HOME=/usr/local/java/jdk1.8.0_151
    export JRE_HOME=${JAVA_HOME}/jre
    export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
    export PATH=${JAVA_HOME}/bin:$PATH
    # maven Installation path
    export M2_HOME=/usr/local/maven/apache-maven-3.6.3
    export PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin

  14. establish maven Local repository

  15. mkdir /usr/local/maven

  16. Set up a local warehouse
  17. vi /usr/local/maven/apache-maven-3.6.3/conf/settings.xml
  18. <localRepository>/usr/local/maven/localRepository</localRepository>
  19.  

    Configure Alibaba cloud remote warehouse

  20. <mirror>
          <id>alimaven</id>
          <name>aliyun maven</name>   
          <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
          <mirrorOf>central</mirrorOf>
          </mirror>

  21.  

    After configuration, verify whether

    root@gitlab:/home/gitlab# mvn -v

    Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
    Maven home: /usr/local/maven/apache-maven-3.6.3
    Java version: 1.8.0_151, vendor: Oracle Corporation, runtime: /usr/local/java/jdk1.8.0_151/jre
    Default locale: zh_CN, platform encoding: UTF-8
    OS name: "linux", version: "5.4.0-52-generic", arch: "amd64", family: "unix"

     

install gitlab

Reference resources gitlab Official website

 

install gitlab

Production dependence gitlab ci/cd file

 

版权声明
本文为[Green tea in summer]所创,转载请带上原文链接,感谢