yum安装
https://www.jenkins.io/doc/book/installing/linux/#red-hat-centossudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key sudo yum upgrade sudo yum install jenkins java-11-openjdk-devel sudo systemctl daemon-reload
|
rpm安装
wget https://mirrors.tuna.tsinghua.edu.cn/jenkins/redhat-stable/jenkins-2.164.2-1.1.noarch.rpm rpm -ivh jenkins-2.164.2-1.1.noarch.rpm
|
Docker安装Jenkins
/home/docker/jenkins/docker-compose.ymlversion: "3" services: jenkins: image: jenkins/jenkins:lts container_name: jenkins restart: "always" ports: - "8080:8080" - "50000:50000" environment: JAVA_OPTS: -Duser.timezone=Asia/Shanghai volumes: - /home/docker/jenkins/data:/var/jenkins_home - /var/run/docker.sock:/var/run/docker.sock - /usr/bin/docker:/usr/bin/docker - /usr/local/jdk8u292-b10:/usr/local/jdk8u292-b10 - /usr/local/apache-maven-3.8.1:/usr/local/apache-maven-3.8.1
|
mkdir -p /home/docker/jenkins/data cd /home/docker/jenkins docker-compose up -d
|