Apache.org ソース インストールレイアウト(config.layout)の設定と変更
Apacheをソースファイルからインストールする場合に、
確認しておきたいのがレイアウトファイルの設定内容です。
install時にどのディレクトリへファイルや実行ファイルが展開するかを指定するもので、
既存のApacheが既にインストールされている環境などでインストールする場合には、
既存のApacheのファイルを上書きしないようにするなど注意が必要です。
Apache.org ソース レイアウトファイルの設定と変更
Apacheのソースファイルをダウンロードし、解凍すると、
展開されたフォルダ内に「config.layout」というファイルが含まれています。
「config.layout」をエディタなどで開くと以下のような記述が並びます。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# Classical Apache path layout. <Layout Apache> prefix: /usr/local/apache2 exec_prefix: ${prefix} bindir: ${exec_prefix}/bin sbindir: ${exec_prefix}/bin libdir: ${exec_prefix}/lib libexecdir: ${exec_prefix}/modules mandir: ${prefix}/man sysconfdir: ${prefix}/conf datadir: ${prefix} installbuilddir: ${datadir}/build errordir: ${datadir}/error iconsdir: ${datadir}/icons htdocsdir: ${datadir}/htdocs manualdir: ${datadir}/manual cgidir: ${datadir}/cgi-bin includedir: ${prefix}/include localstatedir: ${prefix} runtimedir: ${localstatedir}/logs logfiledir: ${localstatedir}/logs proxycachedir: ${localstatedir}/proxy </Layout> |
見ての通りになりますが、2行目の<Layout Apache>
部分で、
この設定に対して「Apache」という名称を指定しています。
タグで囲まれた部分でそれぞれのディレクトリを
prefix: /usr/local/apache2
と、exec_prefix: ${prefix}
の部分で変数として指定し、
各ディレクトリの指定を行っています。
また同様にdatadir:${prefix}
及び、localstatedir:${prefix}
でも変数を定義しています。
レイアウト設定としてあらかじめ設定してある名称には以下があります。
- Apache
- GNU
- Mac OS X Server
- Darwin
- RedHat
- opt
- beos
- SuSE
- BSDI
- Solaris
- OpenBSD
- FreeBSD
- Debian
- AIX
Apacheとして指定した場合のインストール先の各変数の値は、
以下のようになります。
設定名「Apache」を指定した場合、
すべてが「/usr/local/apache2」配下に展開されることが分かります。
変数名 | 値 |
---|---|
(prefix) | /usr/local/apache2 |
(exec_prefix) | /usr/local/apache2 |
bindir | /usr/local/apache2/bin |
sbindir | /usr/local/apache2/bin |
libdir | /usr/local/apache2/lib |
libexecdir | /usr/local/apache2/modules |
mandir | /usr/local/apache2/man |
sysconfdir | /usr/local/apache2/conf |
(datadir) | /usr/local/apache2 |
installbuilddir | /usr/local/apache2/build |
errordir | /usr/local/apache2/error |
iconsdir | /usr/local/apache2/icons |
htdocsdir | /usr/local/apache2/htdocs |
manualdir | /usr/local/apache2/manual |
cgidir | /usr/local/apache2/cgi-bin |
includedir | /usr/local/apache2/include |
(localstatedir) | /usr/local/apache2 |
runtimedir | /usr/local/apache2/logs |
logfiledir | /usr/local/apache2/logs |
proxycachedir | /usr/local/apache2/proxy |
Apacheインストール時にレイアウトを指定する場合にはこのように指定します。
./configure --with-layout=Apache
(Apache2.0系)
./configure --enable-layout=Apache
(Apache2.2系)
利用するレイアウトを指定する事で、
インストール先のディレクトリを明示してインストールすることができます。
レイアウトファイル全体(Apache 2.2.32付属)
Apache 2.2.32に付属しているレイアウトファイルの例を以下に記載します。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
## ## config.layout -- Pre-defined Installation Path Layouts ## ## Hints: ## - layouts can be loaded with configure's --enable-layout=ID option ## - when no --enable-layout option is given, the default layout is `Apache' ## - a trailing plus character (`+') on paths is replaced with a ## `/<target>' suffix where <target> is currently hardcoded to 'apache2'. ## (This may become a configurable parameter at some point.) ## # Classical Apache path layout. <Layout Apache> prefix: /usr/local/apache2 exec_prefix: ${prefix} bindir: ${exec_prefix}/bin sbindir: ${exec_prefix}/bin libdir: ${exec_prefix}/lib libexecdir: ${exec_prefix}/modules mandir: ${prefix}/man sysconfdir: ${prefix}/conf datadir: ${prefix} installbuilddir: ${datadir}/build errordir: ${datadir}/error iconsdir: ${datadir}/icons htdocsdir: ${datadir}/htdocs manualdir: ${datadir}/manual cgidir: ${datadir}/cgi-bin includedir: ${prefix}/include localstatedir: ${prefix} runtimedir: ${localstatedir}/logs logfiledir: ${localstatedir}/logs proxycachedir: ${localstatedir}/proxy </Layout> # GNU standards conforming path layout. # See FSF's GNU project `make-stds' document for details. <Layout GNU> prefix: /usr/local exec_prefix: ${prefix} bindir: ${exec_prefix}/bin sbindir: ${exec_prefix}/sbin libdir: ${exec_prefix}/lib libexecdir: ${exec_prefix}/libexec mandir: ${prefix}/man sysconfdir: ${prefix}/etc+ datadir: ${prefix}/share+ installbuilddir: ${datadir}/build errordir: ${datadir}/error iconsdir: ${datadir}/icons htdocsdir: ${datadir}/htdocs manualdir: ${datadir}/manual cgidir: ${datadir}/cgi-bin includedir: ${prefix}/include+ localstatedir: ${prefix}/var+ runtimedir: ${localstatedir}/run logfiledir: ${localstatedir}/log proxycachedir: ${localstatedir}/proxy </Layout> # Mac OS X Server (Rhapsody) <Layout Mac OS X Server> prefix: /Local/Library/WebServer exec_prefix: /usr bindir: ${exec_prefix}/bin sbindir: ${exec_prefix}/sbin libdir: ${exec_prefix}/lib libexecdir: /System/Library/Apache/Modules mandir: ${exec_prefix}/share/man sysconfdir: ${prefix}/Configuration datadir: ${prefix} installbuilddir: /System/Library/Apache/Build errordir: /System/Library/Apache/Error iconsdir: /System/Library/Apache/Icons manualdir: /System/Library/Apache/Manual htdocsdir: ${datadir}/Documents cgidir: ${datadir}/CGI-Executables includedir: /System/Library/Frameworks/Apache.framework/Versions/2.0/Headers localstatedir: /var runtimedir: ${prefix}/Logs logfiledir: ${prefix}/Logs proxycachedir: ${prefix}/ProxyCache </Layout> # Darwin/Mac OS Layout <Layout Darwin> prefix: /usr exec_prefix: ${prefix} bindir: ${exec_prefix}/bin sbindir: ${exec_prefix}/sbin libdir: ${exec_prefix}/lib libexecdir: ${exec_prefix}/libexec+ mandir: ${prefix}/share/man datadir: /Library/WebServer sysconfdir: /etc+ installbuilddir: ${prefix}/share/httpd/build errordir: ${prefix}/share/httpd/error iconsdir: ${prefix}/share/httpd/icons htdocsdir: ${datadir}/Documents manualdir: ${datadir}/share/httpd/manual cgidir: ${datadir}/CGI-Executables includedir: ${prefix}/include+ localstatedir: /var runtimedir: ${localstatedir}/run logfiledir: ${localstatedir}/log+ proxycachedir: ${runtimedir}/proxy </Layout> # Red Hat Linux 7.x layout <Layout RedHat> prefix: /usr exec_prefix: ${prefix} bindir: ${prefix}/bin sbindir: ${prefix}/sbin libdir: ${prefix}/lib libexecdir: ${prefix}/lib/apache mandir: ${prefix}/man sysconfdir: /etc/httpd/conf datadir: /var/www installbuilddir: ${datadir}/build errordir: ${datadir}/error iconsdir: ${datadir}/icons htdocsdir: ${datadir}/html manualdir: ${datadir}/manual cgidir: ${datadir}/cgi-bin includedir: ${prefix}/include/apache localstatedir: /var runtimedir: ${localstatedir}/run logfiledir: ${localstatedir}/log/httpd proxycachedir: ${localstatedir}/cache/httpd </Layout> # According to the /opt filesystem conventions <Layout opt> prefix: /opt/apache exec_prefix: ${prefix} bindir: ${exec_prefix}/bin sbindir: ${exec_prefix}/sbin libdir: ${exec_prefix}/lib libexecdir: ${exec_prefix}/libexec mandir: ${prefix}/man sysconfdir: /etc${prefix} datadir: ${prefix}/share installbuilddir: ${datadir}/build errordir: ${datadir}/error iconsdir: ${datadir}/icons htdocsdir: ${datadir}/htdocs manualdir: ${datadir}/manual cgidir: ${datadir}/cgi-bin includedir: ${prefix}/include localstatedir: /var${prefix} runtimedir: ${localstatedir}/run logfiledir: ${localstatedir}/logs proxycachedir: ${localstatedir}/proxy </Layout> # BeOS layout... <Layout beos> prefix: /boot/home/apache exec_prefix: ${prefix} bindir: ${exec_prefix}/bin sbindir: ${exec_prefix}/bin libdir: ${exec_prefix}/lib libexecdir: ${exec_prefix}/libexec mandir: ${prefix}/man sysconfdir: ${prefix}/conf datadir: ${prefix} installbuilddir: ${datadir}/build errordir: ${datadir}/error iconsdir: ${datadir}/icons htdocsdir: ${datadir}/htdocs manualdir: ${datadir}/manual cgidir: ${datadir}/cgi-bin includedir: ${prefix}/include localstatedir: ${prefix} runtimedir: ${localstatedir}/logs logfiledir: ${localstatedir}/logs proxycachedir: ${localstatedir}/proxy </Layout> # SuSE 6.x layout <Layout SuSE> prefix: /usr exec_prefix: ${prefix} bindir: ${prefix}/bin sbindir: ${prefix}/sbin libdir: ${prefix}/lib libexecdir: ${prefix}/lib/apache mandir: ${prefix}/share/man sysconfdir: /etc/httpd datadir: /usr/local/httpd installbuilddir: ${datadir}/build errordir: ${datadir}/error iconsdir: ${datadir}/icons htdocsdir: ${datadir}/htdocs manualdir: ${datadir}/manual cgidir: ${datadir}/cgi-bin includedir: ${prefix}/include/apache localstatedir: /var/lib/httpd runtimedir: /var/run logfiledir: /var/log/httpd proxycachedir: /var/cache/httpd </Layout> # BSD/OS layout <Layout BSDI> prefix: /var/www exec_prefix: /usr/contrib bindir: ${exec_prefix}/bin sbindir: ${exec_prefix}/bin libdir: ${exec_prefix}/lib libexecdir: ${exec_prefix}/libexec/apache mandir: ${exec_prefix}/man sysconfdir: ${prefix}/conf datadir: ${prefix} installbuilddir: ${datadir}/build errordir: ${datadir}/error iconsdir: ${datadir}/icons htdocsdir: ${datadir}/htdocs manualdir: ${datadir}/manual cgidir: ${datadir}/cgi-bin includedir: ${exec_prefix}/include/apache localstatedir: /var runtimedir: ${localstatedir}/run logfiledir: ${localstatedir}/log/httpd proxycachedir: ${localstatedir}/proxy </Layout> # Solaris 8 Layout <Layout Solaris> prefix: /usr/apache exec_prefix: ${prefix} bindir: ${exec_prefix}/bin sbindir: ${exec_prefix}/bin libdir: ${exec_prefix}/lib libexecdir: ${exec_prefix}/libexec mandir: ${exec_prefix}/man sysconfdir: /etc/apache datadir: /var/apache installbuilddir: ${datadir}/build errordir: ${datadir}/error iconsdir: ${datadir}/icons htdocsdir: ${datadir}/htdocs manualdir: ${datadir}/manual cgidir: ${datadir}/cgi-bin includedir: ${exec_prefix}/include localstatedir: ${prefix} runtimedir: /var/run logfiledir: ${datadir}/logs proxycachedir: ${datadir}/proxy </Layout> # OpenBSD Layout <Layout OpenBSD> prefix: /var/www exec_prefix: /usr bindir: ${exec_prefix}/bin sbindir: ${exec_prefix}/sbin libdir: ${exec_prefix}/lib libexecdir: ${exec_prefix}/lib/apache/modules mandir: ${exec_prefix}/share/man sysconfdir: ${prefix}/conf datadir: ${prefix} installbuilddir: ${prefix}/build errordir: ${prefix}/error iconsdir: ${prefix}/icons htdocsdir: ${prefix}/htdocs manualdir: ${datadir}/manual cgidir: ${prefix}/cgi-bin includedir: ${exec_prefix}/lib/apache/include localstatedir: ${prefix} runtimedir: ${prefix}/logs logfiledir: ${prefix}/logs proxycachedir: ${prefix}/proxy </Layout> # FreeBSD Layout <Layout FreeBSD> prefix: /usr/local exec_prefix: ${prefix} bindir: ${exec_prefix}/bin sbindir: ${exec_prefix}/sbin libdir: ${exec_prefix}/lib libexecdir: ${exec_prefix}/libexec/apache2 mandir: ${prefix}/man sysconfdir: ${prefix}/etc/apache2 datadir: ${prefix}/www installbuilddir: ${prefix}/share/apache2/build errordir: ${datadir}/error iconsdir: ${datadir}/icons htdocsdir: ${datadir}/data manualdir: ${prefix}/share/doc/apache2 cgidir: ${datadir}/cgi-bin includedir: ${prefix}/include/apache2 localstatedir: /var runtimedir: ${localstatedir}/run logfiledir: ${localstatedir}/log proxycachedir: ${datadir}/proxy </Layout> # Debian layout <Layout Debian> prefix: exec_prefix: ${prefix}/usr bindir: ${exec_prefix}/bin sbindir: ${exec_prefix}/sbin libdir: ${exec_prefix}/lib libexecdir: ${exec_prefix}/lib/apache2/modules mandir: ${exec_prefix}/share/man sysconfdir: ${prefix}/etc/apache2 datadir: ${exec_prefix}/share/apache2 iconsdir: ${datadir}/icons htdocsdir: ${prefix}/usr/share/apache2/default-site/htdocs manualdir: ${htdocsdir}/manual cgidir: ${prefix}/usr/lib/cgi-bin includedir: ${exec_prefix}/include/apache2 localstatedir: ${prefix}/var/run runtimedir: ${prefix}/var/run logfiledir: ${prefix}/var/log/apache2 proxycachedir: ${prefix}/var/cache/apache2/proxy infodir: ${exec_prefix}/share/info installbuilddir: ${prefix}/etc/apache2/build errordir: ${datadir}/error </Layout> # AIX layout <Layout AIX> prefix: /opt/httpd exec_prefix: /opt/httpd bindir: ${exec_prefix}/bin sbindir: ${exec_prefix}/sbin libdir: ${exec_prefix}/lib libexecdir: ${exec_prefix}/libexec mandir: /usr/share/man sysconfdir: /etc/httpd datadir: /var/httpd installbuilddir: ${datadir}/build errordir: ${datadir}/error htdocsdir: ${datadir}/htdocs cgidir: ${datadir}/cgi-bin iconsdir: ${prefix}/icons manualdir: ${prefix}/manual includedir: ${prefix}/include localstatedir: /var/httpd runtimedir: ${localstatedir}/run logfiledir: ${localstatedir}/logs proxycachedir: ${localstatedir}/proxy </Layout> |
公開日: