1. Download RPM Package to local http://pkg.jenkins-ci.org/
2. Use the RPM Package installation command under Linux:
sudo rpm-ih jenkins-1.562-1.1.noarch.rpm
After the automatic installation is complete:
/usr/lib/jenkins/jenkins.war War Pack
/etc/sysconfig/jenkins configuration file
/var/lib/jenkins/the default Jenkins_home directory
/var/log/jenkins/jenkins.log Jenkins log file
3. Start Jenkins after installation is complete
Start command:
sudo service Jenkins start
This error is reported because there are two ways to solve this problem because there is no Java environment configured:
Treatment in Vim/etc/init.d/jenkins
First line Add Java environment
4.
Modify the Jenkins default action user, the Linux Jenkins by default use Jenkins user for scripting and file operations, if not modified, you need to adjust the project to deploy the files and directories involved in the operation of permissions, you can adjust the Jenkins configuration file, Change the user to the root user.
Vim/etc/sysconfig/jenkins
Adjust jenkins_user= "Jenkins" to jenkins_user= "root"
5. Adjust the port to 8079
Vim/etc/sysconfig/jenkins
Jenkins_port= "8079"
6. Enter "http://IP:8079" login in the local browser Jenkins, first login Jenkins will require unlocking
Vim/var/lib/jenkins/secrets/initialadminpassword
Open the path in the red flag, remove the password, fill in, and click "Continue"
When the input is complete, you will be prompted to install the custom plugin or the recommended plugin, where I choose the recommended plugin:
Installing Jenkins in a Linux environment