Last update at :2024-06-23,Edit by888u
Sometimes when we need to debug our projects, the Git environment built in the local Windows environment may have some problems when used, so I directly build the Git tool environment in the VPS environment. Although there is a git source in the Linux system environment, we can install it directly with yum or apt-get, but the source is not the latest version, and errors will occur when submitting the version in the installed git environment, so we need to manually install git separately to ensure that the tool of normal use.
Yesterday in the Q group, Snail saw some netizens mention the problem of installing git in Centos environment, so this morning I collected information and shared the method of installing git based on centos 6 64-bit environment.
First, install the compilation environment
yum -y install zlib-devel openssl-devel perl cpio expat-devel gettext-devel curl
Execute the above script to install some basic environment dependency packages necessary for our git environment.
Second, download the git version and install it
Log in to our current VPS host via SSH, and then execute the following command.
https://soft.laozuo.org/git/git-2.4.5.tar.gztar -zxvf git-2.4.5.tar.gzcd git-2.4.5autoconf./configuremakemake install
We use the above steps to download the current relatively new git-2.4.5 version, and then compile and install it.
Finally, we can view the current GIT version through the git –version command. In this way, we can install the GIT tool environment with a higher current version. The 1.7 version of the default environment package is too low and cannot be submitted.
Recommended site search: How to register a domain name, rent a server, Hong Kong hosting, free space application, how to rent a foreign server, personal free space, vps host, Chinese domain name registration, foreign server, mainland China agent IP,
发表评论