1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
4 <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7 This file is generated from xml source: DO NOT EDIT
8 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
10 <title>Using Apache With RPM Based Systems (Redhat / CentOS / Fedora) - Apache HTTP Server Version 2.5</title>
11 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
12 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
13 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
14 <script src="../style/scripts/prettify.min.js" type="text/javascript">
17 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
18 <body id="manual-page"><div id="page-header">
19 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
20 <p class="apache">Apache HTTP Server Version 2.5</p>
21 <img alt="" src="../images/feather.png" /></div>
22 <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
24 <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.5</a> > <a href="./">Platform Specific Notes</a></div><div id="page-content"><div id="preamble"><h1>Using Apache With RPM Based Systems (Redhat / CentOS / Fedora)</h1>
26 <p><span>Available Languages: </span><a href="../en/platform/rpm.html" title="English"> en </a> |
27 <a href="../fr/platform/rpm.html" hreflang="fr" rel="alternate" title="Français"> fr </a></p>
31 <p>While many distributions make Apache httpd available as operating system
32 supported packages, it can sometimes be desirable to install and use the
33 canonical version of Apache httpd on these systems, replacing the natively
34 provided versions of the packages.</p>
36 <p>While the Apache httpd project does not currently create binary RPMs
37 for the various distributions out there, it is easy to build your own
38 binary RPMs from the canonical Apache httpd tarball.</p>
40 <p>This document explains how to build, install, configure and run
41 Apache httpd 2.4 under Unix systems supporting the RPM packaging format.</p>
44 <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#creating">Creating a Source RPM</a></li>
45 <li><img alt="" src="../images/down.gif" /> <a href="#building">Building RPMs</a></li>
46 <li><img alt="" src="../images/down.gif" /> <a href="#installing">Installing the Server</a></li>
47 <li><img alt="" src="../images/down.gif" /> <a href="#default">Configuring the Default Instance of Apache httpd</a></li>
48 <li><img alt="" src="../images/down.gif" /> <a href="#additional">Configuring Additional Instances of Apache httpd on the Same Machine</a></li>
49 </ul><h3>See also</h3><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
50 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
52 <h2><a name="creating" id="creating">Creating a Source RPM</a> <a title="Permanent link" href="#creating" class="permalink">¶</a></h2>
55 <p>The Apache httpd source tarball can be converted into an SRPM as
58 <div class="example"><p><code>
59 rpmbuild -ts httpd-2.4.x.tar.bz2
62 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
64 <h2><a name="building" id="building">Building RPMs</a> <a title="Permanent link" href="#building" class="permalink">¶</a></h2>
67 <p>RPMs can be built directly from the Apache httpd source tarballs using
68 the following command:</p>
70 <div class="example"><p><code>
71 rpmbuild -tb httpd-2.4.x.tar.bz2
74 <p>Corresponding "-devel" packages will be required to be installed on your
75 build system prior to building the RPMs, the <code>rpmbuild</code> command
76 will automatically calculate what RPMs are required and will list any
77 dependencies that are missing on your system. These "-devel" packages will
78 not be required after the build is completed, and can be safely removed.</p>
80 <p>If successful, the following RPMs will be created:</p>
83 <dt>httpd-2.4.x-1.i686.rpm</dt>
84 <dd>The core server and basic module set.</dd>
86 <dt>httpd-debuginfo-2.4.x-1.i686.rpm</dt>
87 <dd>Debugging symbols for the server and all modules.</dd>
89 <dt>httpd-devel-2.4.x-1.i686.rpm</dt>
90 <dd>Headers and development files for the server.</dd>
92 <dt>httpd-manual-2.4.x-1.i686.rpm</dt>
93 <dd>The webserver manual.</dd>
95 <dt>httpd-tools-2.4.x-1.i686.rpm</dt>
96 <dd>Supporting tools for the webserver.</dd>
98 <dt>mod_authnz_ldap-2.4.x-1.i686.rpm</dt>
99 <dd><code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code> and <code class="module"><a href="../mod/mod_authnz_ldap.html">mod_authnz_ldap</a></code>, with
100 corresponding dependency on openldap.</dd>
102 <dt>mod_lua-2.4.x-1.i686.rpm</dt>
103 <dd><code class="module"><a href="../mod/mod_lua.html">mod_lua</a></code> module, with
104 corresponding dependency on lua.</dd>
106 <dt>mod_proxy_html-2.4.x-1.i686.rpm</dt>
107 <dd><code class="module"><a href="../mod/mod_proxy_html.html">mod_proxy_html</a></code> module, with
108 corresponding dependency on libxml2.</dd>
110 <dt>mod_socache_dc-2.4.x-1.i686.rpm</dt>
111 <dd><code class="module"><a href="../mod/mod_socache_dc.html">mod_socache_dc</a></code> module, with
112 corresponding dependency on distcache.</dd>
114 <dt>mod_ssl-2.4.x-1.i686.rpm</dt>
115 <dd><code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code> module, with
116 corresponding dependency on openssl.</dd>
120 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
121 <div class="section">
122 <h2><a name="installing" id="installing">Installing the Server</a> <a title="Permanent link" href="#installing" class="permalink">¶</a></h2>
125 <p>The <code>httpd</code> RPM is the only RPM necessary to get a basic
126 server to run. Install it as follows:</p>
128 <div class="example"><p><code>
129 rpm -U httpd-2.4.x-1.i686.rpm
132 <p>Self contained modules are included with the server. Modules that
133 depend on external libraries are provided as separate RPMs to install
136 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
137 <div class="section">
138 <h2><a name="default" id="default">Configuring the Default Instance of Apache httpd</a> <a title="Permanent link" href="#default" class="permalink">¶</a></h2>
141 <p>The default configuration for the server is installed by default
142 beneath the <code>/etc/httpd</code> directory, with logs written by
143 default to <code>/var/log/httpd</code>. The environment for the
144 webserver is set by default within the optional
145 <code>/etc/sysconfig/httpd</code> file.</p>
147 <p>Start the server as follows:</p>
149 <div class="example"><p><code>
150 service httpd restart
153 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
154 <div class="section">
155 <h2><a name="additional" id="additional">Configuring Additional Instances of Apache httpd on the Same Machine</a> <a title="Permanent link" href="#additional" class="permalink">¶</a></h2>
158 <p>It is possible to configure additional instances of the Apache
159 httpd server running independently alongside each other on the same
160 machine. These instances can have independent configurations, and
161 can potentially run as separate users if so configured.</p>
163 <p>This was done by making the httpd startup script aware of its own
164 name. This name is then used to find the environment file for the
165 server, and in turn, the server root of the server instance.</p>
167 <p>To create an additional instance called
168 <code>httpd-additional</code>, follow these steps:</p>
171 <li>Create a symbolic link to the startup script for the additional
174 <div class="example"><p><code>
175 ln -s /etc/rc.d/init.d/httpd /etc/rc.d/init.d/httpd-additional<br />
176 chkconfig --add httpd-additional
181 <li>Create an environment file for the server, using the
182 <code>/etc/sysconfig/httpd</code> file as a template:
184 <div class="example"><p><code>
185 # template from httpd<br />
186 cp /etc/sysconfig/httpd /etc/sysconfig/httpd-additional
189 <div class="example"><p><code>
190 # blank template<br />
191 touch /etc/sysconfig/httpd-additional
194 Edit <code>/etc/sysconfig/httpd-additional</code> and pass the
195 server root of the new server instance within the
196 <code>OPTIONS</code> environment variable.
198 <div class="example"><p><code>
199 OPTIONS="-d /etc/httpd-additional -f conf/httpd-additional.conf"
204 <li>Edit the server configuration file
205 <code>/etc/httpd-additional/conf/httpd-additional.conf</code> to
206 ensure the correct ports and paths are configured.
209 <li>Start the server as follows:
211 <div class="example"><p><code>
212 service httpd-additional restart
217 <li>Repeat this process as required for each server instance.</li>
221 <div class="bottomlang">
222 <p><span>Available Languages: </span><a href="../en/platform/rpm.html" title="English"> en </a> |
223 <a href="../fr/platform/rpm.html" hreflang="fr" rel="alternate" title="Français"> fr </a></p>
224 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
225 <script type="text/javascript"><!--//--><![CDATA[//><!--
226 var comments_shortname = 'httpd';
227 var comments_identifier = 'http://httpd.apache.org/docs/trunk/platform/rpm.html';
229 if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
230 d.write('<div id="comments_thread"><\/div>');
231 var s = d.createElement('script');
232 s.type = 'text/javascript';
234 s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
235 (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
238 d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
240 })(window, document);
241 //--><!]]></script></div><div id="footer">
242 <p class="apache">Copyright 2019 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
243 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
244 if (typeof(prettyPrint) !== 'undefined') {