环境:
apache-tomcat-8.5.88
Jenkins 2.346.3 LTS
Running Jenkins system
Jenkins requires Java 11 or 17 since Jenkins 2.357 and LTS 2.361.1. Read more about this in the announcement blog post.
https://www.jenkins.io/doc/administration/requirements/java/
-
下载Jenkins
https://sg.mirror.servanamanaged.com/jenkins/war-stable/2.387.3/jenkins.war -
下载jdk
https://www.oracle.com/cn/java/technologies/downloads/#jdk17-linux
检查系统信息
[root@k8smaster bin]# uname -a
Linux k8smaster 3.10.0-1160.11.1.el7.x86_64 #1 SMP Fri Dec 18 16:34:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
x86_64 x86_64 x86_64 对应下面x64的包,而不是及ARM64.
note:如果不匹配可能出现一下问题
-bash: /usr/local/jdk-17.0.7/bin/java: cannot execute binary file
- Tomcat 修改配置
启动报错, consider increasing the maximum size of the cache
12-May-2023 10:13:27.821 WARNING [Handling GET /jenkins/static/0de1a211/jsbundles/app.js from 202.105.104.90 : http-nio-8080-exec-1] org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/jsbundles/app.js] to the cache for web application [/jenkins] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache
12-May-2023 10:13:28.033 WARNING [Handling GET /jenkins/static/0de1a211/jsbundles/fonts/icomoon..ttf from 202.105.104.90 : http-nio-8080-exec-3] org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/jsbundles/fonts/icomoon..ttf] to the cache for web application [/jenkins] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache
在tomcat的配置文件apache-tomcat-8.5.88\conf\context.xml的Context标签内增加下面一行。重启Tomcat即可。
<Resources cachingAllowed="true" cacheMaxSize="200000" />
安装git
yum install git