In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
It is believed that many inexperienced people have no idea about how to install git in centos7.2 system. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
1. Install git through yum:
Yum install git / / Git is installed in the / usr/libexec/git-core directory by default
Git-- version / / View version
two。 Install by compiling the source code:
Step one:
Wget https://github.com/git/git/archive/v2.17.0.tar.gz
Step 2:
Tar-zxvf v2.17.0.tar.gz
Step 3:
Yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker / / wait patiently for installation. Just enter y when prompted.
Step 4: when installing dependencies, yum automatically installs Git, and you need to uninstall the old version of Git with the following command:
Yum remove git
Step 5: go to the unzipped folder to compile and command cd git-2.17.0
Make prefix=/usr/local/git all
Step 6:
Install the Git to / usr/local/git path with the command
Make prefix=/usr/local/git install
Step 7: open the environment variable configuration file, command vim / etc/profile, and add Git-related configuration information at the bottom:
PATH=$PATH:/usr/local/git/bin
Export PATH
Then save and quit!
Step 8:
Enter the command git-- version to view the installed version of git. The verification passed and the installation was successful.
Configure the git user name:
Git config-global user.name "username"
Git config-global user.email "XXXX@XX.com"
View commands:
Git config-global user.name
Git config-global user.email
Set ssh to generate the public key:
Ssh-keygen-t rsa-C "XXXXX@qq.com" / / later, just press enter.
Enter the user directory to view the public key:
Cd / .ssh
Ls
Cat id_rsa.pub / / View the contents of the public key and configure it to Ciyun or github
If you need to enter the account password for every git pull operation
Then run it once
Git bash enter your project directory and type:
Git config-global credential.helper store
After reading the above, have you mastered how to install git in centos7.2 system? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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.