Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
3 views
in DevOps and Agile by (29.3k points)

I have downloaded "Jenkins-1.501.zip" from http://jenkins-ci.org/content/thank-you-downloading-windows-installer.

I have extracted the zip file and installed Jenkins on Windows 7 successfully. Jenkins runs at http://localhost:8080/ as well. I want to stop Jenkin's service from the console. How can I do that? What's the way to start and restart through the console/command line?

3 Answers

0 votes
by (50.2k points)

Open Console/Command line --> Go to your Jenkins installation directory. Execute the following commands respectively:

To stop:

jenkins.exe stop

To start:

jenkins.exe start

To restart:

jenkins.exe restart

This Jenkins Tutorial will surely help you in learning more about Jenkins. You can also obtain Jenkins certification by clearing the Intellipaat Jenkins Certification Exam.

0 votes
by (37.3k points)

There are multiple approaches to starting & stopping Jenkins on Windows OS. We have to follow some steps to run Jenkins on Windows.
 

APPROACH-1
Using Command Prompt: To start Jenkins

Step 1: Open the command prompt on your Windows with administrative privileges.

Step 2: After opening a command prompt, run one command to start Jenkins

net start Jenkins

Using Command Prompt: To stop Jenkins

Step 1: Open the command prompt on your Windows with administrative privileges.

Step 2: After opening a command prompt, run one command to stop Jenkins

net stop Jenkins

Using Command Prompt: To restart Jenkins

Step 1: Open the command prompt on your Windows with administrative privileges.

Step 2: After opening the command prompt, run two commands to restart Jenkins

net stop Jenkins

net start Jenkins

APPROACH-2

Using  the Jenkins service wrapper: To start/stop/restart Jenkins

This approach we can use only if Jenkins is already installed on our windows, then we will be able to manage it through the Jenkins service wrapper.

Step 1: We have to find the default location where Jenkins is installed on our system.

Go to the Jenkins installation directory (C:\Program Files (x86)\Jenkins).

Step 2: In the above location we will find an exe file (i.e., Jenkins.exe). jenkins.exe. We will use this file along with commands to start/stop/restart Jenkins. 

Jenkins.exe start 

Jenkins.exe stop

Jenkins.exe restart

0 votes
by (1.3k points)

To manage Jenkins on the Windows environment, you control its service from the command line. Jenkins is to be stopped by:

jenkins.exe stop

Jenkins is started with the code:

jenkins.exe start

To restart Jenkins, do the following:

jenkins.exe restart

Run commands in the directory containing the jenkins.exe or otherwise specify the full path in order to run it that way.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...