The company found that manual deployment is often required , and then one day I heard the word automatic deployment and wondered if there is any tool that can automatically deploy projects. It is best to automatically deploy the front and rear ends to generate docker images for easy management. Finally, after my various screenings, I found that jenkins is used the most, and I just do it. At first, after installing jenkins with docker, I found that jenkins has a strong dependence on the build environment, so I gave up the idea of running jenkins with docker. The following introduces the method of installing jenkins on centos
1. See the document installation
2. Install the long-term support release
Every 12 weeks an LTS (Long Term Support) release is selected from the regular release stream as the stable release for that time period. It can be installed from the yum repository of redhat-stable.
sudo 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 epel-release java-11-openjdk-devel
sudo yum install jenkins
sudo systemctl daemon-reload
3. Start jenkins after installation
systemctl start jenkins
There is a firewall that needs to open port 8080
# 开启端口
firewall-cmd --zone=public --add-port=8080/tcp --permanent
# 重载配置
firewall-cmd --reload
Access ip:8080
4. View the initial password
cat /var/lib/jenkins/secrets/initialAdminPassword
5. Enter and install recommended applications, or manually
After everything is done, set the password of the administrator account and start using it all the way to next
6. The final construction is completed
The next step is to build the environment and configure the environment
This article was originally created by " Cheng Ge Blog " and complies with the CC 4.0 BY-SA copyright agreement. For reprinting, please attach the original source link and this statement.
Original link: Build Jenkins automated deployment tool on the server