Compile and install httpd and compile httpd

Source: Internet
Author: User

Compile and install httpd and compile httpd

Compile and install httpd

1. Download the source code package from the official website.

In order to avoid illegal software, be sure to go to the official website to download http://www.apache.org

Httpd-2.4.25.tar.gz2

2. Install the development package Group

Yum groupinstall "Development tools"

3 decompress httpd-2.4.25.tar.gz 2

Decompress the package to/app,

[Root @ local/app] #Tar-xvf httpd-2.4.25.tar.bz2

Now we can see that the/app directory contains two files.

[Root @ local/app] #Ll

Total 6256

Drwxr-xr-x. 11 501 games 4096 Dec 17 httpd-2.4.25

-Rw-r --. 1 root 6398218 Apr 20 httpd-2.4.25.tar.bz2

4 go to The httpd-2.4.25 directory (extracted files)

[Root @ local/app/httpd-2.4.25] #Mkdir/app/httpd(The httpdde directory will be installed later. This can be used according to your preferences)

The following command must be executed in the/app/httpd-2.4.25/directory, which is obtained after decompression.

[Root @ local/app/httpd-2.4.25] #./Configure -- prefix =/app/httpd

-- Prefix = specifies the directory for httpd installation. The directory is/app/httpd;

There are also many options for personal guidance.

If the error message is true, install APR.

First, let's look at the APR-related software.

[Root @ local/app/httpd-2.4.25] #Yum search apr

We can see a lot of APR-related software.

Here we install the apr-util-devel.x86_64, apr-devel.x86_64, these two are enough

[Root @ local/app/httpd-2.4.25] #Yum install apr-devel.x86_64-y

[Root @ local/app/httpd-2.4.25] #Yum install apr-util-devel.x86_64-y

Run the command after installation.

[Root @ local/app/httpd-2.4.25] #./Configure -- prefix =/app/httpd

An error is reported. Based on the error, install the pcre software.

[Root @ local/app/httpd-2.4.25] #Yum install pcre-devel-y

After the installation is complete, execute the compilation.

[Root @ local/app/httpd-2.4.25] #./Configure -- prefix =/app/httpd

No error is reported this time. It should be okay. Next, let's see if the Makefile file is generated.

Seemingly OK

5 make

Run the make command.

[Root @ local/app/httpd-2.4.25] #Make

After waiting for a while, the task is finally completed.

6. Run make install.

[Root @ local/app/httpd-2.4.25] #Make install

Check the installation directory (/app/httpd ),

[Root @ local/app/httpd] #Ls

Bin build cgi-bin conf error htdocs icons include logs man manual modules

Let's see what is in the/app/httpd/bin/directory.

[Root @ local/app/httpd/bin] #Ls

AB apxs dbmmanage envvars-std htcacheclean htdigest httpd logresolve

Apachectl checkgid envvars fcgistarter htdbm htpasswd httxt2dbm rotatelogs

Everything seems perfect when you see and generate the httpd execution script.

Compilation and installation ends here

 

 

Run the software to see if it can get up.

[Root @ local/app/httpd/bin] #/App/httpd/bin/apachectl start

Started successfully

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.