Installation of Apache HTTPD

转载链接: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.


本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/276449.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

iPhone开发四剑客之《Objective-C基础教程》

iPhone 开发四剑客之《Objective-C 基础教程》 Objective-C 语言是 C 语言的一个扩展集,许多(可能是大多数)具备 Mac OS X 外观的应用程序都是使用该语言开发的。它以 C 语言为基础,添加了一些微妙但意义重大的特性。 苹果公司为…

教师节,你记忆中老师说过印象最深的是什么话?(抽奖)

我记忆中老师说过印象最深的话小学老师:1、小学语文老师李老师说,以后你们可能带个手机就可以支付了~不需要带现金。(在杭州确实实现了,用支付宝即可) 2、小学数学老师李老师说:好好读书的目的是啥&#xf…

Spark List组件滚动条加事件使datalist数据发生变化

<?xml version"1.0" encoding"utf-8"?><!-- http://blog.flexexamples.com/2009/05/31/detecting-when-the-vertical-scroll-bar-is-scrolled-on-a-spark-list-control-in-flex-4/ --><s:Application name"Spark_List_scroller_vert…

keras训练完以后怎么预测_还在使用“龟速”的单显卡训练模型?动动手,让TPU节省你的时间...

点击上方关注&#xff0c;All in AI中国本文将介绍如何使用Keras和Google CoLaboratory与TPU一起训练LSTM模型&#xff0c;与本地计算机上的GPU相比&#xff0c;这样训练能大大缩短训练时间。很长一段时间以来&#xff0c;我都在单张GTX 1070显卡上训练我的模型&#xff0c;它的…

PHP5加载|安装外部C动态库

[1] cd php-5.3.9/ext[2] ./ext_skel --extnamencdocxml[3] cd ncdocxml[4] nano -w config.m4############删除 3 个 dnldnl PHP_ARG_WITH(my_module, for my_module support,dnl Make sure that the comment is aligned:dnl [ --with-my_module Include my_module support])或…

手把手教你写个小程序定时器管理库

背景凹凸曼是个小程序开发者&#xff0c;他要在小程序实现秒杀倒计时。于是他不假思索&#xff0c;写了以下代码&#xff1a;Page({init: function () {clearInterval(this.timer)this.timer setInterval(() > {// 倒计时计算逻辑console.log(setInterval)})}, })可是&…

[New Portal]Windows Azure Virtual Machine (14) 在本地制作数据文件VHD并上传至Azure(1)

《Windows Azure Platform 系列文章目录》 之前的内容里&#xff0c;我介绍了如何将本地的Server 2012中文版 VHD上传至Windows Azure&#xff0c;并创建基于该Server 2012 VHD的虚拟机。 我们知道&#xff0c;VHD不仅仅可以保存操作系统&#xff0c;而且可以保存数据文件。 如…

python 退出程序_Python:用Ctrl+C解决终止多线程程序的问题!(建议收藏)

前言&#xff1a;今天为大家带来的内容是Python:用CtrlC解决终止多线程程序的问题&#xff01;文章中的代码具有不错的参考意义&#xff0c;希望在此能够帮助到各位&#xff01;(多数代码用图片的方式呈现出来&#xff0c;方便各位观看与收藏)出发点&#xff1a;前段时间&#…

Mysql InnoDB Plugin安装 install

转载链接&#xff1a;http://www.orczhou.com/index.php/2010/03/innodb-plugin-setup/ InnoDB Plugin较之Built-in版本新增了很多特性&#xff1a;包括快速DDL、压缩存储等&#xff0c;而且引入了全新的文件格式Barracuda。众多测试也表明&#xff0c;Plugin在很多方面优于Bu…

Hibernate的数据过滤查询

数据过滤并不是一种常规的数据查询方法&#xff0c;而是一种整体的筛选方法。数据过滤也可对数据进行筛选&#xff0c;因此&#xff0c;将其放在Hibernate的数据查询框架中介绍。 如果一旦启用了数据过滤器&#xff0c;则不管数据查询&#xff0c;还是数据加载&#xff0c;该过…

若川知乎高赞:有哪些必看的 JS 库?

欢迎星标我的公众号&#xff0c;回复加群&#xff0c;长期交流学习我的知乎回答目前2w阅读量&#xff0c;270赞&#xff0c;现在发到公众号声明原创。必看的js库&#xff1f;只有当前阶段值不值看。我从去年7月起看一些前端库的源码&#xff0c;历时一年才写了八篇《学习源码整…

python用for循环求10的因数_python for循环练习(初级)

for循环练习1for i in range(4):print(i)D:\尚硅谷Python\venv\Scripts\python.exe D:/尚硅谷Python/test.py0123for循环练习2for x in range(1,40,5): #间隔5print(x)D:\尚硅谷Python\venv\Scripts\python.exe D:/尚硅谷Python/test.py16111621263136打印99乘法表for i in ran…

基于EasyUI的Web应用程序及过去一年的总结

前言 一个多月之前已经提交了离职申请&#xff0c;好在领导都已经批准了&#xff0c;过几天就办理手续了&#xff0c;在此感谢领导的栽培与挽留&#xff0c;感谢各位同事在工作中的给我的帮助&#xff0c;离开这个团队确实有一些不舍&#xff0c;不为别的&#xff0c;只因为这个…

MySQL外键创建失败1005原因总结

1、安装mysql有InnoDB的插件扩展 ./configure --prefix/usr/local/mysql --with-pluginscsv,innobase,myisam,heap,innodb_plugin 2、找不到主表中 引用的列 3、主键和外键的字符编码不一致 4、外键字段与要做外键校验的字段类型不匹配 5、MySQL支持外键约束&#xff0c;并…

Hibernate的事件机制

4.8 事 件 机 制 通常&#xff0c;Hibernate执行持久化过程中&#xff0c;应用程序无法参与其中。所有的数据持久化操作&#xff0c;对用户都是透明的&#xff0c;用户无法插入自己的动作。 通过事件框架&#xff0c;Hibernate允许应用程序能响应特定的内部事件&#xff0c;从而…

快速使用Vue3最新的15个常用API

之前我写了一篇博客介绍了Vue3的新特性&#xff0c;简单了解了一下Vue3都有哪些特色&#xff0c;并且在文末带大家稍微体验了一下Vue3中 Compsition API 的简单使用上一篇文章地址&#xff1a;紧跟尤大的脚步提前体验Vue3新特性&#xff0c;你不会还没了解过Vue3吧因为这个月的…

超级马里奥代码_任天堂的源码泄露,揭示超级马里奥的前世之生

被黑客盯上的任天堂任天堂遭到了史上最大规模的黑客攻击&#xff0c;Wii 完整源码、设计以及《宝可梦》多部作品的信息遭到泄露&#xff0c;而此次泄露事件的后续影响似乎也爆发了出来。《马里奥赛车》和《超级马里奥世界2》(耀西岛)的早期原型视频&#xff0c;以及《超级马里奥…

行者寂寞

公元2009年7月20日。闰五月廿八。炎日&#xff0c;汗如雨。晨行。病卧于京西客站。是夜&#xff0c;不能寐。 公元2009年7月21日。闰五月廿九。戏于清华&#xff0c;游于星巴克。汗如雨。是夜&#xff0c;困于京国际机场5小时。 公元2009年7月22日。六月初一。晨时抵宁。大雨。…

Azure PowerShell (1) PowerShell整理

《Windows Azure Platform 系列文章目录》 把之前Azure ASM的PowerShell都整理好了。 https://github.com/leizhang1984/AzureChinaPowerShell

漫画 | 前端发展史的江湖恩怨情仇

时间总是过得很快&#xff0c; 似乎快得让人忘记了昨天&#xff0c;前端WEB领域的发展更是如此&#xff0c;转眼间已是近30年&#xff0c;时光荏苒&#xff0c;初心不变&#xff0c;在一代又一代前端人的努力下&#xff0c;前端已经是互联网不可或缺的一部分。然而很多前端打工…