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.pswp.cn/news/276449.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/276449.shtml
英文地址,請注明出處:http://en.pswp.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;前端已經是互聯網不可或缺的一部分。然而很多前端打工…