Linux Rhel 6.4 Apache compiler installation and simple configuration process (1)

Source: Internet
Author: User
Tags fully qualified domain name

Linux Rhel 6.4 Compile and install Apache process (1)


Note: The following extracts are the commands executed during the installation process, and command feedback is not posted to replace with "...". Watch as you look at the directory where the command is executed.


Installation Platform

[Email protected] ~]# cat/etc/redhat-release

Red Hat Enterprise Linux Server release 6.4 (Santiago)


Required version of the tool and

1.httpd-2.4.25.tar.gz

(HTTP://HTTPD.APACHE.ORG/DOWNLOAD.CGI#APACHE24)

2.apr-1.5.2.tar.gz

(http://apr.apache.org/download.cgi)

3.apr-util-1.5.4.tar.gz

(http://apr.apache.org/download.cgi)

4.pcre-8.40.tar.gz

(https://ftp.pcre.org/pub/pcre/)


Download the tools and upload them to the Linux/media directory. (I uploaded using the WinSCP tool)


Unzip

[Email protected] media]# cd/media/

[Email protected] media]# tar zxvf apr-1.5.2.tar.gz-c/opt/

......

[Email protected] media]# tar zxvf apr-util-1.5.4\. Tar.gz-c/opt/

......

[Email protected] media]# tar zxvf pcre-8.40.tar.gz-c/opt/

......

[Email protected] media]# tar zxvf httpd-2.4.25.tar.gz-c/opt/

......


Unpack and enter the/OPT directory to see the results of the decompression

[Email protected] media]# cd/opt/

[[email protected] opt]# ls

apr-1.5.2 apr-util-1.5.4 httpd-2.4.25 pcre-8.40 RH


Check to see if there is a Linux httpd service, and if necessary, turn off the relevant service and uninstall the HTTPD-related package with RPM.

[Email protected] opt]# Rpm-qa | grep httpd

[Email protected] opt]#

I did not install httpd related packages before.


Installing httpd also requires gcc-c++

[Email protected] opt]# yum-y install gcc-c++*

......


Install Apr apr-util and pcre Three tools, if you do not install these three tools compile httpd will error, prompted the need for these three tools.

Install Apr

[Email protected] opt]# CD APR-1.5.2/

[[email protected] apr-1.5.2]# ls

......

[Email protected] apr-1.5.2]#/configure--PREFIX=/USR/LOCAL/APR

......

[[email protected] apr-1.5.2]# make

......

[[email protected] apr-1.5.2]# make install

......

Continue installing Apr-util

[Email protected] apr-1.5.2]# cd/opt/apr-util-1.5.4/

[Email protected] apr-util-1.5.4]#/configure--prefix=/usr/local/apr-util-with-apr=/usr/local/apr/bin/ Apr-1-config

......

[[email protected] apr-util-1.5.4]# make

......

[[email protected] apr-util-1.5.4]# make install

......

Continue installing Pcre

[Email protected] apr-util-1.5.4]# cd/opt/pcre-8.40/

[Email protected] pcre-8.40]#/configure--prefix=/usr/local/pcre

......

[[email protected] pcre-8.40]# make

......

[[email protected] pcre-8.40]# make install

......


These three tools are compiled and installed so that you can continue to install the httpd

[Email protected] httpd-2.4.25]#/configure--prefix=/usr/local/apache--with-apr=/usr/local/apr--with-apr-util=/ usr/local/apr-util/--with-pcre=/usr/local/pcre/

(Install the httpd and give the path to the three tools)

......

[[email protected] httpd-2.4.25]# make

......

[[email protected] httpd-2.4.25]# make install

......


If the error is not reported after the compilation, the installation is basically over.

Try to start Apache

Start:

[[email protected] httpd-2.4.25]#/usr/local/apache/bin/apachectl start

AH00557:httpd:apr_sockaddr_info_get () failed for chengmanyu.test

AH00558:httpd:Could not reliably determine the server ' s fully qualified domain name, using 127.0.0.1. Set the ' ServerName ' directive globally to suppress this message

(The above problem does not affect the use, in the next configuration we set the hostname to avoid this hint)


If there is no error, then Apache has started to run, we test the results of our work.

Turn off the firewall for this machine first.

[[Email protected] httpd-2.4.25]# service iptables stop

iptables:flushing firewall rules: [OK]

Iptables:setting chains to Policy Accept:filter [OK]

iptables:unloading modules: [OK]


Then use the other hosts in the same domain or in the native browser to enter Apache host ip:80 (ip+:80), browser jump page display

It works!

The installation of Apache has been completed, but it is not possible to use it directly in the web, but it also requires some simple settings.

This article is from the "Full Fish" blog, please be sure to keep this source http://chengmanyu.blog.51cto.com/7198694/1909709

Linux Rhel 6.4 Apache compiler installation and simple configuration process (1)

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.