Cumulative Learning Linux (i): Installing Git tools under Linux

Source: Internet
Author: User
Tags install openssl openssl openssl library version control system

background:

The source code for the Open Source Library project is often downloaded on GitHub due to project needs. So recently decided to take the time to learn how to install Linux software, the installation of Git tools as an example to explain.

Linux (fedora18) Install git tools:1) The difference between git and GitHub:

GitHub is a Web site that provides users with a git service. The equivalent of a web version of the Git tool, on GitHub to register an account, you can enjoy the website provides git services. And Git is a version control system, and SVN, CVS is similar to the concept, simple point is a version of your file management (the so-called version is actually a file of a "history", all Git-like version management tools will be clever, Simple design to store records of all your changes to the file, so that you later back to your files at any time, as if a time shuttle, can shuttle to any moment,--git is a document as the protagonist of the history).

2) Fedora 18 install git tools:

Linux is sought after by its open source, because its open source allows users to know and even control every stage of the system. Therefore, the installation of software under Linux is also a bit cumbersome (of course, now the mainstream Linux version has fully supported the visualization, one-click operation), the installation of software mainly three ways: one is the source of the installation, you need to publish the code to local compilation; one RPM package (RPM is Redhat The shorthand for Linux Package Manager, which is becoming popular with Redhat, is implemented via the RPM command (the man RPM tool can be used in Linux terminals to view RPM reference manuals), and the *.bin file, This class is similar to the EXE file under Windows, which can be installed by double-clicking (but the installation directory usually needs to modify the configuration file).

The Git tool downloaded here is a source bundle distributed in the. tar.gz format, so let's describe how to install the. tar.gz source package.

The first step is to unpack the. tar.gz package.

>su

> Enter the Administrator account password

>TAR–ZXVF git-2.0.0-140817642198.tar.gz

>ls–l

At this point in the current directory you can see the more than one directory git-2.0.0

Step two, install the git-2.0.0 source package

The next step is to compile the git-2.0.0 source package in this machine, and the tool that needs to be used is make, and the configuration file that matches it is often called makefile.

Enter the ./configureFirst, and the relevant environmental monitoring and environment variable configuration will be carried out at this time.

Then enter make to start the local compilation, of course, this time the compilation rules are makefile to specify

Finally enter make install, wait for the installation to complete. Enter git--version to see if the installation is complete, and the currently installed version is displayed when the installation is complete, for example, what I have shown on this computer:

git version 2.0.0

3) Error in installation time

Error One: Fatal error: openssl/ssl.h: No file or directory compiled ...

At this point, you should guess that the OpenSSL library is not installed locally. So you need to install OpenSSL first,

Download the source package on the OpenSSL website and follow the three-step installation described above. After the installation is complete, note that you want to call it once./configrue re-configure the environment to install git successfully.

Error two: fatal error: zlib.h: no file or directory

The error here is similar to the error, also because the local machine software installation is not completely caused, this time need to install the zlib package.

With Fedora's Yum installation tool, you can download and install the zlib package yourself, with the command:yum install Zlib-devel. After the installation is complete, you still need to./configure reconfigure the environment and then Make,make install to successfully complete the GIT installation. (Note that the Linux system is different, the instructions for installing the zlib package are different, if it is Ubuntu or Debian, the apt-get install Zliblg-dev can be installed by itself).

PS: A follow-up will introduce the make tool and the rules for writing makefile.

[Email protected]

Date: 2014-08-31

Cumulative Learning Linux (i): Installing Git tools under Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.