Using the latest Git on CentOS7
Hello.
I'm Mandai, in charge of Wild on the development team.
When I installed Visual Studio Code on CentOS 7, I was told that the version of git was outdated, so I got angry and tried installing the latest version.
Git that can be installed with yum on CentOS 7 is 1.8.
Unfortunately, yum's relationship with git seems to have ended so far.
If you want a later version of git, the only option currently seems to be to install it from source.
It would be nice if Beyond could set up a repository server for the parts that the official repository doesn't cover and be of some help to the public.
That complaint (or is it?) aside.
The libraries required to install git can be installed using yum, so let's quickly get them together.
yum install openssl-devel curl-devel expat-devel
The latest git source is available on github, so obtain it by git clone.
As an aside, to compile git, there is no need to run ./configure (or rather, it doesn't exist), so if you start without reading the explanation, you might be wondering, what? It becomes.
The correct answer is "make it all at once."
make prefix=[/path/to/install] install [install-doc install-html] #install-doc etc. is your choice.
The prefix is the installation path.
This could be /usr or /usr/local.
After specifying the path, I just specified install and it proceeded to compile and then install.
I thought it was related to the documentation, so I intentionally installed it without it.
It feels like confirmation that something like this is possible.
Now we have the latest git environment ready.
Happy, happy.
Wait a minute!
I found an interesting sentence on the download page of the official website.
Red Hat Enterprise Linux, Oracle Linux, CentOS, Scientific Linux, et al.
RHEL and derivatives typically ship older versions of git. If you cannot (or don't want to) compile git from source, you may need to use a 3rd- party repository such as the IUS Community Project to obtain a more recent version of git.
Hmmmm?
I have a bad feeling about it, but let's check this IUS
Since it is an English page, it may be a bit of a misconception, but I think this is a repository of the latest version of open source software compiled by volunteers.
(quite a bit off)
Packages - IUS When I searched for this page, I found it.
Since RPMs compiled for each part are installed, it seems that you actually need to collect the packages you need.
So, let's download the minimum packages required to install 2.11.
wget https://dl.iuscommunity.org/pub/ius/stable/CentOS/7/x86_64/git2u-2.11.0-1.ius.centos7.x86_64.rpm wget https://dl.iuscommunity.org/pub /ius/stable/CentOS/7/x86_64/git2u-perl-Git-2.11.0-1.ius.centos7.noarch.rpm wget https://dl.iuscommunity.org/pub/ius/stable/CentOS/7 /x86_64/git2u-core-2.11.0-1.ius.centos7.x86_64.rpm wget https://dl.iuscommunity.org/pub/ius/stable/CentOS/7/x86_64/git2u-core-doc-2.11 .0-1.ius.centos7.x86_64.rpm sudo yum install git2u-perl-Git-2.11.0-1.ius.centos7.noarch.rpm git2u-2.11.0-1.ius.centos7.x86_64.rpm git2u -core-2.11.0-1.ius.centos7.x86_64.rpm git2u-core-doc-2.11.0-1.ius.centos7.x86_64.rpm
Run the downloaded rpm into yum all at once.
I was able to install it in no time!
If you look into it further.
It seems that the repositories published by IUS can be registered with yum.
This site explains everything in detail, so if you want the latest version (like me), why not register?
Add IUS to CentOS7.1 64bit yum repository | kakiro-web Kakiro Web
When I searched for ``latest version of git,'' all the sites said that ``source installation is the only option,'' so I installed source, but I'll have to look into it more carefully.
That's it.