{"id":1610,"date":"2023-03-25T20:34:05","date_gmt":"2023-03-25T12:34:05","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1610"},"modified":"2023-04-27T21:19:57","modified_gmt":"2023-04-27T13:19:57","slug":"jenkins-config-global-http-proxy","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/25\/jenkins-config-global-http-proxy\/","title":{"rendered":"Jenkins\u914d\u7f6e\u5168\u5c40Http\u4ee3\u7406"},"content":{"rendered":"<p>\u573a\u666f\uff1aJenkins\u5728\u4f01\u4e1a\u5185\u7f51\uff0c\u4e0d\u80fd\u76f4\u63a5\u8054\u7f51\uff0c\u5fc5\u987b\u901a\u8fc7<code>HTTP\/HTTPS<\/code>\u4ee3\u7406\u8054\u7f51\uff0c\u901a\u8fc7NAT\u4e0a\u7f51\u4e0d\u7b97HTTP\u4ee3\u7406\u8303\u56f4\u3002<\/p>\n<p>\u4e24\u79cd\u542f\u52a8\u65b9\u5f0f\uff1a<\/p>\n<p>\uff081\uff09\u901a\u8fc7<code>java -jar<\/code>\u542f\u52a8war\u5305\uff0c\u76f4\u63a5\u5728java\u542f\u52a8\u65f6\u6dfb\u52a0\u53c2\u6570\uff1a<\/p>\n<p><!-- more --><\/p>\n<pre><code class=\"language-bash\">java -Dhttp.proxyHost=192.168.1.10 -Dhttp.proxyPort=8118 Dhttp.nonProxyHosts=&#039;localhost|127.0.0.1&#039; -Dhttps.proxyHost=192.168.1.10 -Dhttps.proxyPort=8118 -Dhttps.nonProxyHosts=&#039;localhost|127.0.0.1&#039; -jar jenkins.war<\/code><\/pre>\n<p>\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-bash\">\/usr\/local\/java\/jdk1.8.0_231\/bin\/java -Dhttp.proxyHost=192.168.1.10 -Dhttp.proxyPort=8118 -Dhttp.nonProxyHosts=&#039;localhost|127.0.0.1&#039; -Dhttps.proxyHost=192.168.1.10 -Dhttps.proxyPort=8118 -Dhttps.nonProxyHosts=&#039;localhost|127.0.0.1&#039; -Djava.awt.headless=true -DJENKINS_HOME=\/data\/jenkins -jar \/usr\/local\/jenkins\/jenkins-2.237.war --logfile=\/usr\/local\/jenkins\/jenkins.log --webroot=\/usr\/local\/jenkins\/war --httpPort=88 --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20<\/code><\/pre>\n<p>\uff082\uff09Jenkins\u8fd0\u884c\u5728Tomcat\u4e2d\uff0c\u6216\u4fee\u6539<code>tomcat_home\/bin\/catalina.sh<\/code>\u6587\u4ef6\uff0c\u52a0\u5165\uff1a<\/p>\n<pre><code class=\"language-bash\">JAVA_OPTS=&quot;$JAVA_OPTS -Dhttp.proxyHost=192.168.1.10 -Dhttp.proxyPort=8118 Dhttp.nonProxyHosts=&#039;localhost|127.0.0.1&#039; -Dhttps.proxyHost=192.168.1.10 -Dhttps.proxyPort=8118 -Dhttps.nonProxyHosts=&#039;localhost|127.0.0.1&#039;&quot;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u573a\u666f\uff1aJenkins\u5728\u4f01\u4e1a\u5185\u7f51\uff0c\u4e0d\u80fd\u76f4\u63a5\u8054\u7f51\uff0c\u5fc5\u987b\u901a\u8fc7HTTP\/HTTPS\u4ee3\u7406\u8054\u7f51\uff0c\u901a\u8fc7NAT\u4e0a\u7f51\u4e0d\u7b97HTTP [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[229],"tags":[142],"class_list":["post-1610","post","type-post","status-publish","format-standard","hentry","category-jenkins","tag-142"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1610","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1610"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1610\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1610"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1610"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}