This article will guide Jenkins Beginners in installing and configuring Jenkins's test environment.
1. Download Jenkins.war, I download the Jenknins 2.7.
[Email protected]:~/github/jenkins-example$ wget Http://mirrors.jenkins-ci.org/war/2.7/jenkins.war
[email protected]: ~/github/jenkins-example$ lsjenkins2.7.war jenkins_home jenkins.log jenkins.sh jenkins.war LICENSE Readme 2. Start the Jenkins server setting jenkins_home environment variable, Jenkins.war will be unzipped to jenkins_home directory, and all Jenkins plugins and configuration files will be written to Jenkins_ Home is set under the directory. You can use the following jenkins.sh to start the Jenkins server. Startup script: ~/github/jenkins-example/jenkins.sh#!/bin/bashscriptdir= ' dirname "$BASH _source" ' Export jenkins_root=$ Scriptdirexport jenkins_home= $JENKINS _root/jenkins_homeecho jenkins_home: $JENKINS _homejava-jar $JENKINS _root/ Jenkins.war--httpport=8008 Start Jenkins Server:[email protected]: ~/github/jenkins-example$./jenkins.sh > Jenkins.log 2>&1 & 3. Configure the Jenkins server. Open http://10.130.28.88:8008 in a browser on a native or other machine to access and configure Jenkins, where 10.130.28.88 is the server IP address of the Jenkins server. The first time you start Jenkins you need to configure the initial administrator password to manually/home/osboxes/github/jenkins-example/jenkins_home/secrets/ Copy the content in Initialadminpassword, and then paste it into the Administrator password box. Then you need to wait a few 10 minutes, wait for the Jenkins initialization to finish and go to the next step, select Install recommended plugins. Sometimes due to network problems, you will be prompted to skip the installation of plugin. If you need to install plugins offline, you can use script https://gist.github.com/micw/e80d739c6099078ce0f3 to ensure that the plugins that plugin relies on are also automatically installed. As below, select Skip plugins and install later. You will then be prompted to set the administrator user and password as follows: 4 Enter Jenkins after the above steps Jenkins has been installed to complete. You can use the Admin user you just set up to log in to try.
Installation of the Jenkins server