Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of compiling and installing Apache with CentOS Source Code

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the "CentOS source code compilation and installation of Apache" related knowledge, in the actual case of the operation process, many people will encounter such a dilemma, and then let the editor lead you to learn how to deal with these situations! I hope you can read it carefully and be able to achieve something!

Installation instructions

Installation environment: centos-6.3

Installation method: source code compilation and installation

Software: httpd-2.2.6.tar.gz | pcre-8.32.tar.gz | apr-1.4.6.tar.gz | apr-util-1.5.1.tar.gz

Installation location: / urs/local/apache

Installation premise

Gcc and cmake are already installed on the system. If not, please refer to "centos-6.3 installation configuration cmake".

Do the following:

The copy code is as follows:

# check whether apache is installed

[root@localhost /] # rpm-qa | grep httpd

Httpd-2.2.15-15.el6.centos.1.x86_64

Httpd-tools-2.2.15-15.el6.centos.1.x86_64

# Uninstall the apache that comes with the system

[root@localhost /] # rpm-e-- nodeps httpd-2.2.15-15.el6.centos.1.x86_64

[root@localhost /] # rpm-e-- nodeps httpd-tools-2.2.15-15.el6.centos.1.x86_64

# Uninstall using yum

[root@localhost apache] # yum remove apache

# verify the apr version, uninstall and install the new version

[root@localhost apache] # rpm-qa | grep apr

Apr-1.3.9-5.el6_2.x86_64

Apr-util-1.3.9-3.el6_0.1.x86_64

Apr-util-ldap-1.3.9-3.el6_0.1.x86_64

# Uninstall apr

[root@localhost apache] # yum remove apr

Yum remove apr-util-devel apr apr-util-mysql apr-docs apr-devel apr-util apr-util-docs

# install pcre

[root@localhost local] # tar-zxv-f pcre-8.32.tar.gz

[root@localhost local] # cd pcre-8.32

[root@localhost apr-1.4.6] #. / configure

[root@localhost apr-1.4.6] # make

[root@localhost apr-1.4.6] # make install

# install the new version of apr

[root@localhost local] # tar-zxv-f apr-1.4.6.tar.gz

[root@localhost local] # cd apr-1.4.6

[root@localhost apr-1.4.6] #. / configure-prefix=/usr/local/apr

[root@localhost apr-1.4.6] # make

[root@localhost apr-1.4.6] # make install

# install apr-util

[root@localhost local] # tar-zxv-f apr-util-1.5.1.tar.gz

[root@localhost local] # cd apr-util-1.5.1

[root@localhost apr-util-1.5.1] # / configure-- prefix=/usr/local/apr-util-- with-apr=/usr/local/apr

[root@localhost apr-util-1.5.1] # make

[root@localhost apr-util-1.5.1] # make install

Install apache

Upload httpd-2.4.3.tar.gz to / usr/local and do the following:

The copy code is as follows:

# perform installation

[root@localhost local] # cd / usr/local

[root@localhost local] # tar-zxv-f httpd-2.4.3.tar.gz # decompress package

[root@localhost local] # rm-rf httpd-2.4.3.tar.gz # Delete the compressed package

[root@localhost local] # mv httpd-2.4.3 apache

[root@localhost local] # cd apache

# setting parameters for installation

[root@localhost php5.4] # / configure-- prefix=/usr/local/apache-- with-apr=/usr/local/apr-- with-apr-util=/usr/local/apr-util/

[root@localhost php5.4] # make

[root@localhost php5.4] # make install

Verify installation

Start the apache server:

[root@localhost /] # / usr/local/apache/bin/apachectl start

Access using a browser: the following message appears on http://192.168.15.239/:

This is the end of the content of "how to compile and install Apache with CentOS source code". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report