CentOS Install git
Directory
- CentOS Install git
-
- Premise
- Objective
- Begin
- System state before Start
- Select the compilation script mode
- Install dependent packages
- Download git
- Extract
- Execute GIT program installation successful
- Test whether the installation was successful
Premise:
- Bandwagonhost Purchase of VPS
- A git account
Objective
Because the VPS on the moving bricklayer is said to be installed only under CentOS, so the landlord chose to build a remote git repository CentOS.
System state before starting start
Force Delete File command (because the landlord before the installation of Git error, so that the system has residue)
[root /]# rm -r -f git-1.9.0.tar.gz.1
View the current file list
[root /]# ls
Select the compilation script mode
The landlord began to use basic found a lot of commands are not OK. such as Vi,vim and so on. It is therefore necessary to use the third root shell-interactive mode for command line editing. This mode is also closer to the Linux model. such as the tab prompt and other functions
Install dependent packages
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-devel
Yum install is the installation command for CentOS. No download required. Enter Y (OK). The prompt for installation is complete! or the prompt has been installed.
Download git
wget http://git-core.googlecode.com/files/git-1.9.0.tar.gz
1.9.0 version is used here. is automatically downloaded
Extract
tar zxvf git-1.9.0.tar.gz
ZXVF is the decompression parameter
Execute git program, install successful
make prefix=/usr/localall#make prefix=/usr/local install
Attention! This make command, if your compilation mode is not the third choice, then an error occurs. Because of the first compilation mode, the y/n is not queried when the previous installation of the dependency package. Will cause the dependency package to remain installed. So be sure to choose the third mode Root shell-interactive
Test whether the installation was successful
git--version
Query the version number of the currently installed git. This should be 1.9.0.
To see the following git actions, please click
Install git under CentOS