Deploy Jenkin on centos7

Centos7 deploy Jenkins#

2018.08.08 14:42:26 Word count 381 Reading 1022

Disclaimer: This article is just a test plug-in, no script attachment, can be used as a reference

1. Configure and install Jenkins

Go to the jenkins official website https://jenkins.io/index.html to download the jenkins installation package

There are two types of jenkins installation packages, one is LTS and the other is Weekly. LTS is a stable version, Weekly will be updated once a week, currently I choose LTS

Download the rpm package and install the Jenkins rpm package

rpm -ivh jenkins-2.107.3-1.1.noarch.rpm

(1) View the location of the Jenkins installation package

rpm -ql jenkins

(2) Add my jdk directory to the following files

vim /etc/init.d/jenkins

Add the corresponding jdk directory statement, among which the red statement needs to be added

/etc/alternatives/java

/usr/lib/jvm/java-1.8.0/bin/java

/usr/lib/jvm/jre-1.8.0/bin/java

/usr/lib/jvm/java-1.7.0/bin/java

/usr/lib/jvm/jre-1.7.0/bin/java

/usr/bin/java

/usr/local/jdk/jdk1.8.0_161/bin/java

(3) Modify Jenkins port

vim/etc/sysconfig/jenkins

JENKINS_PORT="8888"

(4) Open the firewall of port 8888

firewall-cmd --zone=public --add-port=8888/tcp --permanent

firewall-cmd --reload

(5) Start Jenkins

service jenkins start

Shut down Jenkins

service jenkins stop

Restart Jenkins

service jenkins restart

Note: Encountered the following error during startup:

Starting jenkins (via systemctl):  Warning: jenkins.service changed on disk. Run 'systemctl daemon-reload' to reload units.

solution

systemctl daemon-reload

(6) Type ip+port in the browser to open the Jenkins webpage, and the following picture appears

http://ip:8888

(7) Obtain the local administrator password

cat /var/lib/jenkins/secrets/initialAdminPassword

Choose to install recommended plugins


2. Build the project

New task-build a free style software project

( adsbygoogle = window.adsbygoogle || []).push({});

Recommended Posts

Deploy Jenkin on centos7
Deploy vuepress on centos7
Centos7.6 deploy django+nginx+uwsgi
CentOS 7 deploy OpenLDAP+FreeRadius
Kickstart+PXE automatically deploy CentOS6.6
Install Docker on Centos7
Deploy GitBook under CentOS7
install LNMP on centos7.4
Build k8s1.9.9 on centos7
Install Java on Centos 7
Xfs configuration on centos7
Configure Ocserv on CentOS 6
Nodejs install on centos7
Install FFmpeg on CentOS 8
Install RabbitMQ on CentOS 7
Install Node.js on Centos
CentOS 6.8 deploy zookeeper cluster
CentOS 7 deploy saltstack service
Maven install on centos7
Install MongoDB on CentOS 7
Install Surelog on CentOS8
Openjdk install on centos7
Install Jenkins on centos7
Use RapidSVN on CentOS7
Centos6.8 deploy vnc service
install RabbitMQ on centos
Install RabbitMQ on CentOS 7
install Docker on centos6.5
Install Elasticsearch 6 on centos7
Install RabbitMQ on CentOS7
CentOS7 deploy vsftp (FTP) service
Install mysql online on centos
Install ElasticSearch 7.x on CentOS 7
Glusterfs cluster installation on Centos7
Build MariaDB replication on CentOS
CentOS 7.2 deploy Node.js development environment
Install MySQL 8.0.16 on Linux Centos
Deployment of graphite on centos7
Install docker transfer on Centos7
CentOS 7.2 deploy mail server (Postfix)
Install docker on Centos system
CentOS7.7 deploy k8s (1 master + 2 node)
Install Zabbix 3.4 based on CentOS 7
install virtualbox on centos server
Docker EE installation on centos7
Install Nginx server on CentOS 7
How to install jdk1.8 on centOS7
How to install MySQL on CentOS 8
CentOS7.7 deploy k8s (3 master + 3 node + 1 client)
Common Linux operations (based on centos7)
Install JDK8 in rpm on CentOS7
Deploy JobConverter + Ibreoffice environment on Ubuntu
How to install Memcached on CentOS 8
Install MATE or XFCE on CentOS 7
How to install R on CentOS 8
CentOS7.7 deploy k8s + Prometheus (1 master + 2 node)
How to install FFmpeg on CentOS 8
How to install Virtualbox on CentOS 8
Configure rsyslog log client on CentOS
CentOS 8 (2)
How to install TensorFlow on CentOS 8