centos7 deployment Jenkins
1. Install the required JDK
Jenkins needs to depend on JDK, so install JDK1.8 first
I am using openJDK
Installation command: yum install java-1.8.0-openjdk* -y
2. Get jenkins and install it
1. wget https://pkg.jenkins.io/redhat-stable/jenkins-2.222.3-1.1.noarch.rpm #Get the corresponding version of Jenkins
2. Unzip after downloading: rpm -ivh jenkins-2.222. 3-1.1.noarch.rpm
3. Modify the jenkins configuration
Modify parameters corresponding to Jenkins
vim /etc/sysconfig/jenkins
JENKINS_USER="sss" #修改你需要的用户名
JENKINS_PORT="8887" #因为我装了宝塔,所以端口我设置了8887,根据子深情况进行修改
4. Start Jenkins
Browser access after systemctl start jenkins startup is complete
5. Browser access
URL: server address + port For example: 192.168.0.1: 8888
After a long wait, you will enter the configuration page and follow the prompts to find the corresponding password to enter and log in
After clicking Continue, the following page will appear
6. Mirror source modification
Just choose the first one. Since Jenkins is a foreign source, the download may fail, as follows: At
this time, you need to modify the mirror source:
Edit: vim /var/lib/jenkins/hudson.model.UpdateCenter.xml
will include Replace the url with http://mirror.xmission.com/jenkins/updates/update-center.json, save and exit
I am using annotations
7. Restart jenkins
Command: systemctl restart jenkins.service
and then proceed to the third step