In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you about how to compile and upgrade Git in CentOS. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article.
Git-- version I installed CentOS-7-x86_64-1908, and the built-in git is 1.8.3.1. Enter the following command under the terminal to view:
If you have already installed another version of git and installed it in the default path through the installation package, it is best to uninstall the old version of git first, otherwise after installing the new version of git, cross calls will occur when calling git. If the old version is compiled and installed and the installation path is specified, there is no need to uninstall, but be sure to configure the environment variables after installing the new version of git.
1. Uninstall the old version of git
At the terminal, enter:
Yum remove git
2. Install dependent software
At the terminal, enter:
Yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidocyum install gcc perl-ExtUtils-MakeMaker
You may not need to install dependencies to make through, my environment installed the first
3. Download the latest Git source code
Open the URL https://github.com/git/git/releases, where you can view all the released versions of git, copy the source code download address you want to download, and enter it at the terminal:
Cd / usr/local/src/
Wget https://github.com/git/git/archive/v2.24.1.tar.gz
4. Compile and install the latest version of git
At the terminal, enter:
Tar-vxf git-2.24.1.tar.gzcd git-2.24.1make prefix=/usr/local/git allmake prefix=/usr/local/git install
5. Add environment variables
At the terminal, enter:
Echo "export PATH=$PATH:/usr/local/git/bin" > > / etc/profilesource / etc/profile
6. Verify the version
At the terminal, enter:
Git-version
7. If your git accesses the https link, it will report an error: SSL connect error. Update nss
At the terminal, enter:
Yum update nss above is how to compile and upgrade Git in CentOS. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.