Original: http://www.cnblogs.com/itech/archive/2011/11/04/2236230.html
1 Modify the root directory of Jenkins, which is C:\Documents and settings\aaa\.jenkins by default.
. Jenkins
├─jobs
│└─javahelloworld
│├─builds
││├─2011-11-03_16-48-17
││├─2011-11-03_16-49-05
││├─2011-11-03_16-49-29
││├─2011-11-03_17-01-49
││└─2011-11-03_17-11-42
│└─workspace
│├─build
││├─classes
│││└─oata
││└─jar
│└─src
│└─oata
├─plugins├─usercontent├─war
You can modify it by setting environment variables, for example:
Set Jenkins_home=c:\jenkins
Then restart Jenkins.
2 Backup and Restore Jenkins
Only need to back up all the files and folders under Jenkins_home, you need to stop Jenkins first.
3 Move, delete or modify jobs
For moving or deleting jobs, simply move or delete the%jenkins_hoem%\jobs directory.
To modify the name of jobs, simply modify the name of the folder that corresponds to the job under%jenkins_hoem%\jobs.
For jobs that are infrequently used, you only need to store them in the directory zip or tar of the corresponding job under%jenkins_hoem%\jobs to other places.
4 You can execute a few commands in Jenkins's URL to manipulate Jenkins, as follows
The Http://[jenkins-server]/[command] command can be:
- Exit Shutdown Jenkins
- Restart Restart Jenkins
- Reload to reload the configuration
5 Jenkins command-line arguments at startup
--httpport= $HTTP _port to set the Web port for the Jenkins runtime. --httpsport= $HTTP _port, which indicates the use of the HTTPS protocol. --httplistenaddress= $HTTP _host, which specifies the IP range that Jenkins listens on, by default all IPs can access this Jenkins server.
6 Modifying the TimeZone of Jenkins
If the timezone of the server where Jenkins is located is different from the user's timezone, then the timezone of Jenkins needs to be modified. The following parameters need to be added when Jenkins starts-dorg.apache.commons.jelly.tags.fmt.timezone=tz
7 It is best to start Jenkins with a script to make sure that Jenkins runs in the same environment every time, for example
Startjenkins.bat
Set Jenkins_home=c:\jenkins
CD/D%jenkins_home%
Java-jar%jenkins_home%\jenkins.war--httpport=8000
8 Jenkins running in the background
If Jenkins is deployed in a servlet container, such as Apache,tomcat. Because servlet containers are typically run in the background, Jenkins is already running in the background.
For Windows users to deploy Jenkins as a service, click Insall as Windows Service on the management page of Jenkins. But it feels better to manually deploy the script that starts Jenkins as a Windows service, giving you more flexibility in setting more parameters.
9 System Information for Jenkins
You can view all Jenkins information, such as the startup configuration of Jenkins, the environment variables of the system on which the plugins is installed, in the system information under the management page of Jenkins.
Environment variables built into Jenkins
Build_number, which uniquely identifies a BUILD, such as;build_id, essentially equivalent to Build_number, but a string, such as 2011-11-15_16-06-21;Job_name, the name of the JOB, such as Javahelloworld;Build_tag, acting with Build_id,build_number, is used globally to uniquely identify a BUILD such as jenkins-javahelloworld-23;Executor_number, for example 0;Node_name,slave's name, such as MyServer01;a node_labels,slave label that identifies the usefulness of slave, such as Javahelloworld MyServer01;Java_home, JAVA's HOME directory, such as C:\Program Files (x86) \java\jdk1.7.0_01;
Workspace,job's current working directory, such as C:\jenkins\workspace\JavaHelloWorld;
Hudson_url = Jenkins_url, the URL of JENKINS, for example http://localhost:8000/;build_url,build URLs such as http://localhost:8000/job/JavaHelloWorld/23/;Job_url, the URL of the JOB, such as http://localhost:8000/job/JavaHelloWorld/;svn_revision,svn of Revison, for example 4;
Configuration of Jenkins