一、安装Jenkins时,java -jar jenkins.war --httpPort=8888,出现Jenkins is fully up and running时,说明Jenkins已经安装成功,但有时候咱们却访问不了,是由于没有打开防火墙,html
打开防火墙,使外部能访问java
# /sbin/iptables -I INPUT -p tcp --dport 8888 -j ACCEPTgit
# service iptables savegithub
# service iptables restartvim
二、Jenkins 更新插件出现 java.net.UnknownHostException: updates.jenkins-ci.org 解决方法:bash
修改dns服务器
在终端输入:vim /etc/resolv.conf,打开后添加如下内容:curl
search updates.jenkins-ci.orgtcp
nameserver 192.168.1.228url
nameserver 114.114.114.114
三、Jenkins 更新GitHub plugin,但Jenkins中git没法使用,首先检查你的服务器是否安装git,打开终端输入 git --version,若是有版本信息说明已经安装有。但咱们在添加项目git地址时出现下面错误:
Failed to connect to repository : Command "/usr/bin/git config --local credential.helper store --file=/tmp/git6945256026248158269.credentials" returned status code 129: stdout: stderr: error: unknown option `local' usage: git config [options] Config file location --global use global config file --system use system config file -f, --file <FILE> use given config file Action --get get value: name [value-regex] --get-all get all values: key [value-regex] --get-regexp get values for regexp: name-regex [value-regex] --replace-all replace all matching variables: name value [value_regex] --add adds a new variable: name value --unset removes a variable: name [value-regex] --unset-all removes all matches: name [value-regex] --rename-section rename section: old-name new-name --remove-section remove a section: name -l, --list list all -e, --edit opens an editor --get-color <slot> find the color configured: [default] --get-colorbool <slot> find the color setting: [stdout-is-tty] Type --bool value is "true" or "false" --int value is decimal number --bool-or-int value is --bool or --int --path value is a path (file or directory name) Other -z, --null terminate values with NUL byte
这个问题说明你服务器上安装git的版本过低,须要从新安装新git版本。
># yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc># yum install gcc perl-ExtUtils-MakeMaker error: ```/utf8.c:463: undefined reference to `libiconv'``` ># wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz ># tar zxvf libiconv-1.14.tar.gz ># cd libiconv-1.14 ># ./configure --prefix=/usr/local/libiconv ># make && make install
经过git –version查看系统带的版本,Cento6.5应该自带的是git版本是1.7.1
># yum remove git
># wget https://github.com/git/git/archive/v2.2.1.tar.gz># tar zxvf v2.2.1.tar.gz># cd git-2.2.1># make configure># ./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv># make all doc># make install install-doc install-html># echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc># source /etc/bashrc
># git --version>git version 2.2.1
安装成功后,你须要从新启动Jenkins,来配置更新Jenkins的PATH路径。Jenkins中的git才能够正常使用。