I have written that Asp.net Core uses Jenkins + Dockor to achieve continuous integration and automated deployment (1): Jenkins installs this jenkisn installation process, but this article uses docker installation. After the actual use process:* I don't recommend novices to use docker to install jenkins*
Novices who use docker to install jenkins may encounter many problems and consume unnecessary time and energy;
centos:7.2
cpu: 1 core 2G memory 1M bandwidth
Because jenkins is developed in java, javajdk needs to be installed first
sudo yum install java
After installation, check whether the installation is successful
java -version
# Successful installation output
openjdk version "1.8.0_191"
OpenJDK Runtime Environment(build 1.8.0_191-b12)
OpenJDK 64-Bit Server VM(build 25.191-b12, mixed mode)
not necessary. Generally, if you need jenkins to directly pull the code of the git service to build and deploy, you must install it
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
sudo yum install jenkins
vim /etc/sysconfig/jenkins
# Modify the configuration and I changed it to run as root user
$JENKINS_USER="root"
# Modify the listening port I use 7080 here
JENKINS_PORT="7080"
# Modify directory permissions
chown -R root:root /var/lib/jenkins
chown -R root:root /var/cache/jenkins
chown -R root:root /var/log/jenkins
systemctl start jenkins
This is the same as my article https://www.cnblogs.com/xiaxiaolu/p/10041788.html, I won’t repeat it and cut a few pictures
https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins+on+Red+Hat+distributions
https://www.cnblogs.com/stulzq/p/9291237.html
Recommended Posts