- Mastering Jenkins
- Jonathan McAllister
- 334字
- 2021-07-09 21:43:41
Jenkins on Linux and UNIX
Jenkins offers a wide spectrum of support for the Linux and Unix operating systems. Its cross-platform capabilities have made it a very popular automation tool. The Jenkins community has created native installation packages for most Linux and Unix distributions. Currently, there are installation packages available for the following Linux and Unix flavors:
- Ubuntu/Debian
- Red Hat/Fedora/CentOS
- OpenSUSE
- FreeBSD
- Solaris/OpenIndiana
- Gentoo
- Docker
The easiest way to install Jenkins on a Linux or Unix system is to use a standard package manager, such as YUM, OpenCSW, IPS, or Aptitude. For the purpose of brevity, we will focus primarily on CentOS (YUM) and Debian oriented (APT) distributions.
Configuring the JVM
On Linux and Unix hosts, configuring the JVM memory parameters involves modifying the service scripts that initialize the Jenkins daemon. For Debian/Ubuntu systems, the file you will need to modify is usually located in /etc/default/Jenkins
.
For CentOS-based systems, the file you will need to modify is usually located in /etc/sysconfig/Jenkins
.
Regardless of the operating system, the setting that lets us adjust the JVM options is the 'JAVA_ARGS=
' property.
With the advent of Java 1.8, as mentioned earlier, there are some new and deprecated memory settings. The definitions of available memory options are described in table below:

Java memory arguments and descriptions for Linux (same as Windows)
Adjusting the memory setting for Java in Linux is simply a matter of adapting the JAVA_ARGS=
property to contain the correct switches. An example of how to change the initial heap size property is shown here:
JAVA_ARGS=-Xmx=512m
Once you have completed the modifications to fit your hardware configuration, you will need to restart the Jenkins service to make it take effect.
Tip
Memory allocation tip
The larger the initial heap and/or maximum heap memory size, the larger the permanent generation memory allocation will need to be. This is because the permanent generation memory stores data about the contents of the heap. These memory settings are designed to let you customize the JVM environment that Jenkins operates in.
- TypeScript入門(mén)與實(shí)戰(zhàn)
- 深度學(xué)習(xí)經(jīng)典案例解析:基于MATLAB
- 控糖控脂健康餐
- 構(gòu)建移動(dòng)網(wǎng)站與APP:HTML 5移動(dòng)開(kāi)發(fā)入門(mén)與實(shí)戰(zhàn)(跨平臺(tái)移動(dòng)開(kāi)發(fā)叢書(shū))
- HTML5+CSS3基礎(chǔ)開(kāi)發(fā)教程(第2版)
- The HTML and CSS Workshop
- Kotlin從基礎(chǔ)到實(shí)戰(zhàn)
- 機(jī)器學(xué)習(xí)與R語(yǔ)言實(shí)戰(zhàn)
- Tableau 10 Bootcamp
- Django實(shí)戰(zhàn):Python Web典型模塊與項(xiàng)目開(kāi)發(fā)
- Hadoop 2.X HDFS源碼剖析
- Learning Image Processing with OpenCV
- Greenplum構(gòu)建實(shí)時(shí)數(shù)據(jù)倉(cāng)庫(kù)實(shí)踐
- Beginning C# 7 Hands-On:The Core Language
- WCF全面解析