Get the App
SLTechnology News&Howtos  ›  Servers  › 

Installation tutorial for GitLab and Jenkins

Shulou Source: shulou.com Published: 2022-06-03 06:05:02 09月21日 Update

Gitlab installation instructions:

1 the best running memory is 4 GB CPU 2 core.

2 pay attention to the running port, do not conflict with the port

3 this installation is implemented in Docker-Compose, so you need to install Docker-Compose. This installation method requires Baidu.

> vim docker-compose.yml / / create a compose file version: '2'services: gitlab: image:' gitlab/gitlab-ce:latest' container_name: gitlab restart: always hostname: 'gitlab.aiitle.com' environment: GITLAB_OMNIBUS_CONFIG: | external_url' http://gitlab.aiitle.com:8929' gitlab_rails ['gitlab_shell_ssh_port'] = 2224 gitlab_rails ['time_zone'] =' Asia/Shanghai' ports:-'8929 gitlab_rails 8929'-'2224 volumes: -'. / config:/etc/gitlab' -'. / logs:/var/log/gitlab' -'. / data:/var/opt/gitlab'Gitlab startup process

1 execute command: docker-compose up-d

2 you need to wait a long time, because you need to pull the image, and you need to deploy automatically for a period of time. Just wait patiently.

3 my port here is: 8929, so the way I access it is: http://IP:8929

4 after the installation is completed, if the access is 502, you still need to wait and refresh several times.

5 tuning, please do your own Baidu.

Jenkins installs vim docker-compose.yml / / to create the compose file for Jenkins version: '3'services: jenkins: image:' jenkins/jenkins:lts' container_name: jenkins restart: always environment:-'JAVA_OPTS=-Duser.timezone=Asia/Shanghai' volumes: -' / etc/localtime:/etc/localtime' ports:-'8928 JAVA_OPTS=-Duser.timezone=Asia/Shanghai' volumes 8080'-'50000 compose 5000' volumes: -'. / data : / var/jenkins_home'Jenkins start the process:

1 execute command: docker-compose up-d

2 you need to wait a long time, because you need to pull the image, and you need to deploy automatically for a period of time. Just wait patiently.

3 my port number: 8928, so my access method is: http:// IP+8928

4 access will require you to enter a password, get the command: find /-name initialAdminPassword to find this file and open the file, copy the password to the web browser.

5 install the recommended plug-in very slowly: find the configuration file of Jenkins default.json and use the replacement command: $sed-I 's/http:\ /\ / updates.jenkins-ci.org\ / download/https:\ /\ / mirrors.tuna.tsinghua.edu.cn\ / jenkins/g' default.json & & sed-I' s/http:\ / www.google.com/https:\ /\ / www.baidu.com/g' default.json

6 execute command: docker-compose restart

Summary

At this point, GitLab + Jenkins is installed.

Tags: Commands files time ports patience passwords methods methods processes mirroring runs memory slogans plug-ins preferably browsers conflicts recommendations browsing input Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Linux Apple Huawei MariaDB