How to install the source code format software
First of all, these source code can be obtained in the following ways:
Official self-built site, such as Apache's official website
Code hosting sites: such as SourceForge. github,code.google.com
In general, the source code file directory, there will be a configure script file, this file is used to generate the final makefile file, we can run this script when we pass the specified parameters, to indicate the enabling feature, installation path, etc., then this script file will be based on the parameters, Combine the makefile.in file (the Magic Board of the makefile file) to generate the final makefile file
To prepare before compiling:
Development environment: the development of the library, header files, such as GLIBC is the most basic library, is the standard library
On CentOS, some of the common development components are packaged into packages, and we can install them through Yum to create the relevant development environment, for example, development tools, which is the most basic development component, he integrates the make command, gcc command, etc. Another example of a commonly used package group called Server Platform development
Note that some software compilation is not only required for the GLIBC library version, (although the GLIBC Library is a standard library, but also iterative, the iteration version should be backward compatible, such as GLIBC 5 May support glibc 4 3 2 1, so if your system glibc is 5, Then all the software that relies on 1,2,3,4,5 can run, but if the software relies on glibc 6, it will not compile) and may also be required for the version of the GCC compiler.
Compiling is generally divided into three steps:
1,./configure
Note that the parameters supported by the Configure of different software are not the same, but generally have--help this parameter, this parameter can help us to see which parameters configure support, the door is to see Readme,install document
In addition to--help, there are some common general options:
--prefix=/path/to/somewhere: Specify the installation location
--sysconfdir=/path/to/somewhere: Configuration File Installation Location
--disable-feature disabling an attribute (equivalent to--enable-feature=no)
--ENABLE-FEATURE=[ARG] Enable or disable an attribute (Arg=[yes|no])
--with-package=[arg] relies on or does not depend on a package
--without-package does not depend on a package
2, if the first step is not a problem, no error, you can execute make
3,make Install this command is to copy the compiled files to the specified directory, such as where to put the help document, put the library file in the/usr/lib64 directory
Of course, the above three steps may not be absolute, for example, there is a source code file directory There is no configure script, the source code only a single source file, only need to compile this one can, this situation is also possible. Therefore, it is recommended that you check for documents such as install or reademe before installing.
Software is installed in Source package mode