`
dawuafang
  • 浏览: 1108316 次
文章分类
社区版块
存档分类
最新评论

CentOS 安装 apache tar & APR tar

 
阅读更多



今天把apache安装到了centos装,安装的过程中遇到了大家基本都遇到的问题就是缺少依赖包或者依赖包版本不够。下面简述下安装过程,以及解决方案。


./configure --prefix=/usr/local/apache --enable-track-vars --enable-cgi --with-config-file-path=/usr/local/apache/conf

首先下载相应的tar包,apache,apr,apr-util。


1.首先解压apache的tar包。

tarzxvf httpd-2.4.3.tar.gz

cd httpd-2.4.3

./configure --prefix=/usr/local/apache --enable-track-vars --enable-cgi --with-config-file-path=/usr/local/apache/conf

make

make install


如果不缺少依赖包的话,就应该完成,但是可能会遇到缺少apr包,或者是apr包版本过低的情况,apr是(Apache portable Run-time libraries,Apache可移植运行库)的目的如其名称一样,主要为上层的应用程序提供一个可以跨越多操作系统平台使用的底层支持接口库。我遇到的是apm包版本过低,因为我通过yum安装过apr包,所以我通过yum remove apr-*删除到安装过的apr包,然后重新安装 apr 和apr-util

方法如下:基本和安装apache的方法差不多。

#######安装apr#########
tarzxvf apr-1.4.2.tar.gz;
cdapr-1.4.2;
./configure --prefix=/usr/local/apr;
make;
makeinstall;

tarzxvf apr-util-1.3.10.tar.gz;
cdapr-util-1.3.10;
./configure --with-apr=/usr/local/apr;
make;
makeinstall;

安装apr的过程中可能会遇到rm: cannot remove `libtoolT': No such file or directory
如果遇到上述情况,则vim configure 在30048行 注释 掉$RM "$cfgfile" 重新执行.configure即可。


安装完毕以后重新进入apache解压以后的包执行
./configure --prefix=/usr/local/apache --enable-track-vars --enable-cgi --with-config-file-path=/usr/local/apache/conf
应该就ok了喔。

下边简单说说编译的这些的意思,--prefix=//usr/local/mysql/apache 指定把apahce安装到//usr/local/mysql/apache目录中;--enable-cgi 支持CGI;--with-config-file-path=//usr/local/mysql/apache/conf 指定把apache的配制文件放在//usr/local/mysql/apache/conf中;比如httpd.conf配制文件就在这个目录中;--enable-track-vars 为启动cookie的get/post等追踪功能差不多编译好了。
/usr/local/apache/bin/apachectl start

至此安装应该差不多就安装完成了。

分享到:
评论

相关推荐

    centos7中安装apache的安装包

    centos7中安装apache的安装包,这些安装包有httpd-2.4.23.tar.gz apr-1.5.2.tar.gz apr-util-1.5.4.tar.gz zlib-1.2.8.tar.gz pcre-8.39.tar.gz

    Virtualbox安装centos 图解

    常见问题:安装Apache提示APR not found的解决办法.... 135 常见问题:关于CentOS安装SAMBA服务器在windows下无法访问.... 137 常见问题:apache和tomcat整合(linux). 142 常见问题:./runInstaller前缺包报错:...

    centos7安装配置apache

    源代码安装示例—–Apache服务器 1、 登录www.apache.org 网站下载linux版,文件名 httpd-version.tar.gz(version为版本号,有 tar.bz2和tar.gz两个版本) 2、 httpd-2.4.43.tar.gz ...

    apr-util-1.4.1.tar.gz

    CentOS 6.2下使用的Apache库文件 apr-util-1.4.1.tar.gz

    CentOS 6.3 安装配置Apache2.2.6的方法(源码编译安装)

    安装说明 ...软件:httpd-2.2.6.tar.gz | pcre-8.32.tar.gz | apr-1.4.6.tar.gz | apr-util-1.5.1.tar.gz 下载地址:http://mirror.bjtu.edu.cn/apache/httpd/ http://apr.apache.org/download.cgi ...

    CentOS7.6源码编译安装Apache

      安装Apache之前,我们需要安装编译Apache和所依赖的一些软件包,其中有:gcc、gcc-c++、apr、apr-util、pcre等包。   ① 安装gcc、gcc-c++编译环境 [root@localhost ~]# yum install gcc gcc-c++   ② 安装...

    在Centos 源码安装Apache并部署网站模板

    [root@localhost src] # wegt https://downloads.apache.org/apr/apr-1.6.5.tar.gz ②下载apr-util-1.6.1.tar.gz [root@localhost src] # wegt https://downloads.apache.org/apr/apr-util-1.6.1.tar.gz ③下载httpd...

    apr-1.4.6.tar.gz

    在CentOS 6.2 下使用的 apr(Apache库文件)。

    apache集群部署.zip

    资源包含apache服务器安装包,不包含tomcat安装包,可以自行下载,包含支持centos7离线安装apache所需依赖,apr-1.4.5.tar、apr-util-1.3.12.tar、pcre-8.10.tar或pcre-8.44.tar

    apr-1.5.2.tar.gz

    apr1.6在编译安装Apache时会报错,无法动态连接到相关依赖,换回1.5就可以了,

    httpd-2.4.33安装(附安装包,亲测好用)

    #CentOS-7.3安装apache 创建webapp用户,cd /home/webapp yum install -y bzip2 zip unzip gcc gcc-c++ expat-devel tar jxvf httpd-2.4.33.tar.bz2 tar jxvf apr-1.6.3.tar.bz2 tar zxvf apr-util-1.6.1.tar.gz ...

    Apache Web服务器安装

    1.进入Apache官网下载 httpd-2.4.41.tar.bz压缩包到本地目录(需yum install lrzsz -y 上传下载软件) http://httpd.apache.org/download.cgi ...5.安装apr相关移植库模块 yum install apr apr-devel apr-util-devel-

    nginx+tomcat高可用、高性能jsp集群

    wget http://archive.apache.org/dist/apr/apr-util-1.3.9.tar.gz #================================ 1、安装tomcat、JDK ================================= mv apache-tomcat-6.0.32.tar.gz jdk-6u25-linux-i586....

    Centos纯手撸 源码搭建 PHP环境所需资源包

    https://upcto.blog.csdn.net/article/details/127400995中,所对应版本的资源包,直接下载可绕坑,有...(加速)eaccelerator-0.9.6.1.zip,apr-1.4.6.tar.gz,apr-util-1.5.1.tar.gz,autoconf-2.61.tar.gz........

Global site tag (gtag.js) - Google Analytics