Apache Deployment Tutorial

Source: Internet
Author: User
Tags pack

Apache is the world's first-ranked Web server software. It can run on almost all widely used computer platforms and is one of the most popular Web server-side software because it is widely used across platforms and security. On the Linux platform, the lamp Web site architecture combined with mysql,php is a powerful Web application platform, and because of its low cost, efficient performance is strongly sought after by small and medium-sized enterprises.

This article will tell you how to deploy an Apache server.

Environment:

The CentOS6.4 x86_64 bit is minimized and the system has undergone a basic optimization
SELinux is off, iptables is in unrestricted mode
Ip:192.168.1.113/24
Apache Version: httpd-2.4.6
Apr version: apr-1.4.8
Apr-util version: apr-util-1.5.2
Pcre Version: pcre-7.8
Source Package storage Location:/server/tools
Source Package Compile Installation location:/etc/local/software Name

First, preparatory work

1. Development environment Deployment

Because the system is minimal installed in this experiment, you need to install the development environment and the dependency pack before installing Apache.

[Root@c64-web ~]# yum groupinstall "Development Tools" "Server Platform Development"-y #安装这两个开发环境的软件包组
[Root@c64-web ~]# yum install pcre*-y #安装pcre兼容的正则表达式

Since the httpd-2.4.6 version we have installed is newer, the default development environment pack has a lower version of the APR package, which supports only the httpd version of the 2.2.x series, where at least 1.4 versions of APR are supported. So we need to compile and install the APR before we can.

Note: apache2.2.x version, as long as the system has installed the default development Environment Pack group, you do not need to install the APR.

Apr Introduction

Apache Portable Runtime (Apache portable Runtime, Apr), which is the support library for Apache HTTP servers, provides a set of APIs that map to the underlying operating system. Apr's goal is to securely merge all the code that can be merged without sacrificing performance, so Apache can effectively improve the processing power of Apache's static pages after using this.

Apr installation

[Root@c64-web ~]# cd/server/tools/#首先我们要先进到存放源码的目录
[Root@c64-web tools]# wget http://apache.dataguru.cn/apr/apr-1.4.8.tar.gz #下载apr源码包
[Root@c64-web tools]# tar zxf apr-1.4.8.tar.gz #解压源码包
[Root@c64-web tools]# CD apr-1.4.8
[Root@c64-web apr-1.4.8]#./configure--prefix=/usr/local/apr #编译前配置, and specify the installation directory to facilitate maintenance
[Root@c64-web apr-1.4.8]# make #执行编译
[Root@c64-web apr-1.4.8]# make install #执行安装
To perform the compilation and installation process we can reduce it to one of the following commands
[Root@c64-web tools]# Make&&make Install #该命令表示, and then execute make install to install when the Execute build succeeds

Only the APR is not enough, here also need to install apr-util this development package.

Why, then?

In general, it is easy to understand the APR development package as just a development package, but it is not. Currently, the full APR actually contains three development packages: Apr, Apr-util, and Apr-iconv, each developed separately and has its own version. And Apr-iconv in the Apache installation is not involved, in the future Tomcat tuning will involve this development package, then pay attention to it. So, let's go ahead and start installing Apr-util.

[Root@c64-web apr-1.4.8]# CD ...
[Root@c64-web tools]# wget http://apache.dataguru.cn/apr/apr-util-1.5.2.tar.gz
[Root@c64-web tools]# tar zxf apr-util-1.5.2.tar.gz
[Root@c64-web tools]# CD apr-util-1.5.2
[Root@c64-web apr-util-1.5.2]#/configure--prefix=/usr/local/apr-util--with-apr=/usr/local/apr #因为apr-util dependent on Apr , so you need to specify an APR installation path here
[Root@c64-web apr-util-1.5.2]# make&&make Install #这里用上面提到的快捷命令

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.