📄 install.macosx.server.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Compiling for OS X Server</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="install.macosx.bundled.html">Using the bundled PHP</a></div> <div class="next" style="text-align: right; float: right;"><a href="install.macosx.client.html">Installing for Apache on MacOS X Client</a></div> <div class="up"><a href="install.macosx.html">Installation on Mac OS X</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="install.macosx.server" class="sect1"> <h2 class="title">Compiling for OS X Server</h2> <p class="formalpara" id="install.macosx.server.compile" name="install.macosx.server.compile"> <h5 class="title">Mac OS X Server install</h5> <p class="para"> <ol class="orderedlist"> <li class="listitem"> <span class="simpara">Get the latest distributions of Apache and PHP.</span> </li> <li class="listitem"> <p class="para"> Untar them, and run the <strong class="command">configure</strong> program on Apache like so. <div class="example-contents"><div class="cdata"><pre>./configure --exec-prefix=/usr \--localstatedir=/var \--mandir=/usr/share/man \--libexecdir=/System/Library/Apache/Modules \--iconsdir=/System/Library/Apache/Icons \--includedir=/System/Library/Frameworks/Apache.framework/Versions/1.3/Headers \--enable-shared=max \--enable-module=most \--target=apache</pre></div> </div> </p> </li> <li class="listitem"> <p class="para"> If you want the compiler to do some optimization, you may also want to add this line: <div class="example-contents"><div class="cdata"><pre>setenv OPTIM=-O2</pre></div> </div> </p> </li> <li class="listitem"> <p class="para"> Next, go to the PHP 4 source directory and configure it. <div class="example-contents"><div class="cdata"><pre>./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/share/man \ --with-xml \ --with-apache=/src/apache_1.3.12</pre></div> </div> If you have any other additions (MySQL, GD, etc.), be sure to add them here. For the <span class="option">--with-apache</span> string, put in the path to your apache source directory, for example <var class="filename">/src/apache_1.3.12</var>. </p> </li> <li class="listitem"> <span class="simpara"> Type <strong class="command">make</strong> and <strong class="command">make install</strong>. This will add a directory to your Apache source directory under <var class="filename">src/modules/php4</var>. </span> </li> <li class="listitem"> <p class="para"> Now, reconfigure Apache to build in PHP 4. <div class="example-contents"><div class="cdata"><pre>./configure --exec-prefix=/usr \--localstatedir=/var \--mandir=/usr/share/man \--libexecdir=/System/Library/Apache/Modules \--iconsdir=/System/Library/Apache/Icons \--includedir=/System/Library/Frameworks/Apache.framework/Versions/1.3/Headers \--enable-shared=max \--enable-module=most \--target=apache \--activate-module=src/modules/php4/libphp4.a</pre></div> </div> You may get a message telling you that <var class="filename">libmodphp4.a</var> is out of date. If so, go to the <var class="filename">src/modules/php4</var> directory inside your Apache source directory and run this command: <strong class="command">ranlib libmodphp4.a</strong>. Then go back to the root of the Apache source directory and run the above <strong class="command">configure</strong> command again. That'll bring the link table up to date. Run <strong class="command">make</strong> and <strong class="command">make install</strong> again. </p> </li> <li class="listitem"> <span class="simpara"> Copy and rename the <var class="filename">php.ini-dist</var> file to your <var class="filename">bin</var> directory from your PHP 4 source directory: <strong class="userinput"><code>cp php.ini-dist /usr/local/bin/php.ini</code></strong> or (if your don't have a local directory) <strong class="userinput"><code>cp php.ini-dist /usr/bin/php.ini</code></strong>. </span> </li> </ol> </p> </p> </div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="install.macosx.bundled.html">Using the bundled PHP</a></div> <div class="next" style="text-align: right; float: right;"><a href="install.macosx.client.html">Installing for Apache on MacOS X Client</a></div> <div class="up"><a href="install.macosx.html">Installation on Mac OS X</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -