KNOWNHOST WIKI

User Tools

Site Tools


control-panels:directadmin:how-to-install-git-on-directadmin-on-centos

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
control-panels:directadmin:how-to-install-git-on-directadmin-on-centos [2020/05/26 10:34]
Karson N.
control-panels:directadmin:how-to-install-git-on-directadmin-on-centos [2020/06/01 10:05] (current)
Karson N.
Line 4: Line 4:
  
 <code> <code>
-yum install git+  yum install git
 </code> </code>
  
Line 11: Line 11:
  
 <code> <code>
-[root@host]# git --version +  [root@host]# git --version 
-git version 1.8.3.1 +  git version 1.8.3.1 
-[root@host]# +  [root@host]# 
 </code> </code>
  
Line 20: Line 20:
 To install from source, go ahead and log into your server via SSH as the root user.  To install from source, go ahead and log into your server via SSH as the root user. 
  
-First, visit ((https://github.com/git/git/archive/v2.26.0.tar.gz))[[https://github.com/git/git/archive/v2.26.0.tar.gz|https://github.com/git/git/archive/v2.26.0.tar.gz]], this is the latest version as of writing, so please check for newer releases here: ((https://github.com/git/git/releases))[[https://github.com/git/git/releases|https://github.com/git/git/releases]]. Left-click on the tar.gz link for that version and 'Copy Link Location'. Now, back in the terminal, run the following commands (but change the wget url/version accordingly for the version you are installing):+First, visit 
 +((https://github.com/git/git/archive/v2.26.0.tar.gz))[[https://github.com/git/git/archive/v2.26.0.tar.gz|https://github.com/git/git/archive/v2.26.0.tar.gz]], 
 +this is the latest version as of writing, so please check for newer releases here: 
 +((https://github.com/git/git/releases)) 
 +[[https://github.com/git/git/releases|https://github.com/git/git/releases]]. 
 +Left-click on the tar.gz link for that version and 'Copy Link Location'. Now, back in the terminal, run the following commands (but change the wget url/version accordingly for the version you are installing):
  
 <code> <code>
-yum install gettext-devel -y +  yum install gettext-devel -y 
-cd /usr/local/bin/ +  cd /usr/local/bin/ 
-wget https://github.com/git/git/archive/v2.22.0.tar.gz +  wget https://github.com/git/git/archive/v2.22.0.tar.gz 
-tar -zxf v2.22.0.tar.gz +  tar -zxf v2.22.0.tar.gz 
-cd git-* +  cd git-* 
-make configure +  make configure 
-./configure --prefix=/usr +  ./configure --prefix=/usr 
-make all doc info +  make all doc info 
-make install install-doc install-html install-info+  make install install-doc install-html install-info
 </code> </code>
  
Line 37: Line 42:
  
 <code> <code>
-[root@host git-2.22.0]# git --version +  [root@host git-2.22.0]# git --version 
-git version 2.22.0 +  git version 2.22.0 
-[root@host git-2.22.0]# +  [root@host git-2.22.0]# 
 </code> </code>
  
Line 45: Line 50:
  
 Note that you can use Git itself from now onward to update Git, like so: Note that you can use Git itself from now onward to update Git, like so:
 +<code>
   cd /usr/local/bin/   cd /usr/local/bin/
   git clone https://github.com/git/git.git   git clone https://github.com/git/git.git
 +</code>
  
 <code> <code>
-[root@host bin]# git clone https://github.com/git/git.git +  [root@host bin]# git clone https://github.com/git/git.git 
-Cloning into 'git'... +  Cloning into 'git'... 
-remote: Enumerating objects: 271307, done. +  remote: Enumerating objects: 271307, done. 
-remote: Total 271307 (delta 0), reused 0 (delta 0), pack-reused 271307 +  remote: Total 271307 (delta 0), reused 0 (delta 0), pack-reused 271307 
-Receiving objects: 100% (271307/271307), 120.29 MiB | 12.03 MiB/s, done. +  Receiving objects: 100% (271307/271307), 120.29 MiB | 12.03 MiB/s, done. 
-Resolving deltas: 100% (201377/201377), done. +  Resolving deltas: 100% (201377/201377), done. 
-[root@host bin]#  +  [root@host bin]#  
-[root@host bin]# git --version +  [root@host bin]# git --version 
-git version 2.22.0 +  git version 2.22.0 
-[root@host bin]# +  [root@host bin]# 
 </code> </code>
  
 If you require assistance with this, remember KnownHost is here to help! Feel free to open a support ticket and we'll be glad to run these commands for you. :) If you require assistance with this, remember KnownHost is here to help! Feel free to open a support ticket and we'll be glad to run these commands for you. :)
control-panels/directadmin/how-to-install-git-on-directadmin-on-centos.txt · Last modified: 2020/06/01 10:05 by Karson N.