System Version:CentOS release 6.7(Final)
1. Download Jenkins
http://pkg.jenkins-ci.org/redhat-stable/
Download the RPM installation package for Jenkins
Current download version: jenkins-1.642.4-1.1.noarch.rpm
2. Use SSH Secure File Transfer to upload to the tmp directory;
3. Enter the tmp directory to install
Execute the command sudo rpm -ih jenkins-1.642.4-1.1.noarch.rpm;
4. After the installation is complete, you need to be familiar with several directories:
/usr/lib/jenkins/jenkins.war --WAR package
/etc/sysconfig/jenkins -- configuration file
/var/lib/jenkins --JENKINS_HOME directory
/var/log/jenkins/jenkins.log -- Jenkins log file
5. Modify the configuration file and enter the /etc/sysconfig/ directory,
Execute the command vim jenkins
Modify the JAVA path, IP address and port number of Jenkins
JENKINS_JAVA_CMD="/app/jdk1.8.0_101/bin/java"
JENKINS_LISTEN_ADDRESS="192.168.2.50"
JENKINS_PORT="12080"
6. Start Jenkins
Execute the command sudo service jenkins start
Other commands {start|stop|status|try-restart|restart|force-reload|reload|probe};
7. Uninstall Jenkins
yum remove jenkins