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 > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "the installation steps of Git". In the daily operation, I believe many people have doubts about the installation steps of Git. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "installation steps of Git". Next, please follow the editor to study!
Installation of Git under windows
Windows installation Git is the easiest installation of the three platforms, you only need to download the installer. It is recommended to download from the official website of Git, but the download on the official website may be slow, so I will download the link here:
Link: https://pan.baidu.com/s/1K_4itZPdwuV2A2Onp6fbGQ extraction code: usur
In fact, at the beginning of the installation under window, we can all directly select the default configuration, and click next step by step until the installation is successful. I also simply recorded the specific installation process into a gif diagram:
After the installation is complete, we can right-click on the desktop to see two options: Git GUI Here and Git Bash Here. We select Git Bash Here and enter git. If we jump out of the help menu, the Git installation is successful.
Installation of Git under Linux
Linux knows that there are many versions, some of which can be installed directly with a command, such as Debian or ubuntu, but many of the CVM are centos, so we can install them with source code in centos. Linux We use centos 7.2 here to demonstrate the installation of Git. First, you need to verify that Git is installed on the Linux system, using the command:
Git-version
Using the above command, if the system has installed Git, the version of Git will be displayed. If the prompt-bash: git: command not found means that git is not installed so you cannot use the git directive, let's take a look at how to install Git. There are generally two ways to install Git: yum installation or source code compilation. Let's first take a look at yum installation of Git:
Install Git in yum mode
Not any version of centos can be installed with Git using yum. The following versions of centos6 cannot install Git using yum, so the following versions of centos6 can only install Git using source code compilation. Centos6 can use yum to install Git, but the version can only install version 1.7.1 of Git, but the minimum version required for remote libraries is generally 1.7.2, so it is also recommended to install Git in centos6 using source code compilation. Above centos7, we recommend using yum to install, because it is easier to operate, and it is good news for children's shoes that are not familiar with Linux. Yum actually requires only one command to install Git:
Yum-y install git I simply recorded the gif process of yum installation:
After the installation is successful, we use git-- version to test whether the git is installed successfully, and we can see that the console prints the current git version number.
Install Git in source code compilation
Compared with the yum installation operation, the source code compilation method will be more complicated, in fact, you need to download the git source code first, then decompress the source code, and finally install and compile it. Next, let's look at the specific installation process:
First, you need to use yum to install the dependent packages required by Git:
Yum-y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
Then download the Git source code, which can be downloaded from the official Git website or by using wget:
Wget https://www.kernel.org/pub/software/scm/git/git-2.19.2.tar.gz decompression source code: tar-xzvf git-2.0.0.tar.gz
Enter the unzipped directory and perform the compilation:
Make configure
Configuration directory:
. / configure-- prefix=/usr/local/gitmake profix=/usr/local/git
Finally, install it.
Make insrtall then adds environment variables and tests whether git is installed successfully:
Git-version at this point, the study on the "installation steps of Git" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.