设为首页 收藏本站
查看: 742|回复: 0

[经验分享] CentOS升级git

[复制链接]

尚未签到

发表于 2018-1-16 06:27:56 | 显示全部楼层 |阅读模式
  1.首先查看下当前的版本
[iyunv@localhost ~]# git --version

  git version 1.8.2.1
  2.尝试进行升级
[iyunv@localhost ~]# yum update git

  Loaded plugins: fastestmirror
  Loading mirror speeds from cached hostfile
  * addons: mirrors.aliyun.com
  * base: mirrors.aliyun.com
  * epel: mirrors.opencas.cn
  * extras: mirrors.aliyun.com
  * updates: mirrors.aliyun.com
  Setting up Update Process
  No Packages marked for Update
  吐槽下,先尝试处理下,发现升级失败。
  首先要卸载掉之前安装的git , yum  remove git
  然后按照下面的链接来处理
  3.https://www.howtoforge.com/how-to-install-the-latest-git-version-on-centos
  1)切换到src目录下
  cd /usr/src
  2)获取git的源代码
  wget https://www.kernel.org/pub/software/scm/git/git-2.0.1.tar.gz
  3)解压
  tar xzf git-2.0.1.tar.gz
  The latest Git version at this time is 2.0.1. To find the latest available version when you follow this guide,
  go to this URL https://www.kernel.org/pub/software/scm/git/ and search for the git-VERSION.tar.gz with the highest version number.
  ps:2015年10月18日看到的最新版本是2.6.2
[iyunv@localhost src]# wget https://www.kernel.org/pub/software/scm/git/git-2.6.2.tar.gz

  --2015-10-18 21:21:50--  https://www.kernel.org/pub/software/scm/git/git-2.6.2.tar.gz
  Resolving www.kernel.org... 198.145.20.140, 199.204.44.194, 149.20.4.69, ...
  Connecting to www.kernel.org|198.145.20.140|:443... connected.

  ERROR: cannot verify www.kernel.org's certificate, issued by `/C=IL/O=StartCom Ltd./OU=Secure Digital Certificate Signing/CN=StartCom>  Unable to locally verify the issuer's authority.
  To connect to www.kernel.org insecurely, use `--no-check-certificate'.
  Unable to establish SSL connection.
[iyunv@localhost src]# wget --no-check-certificate https://www.kernel.org/pub/software/scm/git/git-2.6.2.tar.gz

  --2015-10-18 21:27:03--  https://www.kernel.org/pub/software/scm/git/git-2.6.2.tar.gz
  Resolving www.kernel.org... 198.145.20.140, 199.204.44.194, 149.20.4.69, ...
  Connecting to www.kernel.org|198.145.20.140|:443... connected.

  WARNING: cannot verify www.kernel.org's certificate, issued by `/C=IL/O=StartCom Ltd./OU=Secure Digital Certificate Signing/CN=StartCom>  Unable to locally verify the issuer's authority.
  HTTP request sent, awaiting response... 200 OK
  Length: 5535091 (5.3M) [application/x-gzip]
  Saving to: `git-2.6.2.tar.gz'
  100%[===================================================================================================================================================================================================>] 5,535,091 69.7K/s in 4m 36s
  2015-10-18 21:31:40 (19.6 KB/s) - `git-2.6.2.tar.gz' saved [5535091/5535091]
  You have mail in /var/spool/mail/root
  mail的信息查看
[iyunv@localhost src]# cat /var/spool/mail/root

  From root@localhost.localdomain  Sun Oct 18 21:26:17 2015
  Return-Path: <root@localhost.localdomain>
  Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])

  by localhost.localdomain (8.13.8/8.13.8) with ESMTP>  for <root@localhost.localdomain>; Sun, 18 Oct 2015 21:26:17 +0800
  Received: (from root@localhost)

  by localhost.localdomain (8.13.8/8.13.8/Submit)>  Sun, 18 Oct 2015 21:26:17 +0800
  Date: Sun, 18 Oct 2015 21:26:17 +0800
  Message-Id: <201510181326.t9IDQHOY006874@localhost.localdomain>
  To: root@localhost.localdomain
  From: logwatch@localhost.localdomain
  Subject: Logwatch for localhost.localdomain (Linux)
  MIME-Version: 1.0
  Content-Transfer-Encoding: 7bit
  Content-Type: text/plain; charset="iso-8859-1"
  ################### Logwatch 7.3 (03/24/06) ####################
  Processing Initiated: Sun Oct 18 21:26:17 2015
  Date Range Processed: yesterday
  ( 2015-Oct-17 )
  Period is day.
  Detail Level of Output: 0
  Type of Output: unformatted
  Logfiles for Host: localhost.localdomain
  ##################################################################
  --------------------- Selinux Audit Begin ------------------------
  Number of audit daemon stops: 2
  ---------------------- Selinux Audit End -------------------------
  --------------------- Automount Begin ------------------------
  **Unmatched Entries**
  lookup_read_master: lookup(nisplus): couldn't locate nis+ table auto.master: 1 Time(s)
  ---------------------- Automount End -------------------------
  --------------------- Kernel Begin ------------------------
  WARNING:  Kernel Errors Present
  hdc: drive_cmd: error=0x04 { AbortedCo ...:  1 Time(s)
  hdc: drive_cmd: status=0x51 { DriveReady SeekComplete Error } ...:  1 Time(s)
  ---------------------- Kernel End -------------------------
  --------------------- Connections (secure-log) Begin ------------------------
  Userhelper executed applications:
  root -> system-config-display as root:  1 Time(s)
  ---------------------- Connections (secure-log) End -------------------------
  --------------------- Smartd Begin ------------------------
  **Unmatched Entries**
  Problem creating device name scan list
  Device: /dev/hda, lacks SMART capability
  Device: /dev/hda, to proceed anyway, use '-T permissive' Directive.

  Device: /dev/hdc, not ATA, no>  ---------------------- Smartd End -------------------------
  --------------------- SSHD Begin ------------------------
  SSHD Killed: 2 Time(s)
  SSHD Started: 1 Time(s)
  ---------------------- SSHD End -------------------------
  --------------------- Disk Space Begin ------------------------

  Filesystem           >  /dev/hda1              28G  3.6G   23G  14% /
  ---------------------- Disk Space End -------------------------
  ###################### Logwatch End #########################
[iyunv@localhost src]# cd git-2.6.2

  再执行下面的命令
  make prefix=/usr/local/git all
  make prefix=/usr/local/git install
  echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
  source /etc/bashrc
  最后再git --version

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-435542-1-1.html 上篇帖子: git远程仓库的使用 下篇帖子: 使用Eclipse上传/下载Git项目
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表