1、卸载apr、apr-util
  [root@centos6 LAMP]# yum remove apr apr-util

2、编译安装apr-1.5.1.tar.gz
  [root@centos6 LAMP]# tar zxvf apr-1.5.1.tar.gz
  [root@centos6 LAMP]# cd apr-1.5.1
  [root@centos6 apr-1.5.1]# ./configure --prefix=/usr/local/lamp/apr-httpd
  [root@centos6 apr-1.5.1]# make
  [root@centos6 apr-1.5.1]# make install

3、编译安装apr-util-1.5.4.tar.gz
  [root@centos6 LAMP]# tar zxvf apr-util-1.5.4.tar.gz
  [root@centos6 LAMP]# cd apr-util-1.5.4
  [root@centos6 apr-util-1.5.4]# ./configure --prefix=/usr/local/lamp/apr-util-httpd --with-apr=/usr/local/lamp/apr-httpd
  [root@centos6 apr-util-1.5.4]# make
  [root@centos6 apr-util-1.5.4]# make install

4、编译安装pcre-8.35.zip
  [root@centos6 LAMP]# unzip -o pcre-8.36.zip
  [root@centos6 LAMP]# cd pcre-8.36
  [root@centos6 pcre-8.36]# ./configure --prefix=/usr/local/lamp/pcre
  [root@centos6 pcre-8.36]# make
  [root@centos6 pcre-8.36]# make install

5、编译安装apache
  [root@centos6 LAMP]# tar -zxvf httpd-2.4.10.tar.gz
  [root@centos6 LAMP]# cd httpd-2.4.10
  [root@centos6 httpd-2.4.10]# ./configure --prefix=/usr/local/lamp/apache --enable-mods-shared=all --enable-deflate --enable-speling --enable-cache  --enable-file-cache --enable-disk-cache --enable-mem-cache --enable-so --enable-expires=shared --enable-rewrite=shared --enable-static-support --sysconfdir=/etc/httpd
--with-z=/usr/local/lamp/zlib --with-apr=/usr/local/lamp/apr-httpd --with-apr-util=/usr/local/lamp/apr-util-httpd --with-pcre=/usr/local/lamp/pcre/ --disable-userdir
  [root@centos6 httpd-2.4.10]# make && make instal

6、修改配置
  [root@centos6 httpd-2.4.10]# vi /etc/httpd/httpd.conf

  修改成 ServerName localhost:80

7、启动apache
  [root@centos6 httpd-2.4.10]# /usr/local/apache/bin/apachectl start

  浏览器访问本机IP地址,出现It works!,就OK了!

8、做成服务  [root@localhost apache]# echo "/usr/local/lamp/apache/bin/apachectl start" >> /etc/rc.d/rc.local
  [root@centos6 LAMP]# /usr/local/lamp/apache/bin/apachectl start
  [root@centos6 LAMP]# cp /usr/local/lamp/apache/bin/apachectl /etc/init.d/httpd
  [root@centos6 LAMP]# chmod +x /etc/init.d/httpd
  [root@centos6 ~]# chkconfig --add httpd
  注意:如果提示service httpd does not support chkconfig错误,解决办法:编辑/etc/rc.d/init.d/httpd在文件第二行加入         
    #chkconfig:2345 10 90
    #description:Activates/Deactivates Apache Web Server
  [root@centos6 ~]# chkconfig --level 2345 httpd on
  [root@centos6 LAMP]# service httpd restart

CentOS6.5安装LAMP环境APACHE的安装的更多相关文章

  1. CentOS 7.4 yum安装LAMP环境

    配置防火墙,开启80.3306端口.CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. #停止firewall服务 systemctl stop firewa ...

  2. ubuntu下安装lamp环境

    使用普通用户来安装lamp环境: 1.安装apache: sudo apt-get install apache2

  3. CentOS6.5下编译安装LAMP环境

    LAMP(Linux-Apache-MySQL-PHP)网站架构是目前国际流行的Web框架.该框架能够满足大流量.大并发量的网站需求:当然.也可以直接使用高性能的服务器.高性能的负载均衡硬件以及CDN ...

  4. Centos6.5添加Epel和Remi源安装Lamp环境

    想搭建一个Lamp环境,因为编译安装太麻烦,对于我这样的新手来说,太过于复杂.而CentOS自带的Apache.MySql和PHP的版本都太低,不想用.上百度搜了一轮,原来可以通过添加Epel和Rem ...

  5. 转:CentOS/Debian/Ubuntu一键安装LAMP(Apache/MySQL/PHP)环境

    CentOS/Debian/Ubuntu一键安装LAMP(Apache/MySQL/PHP) 今天遇到一个网友提到需要在Linux VPS服务器中安装LAMP(Apache/MySQL/PHP)网站环 ...

  6. CentOS 6.3下源码安装LAMP(Linux+Apache+Mysql+Php)环境【转载】

    本文转载自 园友David_Tang的博客,如有侵权请联系本人及时删除,原文地址: http://www.cnblogs.com/mchina/archive/2012/11/28/2778779.h ...

  7. CentOS6.3 编译安装LAMP(2):编译安装 Apache2.2.25

    所需源码包: /usr/local/src/Apache-2.2.25/httpd-2.2.25.tar.gz 编译安装 Apache2.2.25 #切换到源码目录 cd /usr/local/src ...

  8. CentOS 6.5系统使用yum方式安装LAMP环境和phpMyAdmin详细过程

    介绍如何在CentOs6.2下面使用YUM配置安装LAMP环境,一些兄弟也很喜欢使用编译的安装方法,个人觉得如果不是对服务器做定制,用yum安装稳定简单,何必去download&make&am ...

  9. CentOS 6.5系统使用yum方式安装LAMP环境和phpMyAdmin,mysql8.0.1/mysql5.7.22+centos7,windows mysql安装、配置

    介绍如何在CentOs6.2下面使用YUM配置安装LAMP环境,一些兄弟也很喜欢使用编译的安装方法,个人觉得如果不是对服务器做定制,用yum安装稳定简单,何必去download&make&am ...

随机推荐

  1. Function语义学之member function

    之前我们讲过编译器会对 nonmember functions 进行怎样的扩充和该写,今天我们来讲一下 member functions 函数调用方式 一.Nonstatic Member Funct ...

  2. Data 语义学(1)

    一.Data Member 的绑定(The binding of Data Member) extern float x; class Point3d { public: Point3d( float ...

  3. CH Round #49 - Streaming #4 (NOIP模拟赛Day2)

    A.二叉树的的根 题目:http://www.contesthunter.org/contest/CH%20Round%20%2349%20-%20Streaming%20%234%20(NOIP 模 ...

  4. 【模拟】【数学】CSU 1803 2016 (2016湖南省第十二届大学生计算机程序设计竞赛)

    题目链接: http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1803 题目大意: 给定n,m(n,m<=109)1<=i<=n,1& ...

  5. Java---网络编程(1)

    网络编程 相关基础概念 1.计算机网络与Internet 2.TCP/IP协议 3.Internet地址 - - -IP地址,形如xxx.xxx.xxx.xxx - - -域名系统.例如www.edu ...

  6. 数学概念——E 期望(经典问题)

    E - 期望(经典问题) Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%lld & %llu Submit S ...

  7. 如何解决升级WIN服务的时候,不暴力停止服务 达到升级的目的

    同一个WIN服务,分别部署在A.B两台服务器上,前面使用netscaler负载均衡 ,A和B被请求频繁,几乎时时刻刻都被请求   .PS:发布WIN服务的正常流程是,停止WIN服务->发布WIN ...

  8. springboot的restController使用swagger遇到的问题。

    在controller中使用swagger,使用注解ApiImplicitParam遇到一个问题 当方法的参数是走path的swggerui的参数展现是正常的, @PathVariable 但如果是走 ...

  9. MP3播放器的实现

    今天,基本上实现了MP3播放器的基本功能,现在总结一下. 首先,下载服务器端的MP3列表,这里用到了下载技术和解析XML文件技术. 下载参考(http://blog.csdn.net/huim_lin ...

  10. 全面剖析XML和JSON

    1.定义介绍 (1).XML定义扩展标记语言 (Extensible Markup Language, XML) ,用于标记电子文件使其具有结构性的标记语言,可以用来标记数据.定义数据类型,是一种允许 ...