分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 网页技术

Apache安装

发布时间:2023-09-06 02:24责任编辑:赖小花关键词:暂无标签
第一步:download

$ wget http://mirrors.tuna.tsinghua.edu.cn/apache//httpd/httpd-2.4.37.tar.gz$ wget http://mirrors.hust.edu.cn/apache//apr/apr-1.6.5.tar.gz$ wget http://mirrors.hust.edu.cn/apache//apr/apr-util-1.6.1.tar.gz

第二步: 安装apr

$ tar -zxvf apr-1.6.5.tar.gz$ cd apr-1.6.5$ ./configure --prefix=/usr/local/apr-1.6.5$ make && make install

> 错误:rm: cannot remove `libtoolT‘: No such file or directory
> 解决方式:
> <br/>&gt; $ yum install -y libtool<br/>&gt; $ sed -i ?s/"RM=‘\$RM‘"/"RM=‘\$RM -f‘"/ configure<br/>&gt;

第三步:安装apr-utils

$ tar -zxvf apr-util-1.6.1.tar.gz$ cd apr-util-1.6.1$ ./configure --prefix=/usr/local/apr-util-1.6.1 --with-apr=/usr/local/apr-1.6.5$ make && make install

第四步: 安装httpd

$ tar -zxvf httpd-2.4.35.tar.gz$ ./configure --prefix=/usr/local/httpd-2.4.35 ??????????????--with-apr=/usr/local/apr-1.6.5 ??????????????--with-apr-util=/usr/local/apr-util-1.6.1 ??????????????--enable-so ??????????????--enable-ssl ??????????????--enable-cgi ??????????????--enable-rewrite ??????????????--with-pcre ??????????????--with-zlib ??????????????--with-mpm=event ??????????????--enable-modules=most ??????????????--enable-mpms-shared=all$ make && make install

选项说明

  • --enable-so: 启用模块动态卸载
  • --enable-ssl: 开启SSL支持
  • --enable-cgi: 开启cgi支持
  • --enablre-rewirte: 支持URL重写
  • --with-pcre: 开启正则支持
  • --with-zlib: 开启数据压缩支持
  • --enable-modules=most: 尽可能多的启用模块
  • --enable-mpms-shared=all: 以共享的方式编译所有mpm模块
  • --with-mpm=event: 指定httpd工作模型为event

第五步: 启动Apache

$ cd /usr/local/httpd-2.4.35$ ./bin/apachectl start

记录依赖

  • wget
  • gcc
  • libtool
  • expat-devel
  • pcre-devel
  • openssl-devel
  • libxml2-devel

Apache安装

原文地址:http://blog.51cto.com/idweb/2322075

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved