Apache安装要求

安装APR、APR-Util、PCRE,gcc-c++等包

Apache HTTP Server  http://httpd.apache.org/download.cgi#apache24

APR and APR-Util包  http://apr.apache.org/download.cgi

  • APR 1.4.8, released June 21, 2013
  • APR-util 1.5.2, released April 4, 2013
  • APR-iconv 1.2.1, released November 26, 2007

PCRE包  https://sourceforge.net/projects/pcre/files/pcre/

文档URL地址http://httpd.apache.org/docs/2.4/install.html

Apache安装过程

1.安装包gcc或gcc-c++

yum list gcc-c++

yum install gcc gcc-c++ zlib zlib-devel openssl openssl-devel libtool -y

2.安装包APR和APR-Util

tar -zxf apr-1.4.8.tar.gz

cd apr-1.4.8

mkdir /usr/local/apr

./configure --prefix=/usr/local/apr

make

make install

--验证

ls -lrt

mkdir /usr/local/apr-util

tar -zxf apr-util-1.5.2.tar.gz

cd apr-util-1.5.2

./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config

make

make install

3.安装包PRCE

unzip pcre-8.33.zip

cd pcre-8.33

mkdir /usr/local/pcre

./configure --prefix= /usr/local/pcre--with-apr=/usr/local/apr/bin/apr-1-config

make

make install

4.安装Apache Http Server

tar zxvf httpd-2.4.6.tar.gz

cd httpd-2.4.6

./configure --prefix=/usr/local/apache --with-pcre=/usr/local/pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util

make

make install

5. 启动Apache服务

/usr/local/apache/bin/apachectl start

6、安装Tomcat-connectors(mod_jk.so模块)

tar zxvf tomcat-connectors-1.2.37-src.tar.gz
cd tomcat-connectors-1.2.37-src/native/
./configure --with-apxs=/usr/local/apache2/bin/apxs --with-java-home=/usr/local/jdk
make && make install

检查/usr/local/apache/modules下是否有mod_jk.so ,如果没有就复制过去。

注意conf/httpd.conf文件中ServerName xxx.xxx.com:80需要改为ServerName 127.0.0.1:80,可以使用apactrl -t进行语法分析

7、优化Apache

cp /usr/local/apache/bin/apachectl /etc/init.d/httpd
vim /etc/init.d/httpd #编辑此服务,将前三行修改为
#!/bin/bash
# chkconfig: 35 85 15
# description:Apache httpd
service httpd restart
chkconfig --add httpd
chkconfig --level 35 httpd on
 

linux 下apache2 安装的更多相关文章

  1. Linux下Apache2.2和PHP5的安装配置

    Linux下Apache2.2和PHP5的安装配置 环境介绍 我安装使用的Linux版本为CentOS6.5最精简版,Apache为2.2.29,PHP版本为5.4.28. 系统安装 首先安装Cent ...

  2. Linux下编译安装Apache Http Server

    Linux下编译安装Apache Http Server [TOC] 1.下载httpd-2.4.12.tar.bz2 wget http://mirror.bit.edu.cn/apache/htt ...

  3. linux 下apache安装、启动和配置

    linux 下 apache安装 1:系统安装,这里就不说了,网上有很多,也很简单.顺便说下,我用的是redhat 9: 2:在图形界面下下载apache 安装包,我下的是 httpd-2.2.9.t ...

  4. 在linux下手动安装 apache, php, mysql--终极版

    在linux下手动安装 apache, php, mysql: 参考: http://www.cnblogs.com/lufangtao/archive/2012/12/30/2839679.html ...

  5. Linux下yum安装MySQL

    写这篇文章的原因是:在刚开始使用Linux操作系统时想要搭建LAMP环境,于是开始在Google和百度上各种寻找资料,碰到了不是很多的问题后,我决定写这篇文章总结一下在Linux下yum安装MySQL ...

  6. LINUX下编译安装PHP各种报错大集合

    本文为大家整理汇总了一些linux下编译安装php各种报错大集合 ,感兴趣的同学参考下. nginx1.6.2-mysql5.5.32二进制,php安装报错解决: 123456 [root@clien ...

  7. 【夯实PHP基础系列】linux下yum安装PHP APC

    Alternative PHP Cache(可选PHP缓存),依赖于 PECL扩展库 用源码方式安装,直接yum就行了:首先要安装apc的依赖包:yum install php-pear php-de ...

  8. Linux学习心得之 Linux下ant安装与使用

    作者:枫雪庭 出处:http://www.cnblogs.com/FengXueTing-px/ 欢迎转载 Linux学习心得之 Linux下ant安装与使用 1. 前言2. ant安装3. 简单的a ...

  9. Linux下php安装Redis扩展

    说明: 操作系统:CentOS php安装目录:/usr/local/php php.ini配置文件路径:/usr/local/php7/etc/php.ini Nginx安装目录:/usr/loca ...

随机推荐

  1. Python爬虫框架Scrapy安装使用步骤

    一.爬虫框架Scarpy简介Scrapy 是一个快速的高层次的屏幕抓取和网页爬虫框架,爬取网站,从网站页面得到结构化的数据,它有着广泛的用途,从数据挖掘到监测和自动测试,Scrapy完全用Python ...

  2. lower_bound和upper_bound算法实现

    lower_bound算法要求在已经按照非递减顺序排序的数组中找到第一个大于等于给定值key的那个数,其基本实现原理是二分查找,如下所示: int lower_bound(vector<int& ...

  3. Python的lambda匿名函数

    lambda函数也叫匿名函数,即,函数没有具体的名称.先来看一个最简单例子: def f(x):return x**2print f(4) Python中使用lambda的话,写成这样 g = lam ...

  4. iOS 之 调试、解决BUG

    iOS 解决一个复杂bug 之 计分卡 iOS 调试 之 打印 iOS 错误之 NSObject .CGFloat iOS bug 之 H5 页面没有弹出提示框 iOS 日志工具 CocoaLumbe ...

  5. [UT]Unit Test理解

    Coding中有一个原则:Test Driven Development.  UT中的一些基本概念: 1. 测试驱动 2. 测试桩 3. 测试覆盖 4. 覆盖率 单体测试内容: 1. 模块接口:测试模 ...

  6. curl远程传输工具

    /** * curl远程传输工具 */ public function post_curl($url,$body,$header,$type='POST'){ $ch = curl_init(); c ...

  7. JavaScript 扯几句单线程相关

    JavaScript 扯几句单线程相关 众所周知,Javascript是单线程执行的,这也就是说:JavaScript在同一个时间上只能处理一件事.他不像C,Java等这些多 线程的,可以开不同的线程 ...

  8. Activity的生命周期与加载模式——Activity的生命周期演示

    当Activity处于Android应用中运行时,它的活动状态由Android以Activity栈的形式管理.当前活动的Activity位于栈顶.随着不同应用的运行,每个Activity都有可能从活动 ...

  9. Spring EL中的类操作符

    <?xml version="1.0" encoding="UTF-8"?> <beans xmlns:xsi="http://ww ...

  10. 选择法排序 vb.net

    Imports System.ThreadingModule Module1    Sub Main()        'test code        'Dim a, b As Integer   ...