转载链接:http://www.linuxfromscratch.org/blfs/view/svn/server/apache.html

Installation of Apache-2.4.7 HTTPD

For security reasons, running the server as an unprivileged user and group is strongly encouraged. Create the following group and user using the following commands asroot:

groupadd -g 25 apache &&
useradd -c "Apache Server" -d /srv/www -g apache \-s /bin/false -u 25 apache

Build and install Apache HTTPD by running the following commands:

patch -Np1 -i ../httpd-2.4.7-blfs_layout-1.patch &&
sed '/dir.*CFG_PREFIX/s@^@#@' -i support/apxs.in &&
./configure --enable-layout=BLFS                            \--enable-mods-shared="all cgi"                  \--enable-mpms-shared=all                        \--with-apr=/usr/bin/apr-1-config                \--with-apr-util=/usr/bin/apu-1-config           \--enable-suexec=shared                          \--with-suexec-bin=/usr/lib/httpd/suexec         \--with-suexec-docroot=/srv/www                  \--with-suexec-caller=apache                     \--with-suexec-userdir=public_html               \--with-suexec-logfile=/var/log/httpd/suexec.log \--with-suexec-uidmin=100 &&
make

This package does not come with a test suite.

Now, as the root user:

make install                                 &&mv -v /usr/sbin/suexec /usr/lib/httpd/suexec &&
chgrp apache           /usr/lib/httpd/suexec &&
chmod 4754             /usr/lib/httpd/suexec &&chown -v -R apache:apache /srv/www

Command Explanations

sed '/dir.*CFG_PREFIX/s@^@#@'...: Forces theapxs utility to use absolute pathnames for modules, when instructed to do so.

--enable-mods-shared="all cgi": The modules should be compiled and used as Dynamic Shared Objects (DSOs) so they can be included and excluded from the server using the run-time configuration directives.

--enable-mpm-shared=all: This switch ensures that all MPM (Multi Processing Modules) are built as Dynamic Shared Objects (DSOs), so the user can choose which one to use at runtime.

--enable-suexec: This switch enables building of theApache suEXEC module which can be used to allow users to run CGI and SSI scripts under user IDs different from the user ID of the calling web server.

--with-suexec-*: These switches control suEXEC module behavior, such as default document root, minimal UID that can be used to run the script under the suEXEC. Please note that with minimal UID 100, you can't run CGI or SSI scripts under suEXEC as the apache user.

... /usr/lib/httpd/suexec: These commands putsuexec wrapper into proper location, since it is not meant to be run directly. They also adjust proper permissions of the binary, making it setgidapache.

chown -R apache:apache /srv/www: By default, the installation process installs files (documentation, error messages, default icons, etc.) with the ownership of the user that extracted the files from the tar file. If you want to change the ownership to another user, you should do so at this point. The only requirement is that the document directories need to be accessible by thehttpd process with (r-x) permissions and files need to be readable (r--) by theapache user.

Configuring Apache

Config Files

/etc/httpd/httpd.conf and /etc/httpd/extra/*

Configuration Information

See /usr/share/httpd/manual/configuring.html for detailed instructions on customising yourApache HTTP server configuration file.

Boot Script

If you want the Apache server to start automatically when the system is booted, install the/etc/rc.d/init.d/httpd init script included in the blfs-bootscripts-20131023 package.

make install-httpd

Contents

Installed Programs: ab, apachectl, apxs, checkgid, dbmmanage, fcgistarter, htcacheclean, htdbm, htdigest, htpasswd, httpd, httxt2dbm, logresolve, and rotatelogs
Installed Libraries: None
Installed Directories: /etc/httpd, /srv/www, /usr/include/httpd, /usr/lib/httpd, /usr/share/httpd /var/log/httpd, and /var/run/httpd

Short Descriptions

ab

is a tool for benchmarking your Apache HTTP server.

apachectl

is a front end to the Apache HTTP server which is designed to help the administrator control the functioning of theApache httpd daemon.

apxs

is a tool for building and installing extension modules for the Apache HTTP server.

checkgid

is a program that checks whether it can setgid to the group specified. This is to see if it is a valid group for Apache2 to use at runtime. If the user (should be run as superuser) is in that group, or can setgid to it, it will return 0.

dbmmanage

is used to create and update the DBM format files used to store usernames and passwords for basic authentication of HTTP users.

htcacheclean

is used to clean up the disk cache.

htdbm

is used to manipulate the DBM password databases.

htdigest

is used to create and update the flat-files used to store usernames, realms and passwords for digest authentication of HTTP users.

htpasswd

is used to create and update the flat-files used to store usernames and passwords for basic authentication of HTTP users.

httpd

is the Apache HTTP server program.

httxt2dbm

is used to generate DBM files from text, for use in RewriteMap.

logresolve

is a post-processing program to resolve IP-addresses in Apache's access log files.

rotatelogs

is a simple program for use in conjunction with Apache's piped log file feature.

Installation of Apache HTTPD相关推荐

  1. Nginx为什么比Apache Httpd高效

    转载于:http://www.toxingwang.com/linux-unix/linux-basic/1712.html 一.进程.线程? 在回答nginx 为什么比apache更高效之前,必须要 ...

  2. Apache Httpd 2.2 配置CA证书,实现Https加密通讯

    什么是CA证书 关于什么是CA证书,以及如何使用Open-SSL申请和搭建CA证书,我们在之前的文章中已经有过介绍,这里不再赘述.若有疑问,可参考之前的文章. http://www.pojun.tec ...

  3. 红帽启动apache服务器_CentOS6.5环境下搭建Apache httpd服务器

    前期准备 1.CentOS6.5虚拟系统: 2.CentOS6.5 IP地址:192.168.1.101(局域网) 3.虚拟系统能链接外网 4.Centos6.5能通过SSH链接 设置iptables ...

  4. 【高可用HA】Apache (4) —— Mac下配置Apache Httpd负载均衡(Load Balancer)之mod_jk

    Mac下配置Apache Httpd负载均衡(Load Balancer)之mod_jk httpd版本: httpd-2.4.17 jk版本: tomcat-connectors-1.2.41 参考 ...

  5. Linux centos 下apache(httpd)编译安装

    1,下载apache(httpd)源码: https://httpd.apache.org/ 2,检查当前系统中是否已安装过apache,如安装过,则需要先卸载: 3,需要依赖APR,所以要先安装AP ...

  6. Apache httpd Server 配置正向代理

    背景 代理(Proxy),位于客户端与实际服务端之间,当客户端需要请求服务端内容时,先向代理发起请求,代理将请求转发到实际的服务器,再原路返回.也可以在代理服务器设置缓存,将实际服务器上不常变化的内容 ...

  7. JBoss 系列五十:使用Apache httpd(mod_jk)和JBoss构架高可用集群环境

    2019独角兽企业重金招聘Python工程师标准>>> 概述 前面JBoss 系列二:使用Apache httpd(mod_cluster)和JBoss构架高可用集群环境中我们介绍了 ...

  8. Apache Httpd + Subversion 搭建HTTP访问的SVN服务器

    最近要搭建一个SVN服务器.简单安装之后,本地访问没有问题,但作为服务器肯定是需要HTTP访问.搜索之后,以下是我按照网上的资料搭建的过程,以备后用和参考.(所有软件安装步骤略,没有特殊的,如果没有特 ...

  9. linux下编译httpd,Linux下编译安装Apache httpd 2.4

    Apache是世界使用排名第一的Web服务器软件.它可以运行在几乎所有广泛使用的计算机平台上,由于其跨平台和安全性被广泛使用,是最流行的Web服务器端软件之一.当前Apache版本为2.4,本文主要描 ...

最新文章

  1. Ubuntu下常用但是我容易忘记的命令总结(未完待续)
  2. 越小越好:为什么电子器件都这么小巧玲珑?
  3. shell按长度排序
  4. 使用eclipse开发Java web应用
  5. qml如何发布程序_首创PC端小程序直播发布会,360如何与手机厂商一起共振?
  6. Lenet神经网络实现
  7. 【旅行】1月17日镇江自驾游
  8. php -- 魔术方法 之 自动加载:__autoload()
  9. 换种思路去理解设计模式(上)
  10. [渝粤教育] 西南科技大学 管理学原理 在线考试复习资料
  11. android 迅雷 好用版本,迅雷不限速版本安卓下载-迅雷不限速版 安卓版v6.6.6-PC6安卓网...
  12. 深度学习论文: Slicing Aided Hyper Inference and Fine-tuning for Small Object Detection及其PyTorch实现
  13. 别踩白块游戏java项目总结_学习小游戏别踩白块总结
  14. jtds 支持 mysql 吗?_jTDS驱动兼容性问题
  15. v2ray本机和服务器连不上报错ocks: failed to transport all TCP response > io: read/write on closed pipe
  16. 大规模时间序列数据自动异常检测架构
  17. 唯一约束判断 细微差mysql别_50道MySQL面试题,查漏补缺看你掌握多少?(附答案解析)...
  18. 计算机协会发言稿范文,计算机协会社长就职演讲稿范文
  19. 支付宝、财付通、快钱 三种功能特点的不同
  20. 电脑连接WiFi后浏览器无法上网但其他软件正常使用——网络代理问题解决办法

热门文章

  1. Java基础 —— 异常
  2. 极限与连续知识点总结_高数上知识点期末复习 极限、连续、间断点(一)
  3. idea怎么直接拉去git_如何将GitHub上面的项目拉取到IDEA中
  4. win10计算机跑分,鲁大师如何跑分_鲁大师跑分详细教程
  5. mysql open-files-limit_在mysql 5.5中更改open-files-limit
  6. redisTemplate进行自增操作例子
  7. rocketmq 同步刷盘和异步刷盘以及主从复制之同步复制和异步复制你理解了吗
  8. android 的监控讲解,java android网络监测详解
  9. 电脑知识:磁盘分区相关知识笔记!
  10. 程序员难以攻克的十大难题