CentOS 7 deployment Jenkins continuous integration environment
Jenkins is a popular open source CI (continuous integration) tool, widely used in project development, deployment, and automation.
This article will guide you through the process of installation on CentOS 7 Jenkins server instance.
1. Prerequisites
Before you continue, you must have:
- Scratch deployed CentOS 7 server instance.
- root privileges
2. Deploy Ali cloud sources
3. Install Java
Before installing Jenkins, you need to install a Java Virtual Machine on the system. Here, let's use yum to install the latest JDK:
After the installation is complete, you can confirm by running the following command:
4. Installation Jenkins
Use the official yum
install the latest stable version of Jenkins:
Jenkins started the service and set to run at startup:
To allow visitors to Jenkins, you need to allow incoming traffic on port 8080:
Now, go to the following address from a browser by accessing Jenkins:
4.1. Basic Configuration
-
Unlock jenkins
Follow the prompts to use the
cat
View command password -
Custom Jenkins
Jenkins plugin automatically download and install from the network, because the plug-in server in a foreign country, will produce network latency issues cause the installation to fail.
So choose
选择插件来安装
. This time we will not select any plug-in for quick installation, the latter through插件管理器
plug-in installation required. -
Create the first administrator user
-
Examples of configuration
You can modify the address and port, no proposed changes. Keep the default.
-
Plug-in installation
System Management -> Manage Plugins -> optional plug-ins -> Filters
HTML Publisher
Workspace Cleanup
Subversion
Startup Trigger
Groovy
5. Deploy Python 3
Deployment compiler environment
Python official website to download the latest version of the Python source code.
In this paper, Python-3.7.2 Case Study
Python Configuration
Build and install Python 3
Confirm successful deployment Python 3
Installation of automated library-related dependence Python
6. Jenkins related
-
Profiles
/etc/sysconfig/jenkins
-
Enabled by default
8080
-
Journal
/var/log/jenkins/jenkins.log
-
service status
systemctl status jenkins
-
Start Service
systemctl start jenkins
-
Out of service
systemctl stop jenkins
-
Restart Service
systemctl restart jenkins