官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 丰顺县| 定州市| 阳西县| 金寨县| 黑山县| 眉山市| 保康县| 南乐县| 正宁县| 冷水江市| 柘荣县| 新野县| 牙克石市| 海阳市| 莆田市| 防城港市| 鄄城县| 荆门市| 长海县| 灵川县| 兰西县| 太保市| 澎湖县| 东阳市| 襄城县| 天气| 威信县| 邳州市| 陆良县| 顺平县| 桐梓县| 曲周县| 盐边县| 韶山市| 德昌县| 巴彦县| 汉中市| 阳曲县| 绩溪县| 松原市| 镇坪县|