Install and test httpd source code in CentOS

Source: Internet
Author: User

Environment: CentOS 6.4 x86_64

Applications required: APR (http://apr.apache.org/), APR-UTIL (http://apr.apache.org/), httpd (http://httpd.apache.org /)

In linux, there are two main types of software installation: software package installation and source code installation. Package installation encapsulates compiled binary data into rpm packages and can be directly installed using the rpm tool and yum tool. Source code installation means that it is not compiled into binary and needs to be compiled manually. There are two reasons for source code installation. One is to use the latest software, and the other is to customize its functions.

CentOS 6.2 installation source code httpd-2.4.1 error Solution

Steps for installing source code:

1. Expand the compressed file and generally decompress all the files to/uer/local/src.

2. Use the./configure option in the decompressed file directory to check the compiling environment and generate the makefiel file.

3. Compile with make

4. install make install

The following describes how to install httpd and test httpd through source code in centos.

To install Software with source code, you must first install the corresponding compiling environment in the system. The Tools required to build the compiling environment in RedHat are DevelopmentLibraries, Development Tools, Legacy Software Development, and X Software Development, these development environments are indispensable in RehdHat. There are mainly two Development tools required in centos: AdditionalDevelopment and Development tools. Therefore, you must build a compiling environment for source code installation.

First, we need to mount our CD, and find the software package group we want to install through the CD. The command for mounting the CD is: after the mount/dev/cdrom/media/cdrom disc is mounted successfully, we can query the required software package groups through yum -- disablerepo = \ * -- enablerepo = c6-media grouplist. By querying, We can find two necessary development software packages in the middle. Then install the two software packages, run the command yum-disablerepo = \ * -- enablerepo = c6-media groupinstall "AdditionalDevelopment" "Development tools"

After the installation is complete, install httpd. Before installing httpd, install apr and apr-util.

Here, we use apr-1.4.6.tar.gz?apr-util-1.5.1.tar.gzand httpd-2.4.4.tar.bz2 as an example. First, extract these compressed files to the/usr/local/src directory and use the command

Decompress three compressed files

After decompression, go to the/usr/local/src directory to find the directory formed by the three files we just decompressed.

First install apr, then first enter the/usr/local/src/apr-1.4.6 directory

We can see that the configure file is used to configure options and check the compiling environment. Another README or INSTALL file tells us how to use it. Now we will execute configure, and add -- prefix to specify the installation directory during execution. The usage is to input in the decompressed directory. /configure-prefix =/usr/local/apr, by default, it is installed in/desired/path/of/apr. If you want to uninstall it using the default installation path, it is troublesome) if no error is prompted during this process, you can proceed to the next step.

Then, make is used for compilation.

Make is a long process.

The compilation is complete, and the installation is completed using make install.

After this is done, go to the/usr/local/directory and check it out.

We have seen the apr we just installed. Go to the apr directory and check it out.

We can look at some bin directories, including directories and lib directories.

Recommended reading:

DRBD + Heartbeat + httpd implement HA cluster

Heartbeat + httpd + NFS for highly available Web Servers

Httpd service phase experiment in Linux

Monitor the running status of system services mysqld and httpd

Use AWStats to analyze httpd and Tomcat logs on CentOS 6

  • 1
  • 2
  • Next Page

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.