Linuxsource installation of package management
The compilation of the source code is used in the Linux system compiler, the common source package is generally used in C language development, this is because C language is the most standard programming language Linux. The C language compiler on Linux is called GCC, which makes it possible to turn C into an executable binary file. So if there is no GCC installed on your machine, there is no way to compile the source code. You can use Yum install-y gcc to complete the installation.
3.1Source Package Installation Steps
1. get the source code and unzip
#tar XF Package-version.tar. {GZ|BZ2|XZ}
Note: The expanded directory name is typically package-version
2. switch to the extracted source directory
CD package-version
3. execute the./configure Script
features such as #configure scripts are primarily used to check that the installation environment meets compilation requirements and to define which features or features are enabled by the current program, as well as installation paths, and so on.
result: Depending on makefile.in file generates Makefile file.
./configure
4. Compiling
Make
5. Installation
Make install
6. Configure binary Programs
# when we compile and install the binaries are not in the path variable, it is necessary to add the installed binary program path to the path variable in order to facilitate the use of the binaries .
# here with Apache as a column
vim/etc/profile.d/apache.sh #在脚本中添加下面两行内容PATH =/usr/local/apache/bin: $PATH export PATH
7. header file output to System
# here with Apache as a column
# LN-SV/USR/LOCAL/APACHE/INCLUDE/USR/INCLUDE/HTTPD
8. library file output to system
# here with Apache as a column
vim/etc/ld.so.conf.d/httpd.conf #将Apache库文件路径加入到共享库/usr/local/apache/lib
# to have the system regenerate the library file path cache
Ldconfig
9. Export The man file
# here with Apache as a column
Vim/etc/man.configmanpath/usr/local/apache/man #将Apache的man文档路径加入到man的配置文件中
3.2 ConfigureIntroduction to Scripting features
# We need to define the configuration:
1. Specify the installation path, configuration file path
--prefix=/path/
--sysconfdir=/path/
2. Specify the Enabled / disabled features
--enable-feature: For example:--enable-fpm
--disable-feature: For example:--disable-socket
3. specify which features, programs, or files you rely on
--with-function: Enable a feature
--without-function: Disabling a feature
# different programs, their configure scripting features are different, to get help:
./configure--help or view The Help information provided in Install,redeme
3.3Source Package Installation Summary
Prerequisite: Prepare the development environment.
Compile process:
./configure
Make
Makeinstall
Output:
file
Library Files
Binary Program
Man document
This article is from the Linux OPS blog, so be sure to keep this source http://enzhi.blog.51cto.com/11193298/1747319
Linux Package management source code installation