apache 2.4的安装和 apache2.2的安装有所不同

首先进入 http://apr.apache.org/download.cgi

下载 apr 和 apr-util 两个软件包

yum -y install gcc-c++ libtool-libs  安装所需的依赖包

安装 apr

tar -zxvf apr-1.5.2.tar.gz

cd apr-1.5.2

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

make

make install

make clean

apr安装完毕

安装 apr-util

tar -zxvf apr-util-1.5.4.tar.gz

cd apr-util-1.5.4

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

make

make install

make clean

apr-util 安装完毕

安装 pcre

tar -zxvf pcre-8.31.tar.gz

cd pcre-8.31

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

make

make install

make clean

pcre 安装完毕

安装 openssl

tar -zxvf openssl-1.0.1c.tar.gz

cd openssl-1.0.1c

./config no-shared no-idea no-mdc2 no-rc5 zlib enable-tlsext no-ssl2 --prefix=/usr/local/openssl

make depend

make install

安装openssl 完毕

安装 apache2.4

tar -zxvf httpd-2.4.12

cd httpd-2.4.12

./configure --prefix=/usr/local/apache --with-mpm=worker --enable-cache --enable-disk-cache --enable-mem-cache --enable-file-cache --enable-so --enable-rewrite --enable-ssl --enable-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre --with-ssl=/usr/local/openssl/ --enable-modules=most

make

make install

cp /usr/local/apache/bin/apachectl /etc/init.d/httpd
    vi /etc/init.d/httpd 在第二行加入以下两行内容

# chkconfig: 2345 10 90

# description: Activates/Deactivates Apache Web Server

/sbin/chkconfig --add httpd
      /sbin/chkconfig --level 2345 httpd on

groupadd www

useradd -g www -s /sbin/nologin www

chown -R www:www /usr/local/apache

5. 关闭selinux

           A 不需要重启Linux:
            setenforce 0
           B 需要重启Linux:
           vi /etc/selinux/config 将SELINUX=enforcing 改成SELINUX=disable

6. 修改apache的配置文件 httpd.conf

            1.  将  AllowOverride None  改成  AllowOverride all

2.  修改错误日志的配置

ErrorLog "| /usr/local/apache/bin/rotatelogs /var/log/apache_log/%Y_%m_%d_error_log 86400 480"

3.  修改访问日志的配置

CustomLog "| /usr/local/apache/bin/rotatelogs /var/log/apache_log/%Y_%m_%d_access_log 86400 480" combined

4.禁止列目录

Options FollowSymLinks

5 修改运行的用户和用户组

User www
            Group www

6. 在 最后一行添加

ServerName 127.0.0.1  (实际服务器的ip)

 域名配置

<VirtualHost *:80>
DocumentRoot /www/web/project
ServerName www.domain.com
ServerAlias domain.com
directoryindex index.html index.php
defaulttype text/html
addtype application/x-httpd-php .html
adddefaultcharset utf-8

<Directory /www/web/project/>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

关闭防火墙 

chkconfig iptables off

service iptables stop

重启服务器

           shutdown -r now

访问

http://www.domain.com

如果访问正常 就OK  如果访问不正常 可以根据实际情况进行调整

centos 6.5 64位编译 apache2.4的更多相关文章

  1. CentOS 6.3 64位下MySQL5.1.54源码安装配置详解

    安装环境:CentOS 6.3 64位 一:先安装依赖包(不然配置的时候会报错的!) yum -y install ncurses* libtermcap* 新建mysql用户 [root@clien ...

  2. CentOS 6.5 64位下安装Redis3.0.2的具体流程

    系统环境:CentOS 6.5 64位 安装方式:编译安装 防火墙:开启 Redis版本:Redis 3.0.2 一.环境准备 1.安装 gcc gcc-c++ [root@iZ94ebgv853Z ...

  3. win8.1(64位) apache2.4.3+php5.6.3+mysql5.6安装

    win8.1(64位) apache2.4.3+php5.6.3+mysql5.6安装 http://blog.csdn.net/jiangzeyun/article/details/41676639

  4. win7 64位的apache2.4.9+php5.5+mysql5.6的安装

    Win7 下64位的apache2.4.9+php5.5+mysql5.6.19的安装 1.首先下载文件 httpd-2.4.9-win64-VC11.zip(http://www.apachelou ...

  5. [转] 关于VS中区分debug与release,32位与64位编译的宏定义

    在vs编程中,常常涉及到32位和64位程序的编译,怎么判断当前编译是32位编译还是64位编译?如何判断是debug下编译还是release下编译?因为之前用到,这里记录一下,省的忘了又要疯狂的goog ...

  6. VS 2008的64位编译环境的安装和使用

    1. 安装64位编译环境 最近准备编译64位版本的程序.因为之前已经安装了VS 2008,开始以为只是使用VS 2008的安装文件添加功能即可,后来发现没这么简单.直接双击VS 2008的安装文件来安 ...

  7. Windows 64位系统安装Apache2.4

    Windows 64位系统安装Apache2.4 来自:百度经验:jingyan.baidu.com 现在大部分一键安装包多是32位的,并不支持64位,直接在64位的系统上使用会报错的,所以我这里就来 ...

  8. [转]VS2013+简单稀疏光束调整库SSBA配置(64位编译)

    有关SSBA库的资源比较少,我是在Github上搜索下载的,具体的GitHub官方下载地址为:SSBA 下载后在SSBA解压文件夹下新建文件夹build. 打开cmake gui,在source co ...

  9. linux gcc 区分32位或64位编译 && 请问arm存储,是以小端格式还是以大端格式?

    linux gcc 区分32位或64位编译   Linux系统下程序如何区分是64位系统还是32位系统 经过对include的翻查,最后确定gcc以__i386__来 进行32位编码,而以__x86_ ...

随机推荐

  1. “System.Data.OracleClient.OracleConnection”已过时

    处理办法: 在oracle 安装目录下 找到 Oracle.DataAccess.dll添加引用,然后 using Oracle.DataAccess.Client;其他的都不用动,即可.连接字符串中 ...

  2. onclick事件分析

     有些时候,我们想实现这样的一种效果:      <a href="imgs/2.jpg" title="A fireworks display" onc ...

  3. 转 cocos2dx内存优化

    cocos2dx里面,sprite本身不消耗多少内存,只是关联的材质文件消耗内存.假设有10个sprite关联同一个材质,也不会有10倍消耗. 关于图片占用的材质内存,我觉得还有好几种优化手段:1.对 ...

  4. HBase介绍及简易安装(转)

    HBase介绍及简易安装(转) HBase简介 HBase是Apache Hadoop的数据库,能够对大型数据提供随机.实时的读写访问,是Google的BigTable的开源实现.HBase的目标是存 ...

  5. python把元组组合成字典

    list=((","16g"), (","32g"), (","red"), (","bl ...

  6. z-score

    标准分数(standard score)也叫z分数(z-score),是一个分数与平均数的差再除以标准差的过程.用公式表示为: z=(x-μ)/σ.其中x为某一具体分数, μ为平均数,σ为标准差. Z ...

  7. Fatal error compiling: 无效的目标发行版: 1.8 -> [Help 1] (zhuan)

    http://blog.csdn.net/z18137017273/article/details/53033613 ***************************************** ...

  8. VirtualBox没有64位选项,无法安装64位的解决方法(zhuan)

    http://www.askmaclean.com/archives/vbox-virtualbox-64-bit.html ************************************* ...

  9. 小心Windows7的UTF-8代码页

    目录 第1章小心Windows7的UTF-8代码页    1 1.1 UTF-16与UTF-8相互转换    1 1.1.1 使用Windows API    1 1.1.2 自己编码    1 1. ...

  10. Unity shader(CG) 写一个 散色、折射、反射、菲涅尔、gamma、简单后期屏幕特效

    http://www.lai18.com/content/506918.html 1.自生要求是很重要的,当然不是什么强迫工作之类的,而是自己有限的能力上不断的扩展兴趣上的内容. 2.用生活的眼光去发 ...