- Learning Continuous Integration with Jenkins(Second Edition)
- Nikhil Pathania
- 330字
- 2021-07-02 21:18:36
Starting, stopping, and restarting Jenkins on Windows
Jenkins by default starts running when installed. In this section, the commands to start, stop, restart, and check the status of the Jenkins services are shown:
- Open the Services window from Command Prompt using the following command:
services.msc
- Look for a service named Jenkins.
- Right-click on the Jenkins service again and click Properties.
- Under the General tab, you can see the Jenkins service name, the path to the executable, the service status, and the start parameters.
- Using the Startup type option, you can choose the way Jenkins starts on the Windows machine. You can choose from Automatic, Manual, and Automatic (Delayed Start). Make sure it's always set to Automatic.
- In the following service status, there is an option to manually Start, Stop, Pause, and Resume the Jenkins service:
Configuring the Jenkins service startup option
- Go to the next tab, which is Log On. Here, we define the username through which Jenkins start.
- You can either choose to use the Local System account (not recommended) or you can create a special Jenkins user with special permissions (recommended):
An exclusive account for Jenkins is always preferred. The reason is that Local System account is not under control; it may get deleted or the password may expire depending on the organization's policies, whereas the Jenkins user account can be set with preferred policies and privileges.
Configuring the Jenkins service Log On option
- The next tab is Recovery. Here, we can specify the action items in case the Jenkins service fails to start.
- Here is an example. At the first failure, there is an attempt to restart Jenkins, at the second failure an attempt is made to restart the computer. And lastly, at subsequent failures, a program is run to debug the issue, or we can run a script that sends the Jenkins failure log through email to the respective Jenkins admin for investigation:
Configuring the Jenkins service Recovery option
推薦閱讀
- Kubernetes修煉手冊
- Citrix XenApp Performance Essentials
- Getting Started with oVirt 3.3
- Containerization with LXC
- Windows Phone 7.5 Data Cookbook
- Windows Phone應用程序開發
- Windows Server 2012網絡操作系統企業應用案例詳解
- Linux內核設計的藝術:圖解Linux操作系統架構設計與實現原理
- Linux內核API完全參考手冊(第2版)
- 電腦辦公(Windows 10 + Office 2016)入門與提高(超值版)
- 完美應用Ubuntu(第2版)
- Getting Started with UDK
- 計算機應用基礎(Windows 7+Office 2010)
- 微軟360度
- 蘋果派