GIT + RHEL5 build
Author: [email protected]
First download the source package of git here is git-1.7.8.1.tar.gz;
Because gcc was not selected when installing rhel, gcc needs to be installed in advance. The specific installation sequence is as follows:
Then use the command tar –zxvf git-1.7.8.1.tar.gz to decompress. Enter the git decompression package.
Use the command as follows
#./configure --prefix=/usr/local/git
#make
#make install
(During the installation process, there will be an error saying that the software is not installed or there is a problem with the version. The problem I encountered is that zlib is not installed. So download zlib-1.2.8.tar.gz, extract it and install it.)
After the above installation is complete, use the command to use the following command in the bin directory of the git installation directory:
#ln -s/usr/local/git/bin/git /bin/git
# git –version
If it is displayed, it means success. If not, please email me at [email protected].
Ok After the git build is complete, this is the environment variable
git config--global color.ui true //Enable color support
git config--global core.quotepath false //support utf-8 encoding
git config--global user.name cuiyaonan //username
git config--global user.email [email protected] //email
Now start creating a git repository
Mkdir –pcuiyaonan/workspace/demo
git init cuiyaonan/workspace/demo
echo ‘hello workd’ > welcome.txt
git add welcome.txt
git commit -m 'initialize
ok Now a demo library has been created, and then the welcome.txt file has been submitted as in the library, and a comment has been added to initialize it.
You can use the following command to view the history of the repository commits
Gitlog - status
Shows as follows
So far, the git version library has been built, and the rest is how to use it, which will be written slowly later.