centos 6.5 64位编译 apache2.4
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的更多相关文章
- CentOS 6.3 64位下MySQL5.1.54源码安装配置详解
安装环境:CentOS 6.3 64位 一:先安装依赖包(不然配置的时候会报错的!) yum -y install ncurses* libtermcap* 新建mysql用户 [root@clien ...
- CentOS 6.5 64位下安装Redis3.0.2的具体流程
系统环境:CentOS 6.5 64位 安装方式:编译安装 防火墙:开启 Redis版本:Redis 3.0.2 一.环境准备 1.安装 gcc gcc-c++ [root@iZ94ebgv853Z ...
- 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
- 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 ...
- [转] 关于VS中区分debug与release,32位与64位编译的宏定义
在vs编程中,常常涉及到32位和64位程序的编译,怎么判断当前编译是32位编译还是64位编译?如何判断是debug下编译还是release下编译?因为之前用到,这里记录一下,省的忘了又要疯狂的goog ...
- VS 2008的64位编译环境的安装和使用
1. 安装64位编译环境 最近准备编译64位版本的程序.因为之前已经安装了VS 2008,开始以为只是使用VS 2008的安装文件添加功能即可,后来发现没这么简单.直接双击VS 2008的安装文件来安 ...
- Windows 64位系统安装Apache2.4
Windows 64位系统安装Apache2.4 来自:百度经验:jingyan.baidu.com 现在大部分一键安装包多是32位的,并不支持64位,直接在64位的系统上使用会报错的,所以我这里就来 ...
- [转]VS2013+简单稀疏光束调整库SSBA配置(64位编译)
有关SSBA库的资源比较少,我是在Github上搜索下载的,具体的GitHub官方下载地址为:SSBA 下载后在SSBA解压文件夹下新建文件夹build. 打开cmake gui,在source co ...
- linux gcc 区分32位或64位编译 && 请问arm存储,是以小端格式还是以大端格式?
linux gcc 区分32位或64位编译 Linux系统下程序如何区分是64位系统还是32位系统 经过对include的翻查,最后确定gcc以__i386__来 进行32位编码,而以__x86_ ...
随机推荐
- flex布局注意点:
1.父元素display:flex之后成为伸缩容器,子元素(除了position:absolute或fixed)无论是display:block或者display:inline,都成为了伸缩项目.2. ...
- jQuery EasyUI DataGrid API 中文文档
扩展自$.fn.panel.defaults,用 $.fn.datagrid.defaults重写了 defaults . 依赖 panel resizable linkbutton pagi ...
- C#开发Activex控件(2)
打包成CAB安装包生成了msi文件,用户安装的时候会像安装普通软件一样,需多次一步安装,打包成cab文件的方式,做到用户点击运行后,即可自动安装. 在这里需要准备文件有: (1)cabarc.exe: ...
- 上不了Google是码农的悲哀
http://refyt.com/?r=34d1edb7dba42e8d 上不了Google是码农的悲哀.1. 资料大部分都在国外的网站,差不多倍感伤心.2. Google Play没有办法访问了.3 ...
- iOS - UITouch
前言 NS_CLASS_AVAILABLE_IOS(2_0) @interface UITouch : NSObject @available(iOS 2.0, *) public class UIT ...
- 一切都是对象 Thinking in Java 第二章
2.1 用引用操作对象 1.对象和引用联系起来,就可以通过引用来操作对象: 2.引用亦可单独存在,即没有和任何对象联系起来:对没有和对象联系起来的引用操作,会报错: 2.2 必须由你创建所有对象 1. ...
- 没办法,还是要补一下js,回调函数(转载)
<html> <head> <title>回调函数(callback)</title> <script language="javasc ...
- html块级元素和内联元素小结
Block element 块级元素 顾名思义就是以块显示的元素,高度宽度都是可以设置的.比如我们常用的<div>.<p>.<ul>默认状态下都是属于块级元素.块级 ...
- ORACLE 总结
1. diagnostic file(alertlog, tracefile, redolog), 监控数据库动作时间点 [troubleshooting] alertlog : 确认checkpoi ...
- Fragments
http://developer.android.com/guide/components/fragments.html#Design Content Design Philosophy Creati ...