Start
1. Create a new Jenkins.bat file on the desktop. The contents are as follows:
CD /d%jenkins_home%java-jar%jenkins_home%\jenkins.war--httpport=8080
2. Double-click on Jenkins.bat to start Jenkins.
3. See "Information: Jenkins is fully up and running", stating that the startup was successful.
Note:
Since the Jenkins_home value is set to the path of JENKINS in the environment variable, there is no need to set it up.
If you need to start Jenkins on a different port, change the –httpport=yourport.
The benefits of starting with a bat file are convenient, and the second is not easy to make mistakes.
Shut down
Use the Jenkins CLI to turn Jenkins off.
Reference Note: Jenkins III: Jenkins CLI
The command is:
Java-jar jenkins-cli.jar-s Http://localhost:8080/shutdown
Restart
Use the Jenkins CLI to restart Jenkins.
Reference Note: Jenkins III: Jenkins CLI
The command is:
Java-jar jenkins-cli.jar-s Http://localhost:8080/restart
Jenkins four: Start off and restart Jenkins