分享web开发知识

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

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

手工编译安装Apache

发布时间:2023-09-06 02:12责任编辑:顾先生关键词:编译
软件包链接:https://pan.baidu.com/s/1e7AHrQnK2kwR3jZulpL3ow 密码:yt3b
第一步:mount.cifs //192.168.176.1/LAMP /opt/lamp
第二步:tar xzvf httpd-2.4.2.tar.gz -C /opt
tar xzvf apr-1.4.6.tar.gz -C /opt ?(支持Apache上层应用跨平台,提供底层接口库)
tar xzvf apr-util-1.4.1.tar.gz -C /opt

第三步:cp -R ?apr(解压后的文件夹) /opt/httpd-2.4.2/srclib/apr
cp -R ?apr-util(解压后的文件夹) /opt/httpd-2.4.2/srclib/apr-util

第四步:安装 gcc 、 gcc-c++ ?、 make ?、 pcre、pcre-devel 四个包
(pcre : 一个Perl库,支持正则表达式)

第五步:cd /opt/httpd-2.4.2(到httpd的目录下)
.配置:/configure \
--prefix=/usr/local/apache \
--enable-so \
--enable-rewrite \
--enable-mods-shared=most \
--with-mpm=worker \
--disable-cgid \
--disable-cgi

第六步:make && make install
**第七步:vi /etc/init.d/httpd 在文件最前面插入下面的行

#!/bin/sh

chkconfig:2345 85 15

# description:Apache is a World Wide Web server.


第八步:chmod +x /etc/init.d/httpd ??//给httpd执行1权限
chkconfig --add httpd
chkconfig --list httpd
chkconfig --level 35 httpd on

第九步:建立软连接便于管理 ?ln -s /usr/local/apache/conf/httpd.conf /etc/httpd.conf (注意:软连接使用绝对路径)
**第十步:vi /usr/local/apache/conf/httpd.conf

Listen:IPV4
ServerName:主机名.域名

**
第十一步: ?
service httpd stop
service httpd start

主页存放路径为:/usr/local/apache/htdocs/index.html

手工编译安装Apache

原文地址:http://blog.51cto.com/13706698/2165434

知识推荐

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