一. 系统使用过程中问题记录
1. git checkout tfs 代码出现问题 ,
# 查询后为 git 版本过低造成,升级新版软件(系统为: CentOS release 6.5 (Final))
# git --version git version 1.7.1 # 卸载旧版本 git # yum remove git # 安装一些依赖软件 # yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc # yum install gcc perl-ExtUtils-MakeMaker # 安装新版 git # 安装libiconv # cd /tmp # wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz # tar -zxvf libiconv-1.14.tar.gz4、# cd libiconv-1.14 # ./configure --prefix=/usr/local/libiconv && make && make install # 添加 软连接 # ln -s /usr/local/lib/libiconv.so /usr/lib # ln -s /usr/local/lib/libiconv.so.2 /usr/lib # wget https://www.kernel.org/pub/software/scm/git/git-2.15.1.tar.xz # cd /usr/local/scr/git-2.15.1 # make configure # ./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv && make && make install # 添加软连接 # ln -s /usr/local/git/bin/git /usr/bin/git # git --version git version 2.15.1
2. jenkins 执行 shell sudo 命令出现问题
sudo 问题:sorry, you must have a tty to run sudo
# cat /etc/sudoers (或 visudo 直接编辑) # 注释掉 Default requiretty 一行 # Default requiretty
3. 保存 yum 下载的rpm 包
# 编辑 /etc/yum.conf 文件, 将 keepcache=0 修改为 keepcache=1,
# vim/etc/yum.conf [main] cachedir=/var/yum # 保存的目录 keepcache=1
4. git 出现问题
ERROR: ERROR: Error fetching remote repo 'origin'
更新 git 版本 2.11
# wget https://Github.com/Git/Git/archive/v2.11.0.tar.gz # tar xf git-2.11.0.tar.gz # cd git-2.11.0 # make configure # ./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv && make && make install # git --version git version 2.11.0