jenkins学习之master服务器安装
先安装docker
Downloading and running Jenkins in Docker
使用这个:https://hub.docker.com/r/jenkins/jenkins/ 镜像
这里 https://www.jenkins.io/download/ 官方的下载地址,上面可以选择不同的系统的,不同的安装方式的。
1 2 3 4 5 6 7 8 9 10
| docker run -it --name jenkins -p 8080:8080 -p 50000:50000 -v /home/jenkins:/var/jenkins_home jenkins/jenkins:latest
docker run -d --hostname jenkins-master --name jenkins \ -p 8080:8080 -p 50000:50000 \ -e TZ=Asia/Shanghai \ -v /home/jenkins:/var/jenkins_home \ -v /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro \ jenkins/jenkins:latest
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| /usr/lib/systemd/systemd --switched-root --system --deserialize 22 0.4 0:00.00 ├─ /usr/bin/containerd-shim-runc-v2 -namespace moby -id 31848f1d8111f940952e487c18f1046557e3faa1624805d542876c06178d1df6 -address /run/containerd/containerd. 0.4 0:00.00 │ ├─ /usr/bin/containerd-shim-runc-v2 -namespace moby -id 31848f1d8111f940952e487c18f1046557e3faa1624805d542876c06178d1df6 -address /run/containerd/containe 0.4 0:00.00 │ ├─ /usr/bin/containerd-shim-runc-v2 -namespace moby -id 31848f1d8111f940952e487c18f1046557e3faa1624805d542876c06178d1df6 -address /run/containerd/containe 0.0 0:00.01 │ ├─ /usr/bin/tini -- /usr/local/bin/jenkins.sh 7.9 0:16.28 │ │ └─ java -Duser.home=/var/jenkins_home -Djenkins.model.Jenkins.slaveAgentPort=50000 -Dhudson.lifecycle=hudson.lifecycle.ExitLifecycle -jar /usr/share/je 7.9 0:00.00 │ │ ├─ java -Duser.home=/var/jenkins_home -Djenkins.model.Jenkins.slaveAgentPort=50000 -Dhudson.lifecycle=hudson.lifecycle.ExitLifecycle -jar /usr/share 7.9 0:00.00 │ │ ├─ java -Duser.home=/var/jenkins_home -Djenkins.model.Jenkins.slaveAgentPort=50000 -Dhudson.lifecycle=hudson.lifecycle.ExitLifecycle -jar /usr/share 7.9 0:00.00 │ │ ├─ java -Duser.home=/var/jenkins_home -Djenkins.model.Jenkins.slaveAgentPort=50000 -Dhudson.lifecycle=hudson.lifecycle.ExitLifecycle -jar /usr/share 7.9 0:00.00 │ │ ├─ java -Duser.home=/var/jenkins_home -Djenkins.model.Jenkins.slaveAgentPort=50000 -Dhudson.lifecycle=hudson.lifecycle.ExitLifecycle -jar /usr/share 7.9 0:00.00 │ │ ├─ java -Duser.home=/var/jenkins_home -Djenkins.model.Jenkins.slaveAgentPort=50000 -Dhudson.lifecycle=hudson.lifecycle.ExitLifecycle -jar /usr/share 7.9 0:00.00 │ │ ├─ java -Duser.home=/var/jenkins_home -Djenkins.model.Jenkins.slaveAgentPort=50000 -Dhudson.lifecycle=hudson.lifecycle.ExitLifecycle -jar /usr/share 7.9 0:00.00 │ │ ├─ java -Duser.home=/var/jenkins_home -Djenkins.model.Jenkins.slaveAgentPort=50000 -Dhudson.lifecycle=hudson.lifecycle.ExitLifecycle -jar /usr/share 7.9 0:00.00 │ │ ├─ java -Duser.home=/var/jenkins_home -Djenkins.model.Jenkins.slaveAgentPort=50000 -Dhudson.lifecycle=hudson.lifecycle.ExitLifecycle -jar /usr/share 7.9 0:00.00 │ │ ├─ java -Duser.home=/var/jenkins_home -Djenkins.model.Jenkins.slaveAgentPort=50000 -Dhudson.lifecycle=hudson.lifecycle.ExitLifecycle -jar /usr/share 7.9 0:00.00 │ │ ├─ java -Duser.home=/var/jenkins_home -Djenkins.model.Jenkins.slaveAgentPort=50000 -Dhudson.lifecycle=hudson.lifecycle.ExitLifecycle -jar /usr/share
|
1 2 3
| /var/jenkins_home/secrets/initialAdminPassword
|