Source Package centos installation example installation apache

In Linux, the most common source packages installed, we need to compile the source code into an executable binary file. C compilers on Linux called gcc, you can use it to C language compiled into an executable binary file.

If you do not install gcc can not compile the source code, you can use the command yum install -y gcc to complete the installation.

Installation source package 3 steps:

1) ./ configure this step can be customized features, plus the appropriate option, specifically, what can choose to view the ./configure --help command. This step will automatically detect whether your Linux system and related kits have the required libraries when compiling the source package, only after detection through, will generate the Makefile.

2) make use of this command, the Makefile will be compiled according to preset parameters, this step is actually gcc work.

3) make install This step is the installation steps for creating software storage directory and configuration files.

Specific steps:

(1) Download Source Package

# cd /usr/local/src/

# wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.2.32.tar.gz

(2) decompression Source Package

# tar -zxvf httpd-2.2.32.tar.gz

(3) the relevant configuration options and generate Makefile

# cd httpd-2.2.32

# ./Configure --help | less View (non-essential step) available configuration parameters

# ./Configure --prefix = / usr / local / apache2 in case of an error, because there is no install gcc compiler, run the command: yum install -y gcc

# Echo $? Return value is 0, indicating successful execution

(4) compile

# Make after generating Makefile, you need to be compiled

# Echo $? Return value is 0, indicating successful execution

(5) Installation

# Make install install source package

# Echo $? Return value is 0, indicating successful execution

# Ls / usr / local / apache2 / view the installation directory files

 

Guess you like

Origin www.cnblogs.com/hkping18/p/11584630.html