如何在 Mac OX X 下面安装 php
Mac OS X installs
This section contains notes and hints specific to installing PHP on Mac OS X.
Using Packages
There are a few pre-packaged and pre-compiled versions of PHP for Mac OS X. This can greatly assist in setting up a standard configuration, but if you need to have a different set of features (such as a secure server, or a different database driver), you may need to build PHP and/or your web server yourself. If you are unfamiliar with building and compiling your own software, it's worth investigating whether or not somebody has already built a packaged version of PHP with the features you need. Lightyear Design offers a pre-built version of PHP for OS X, as does Tenon Intersystems.
Compiling for OS X server
There are two slightly different versions of Mac OS X, client and server. The following is for OS X Server.
Example 2-3. Mac OS X server install
1. Get the latest distributions of Apache and PHP
2. Untar them, and run the configure program on Apache like so.
./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
4. You may also want to add this line:
setenv OPTIM=-O2
If you want the compiler to do some optimization.
5. Next, go to the php4 source directory and configure it.
./configure --prefix=/usr
--sysconfdir=/etc
--localstatedir=/var
--mandir=/usr/share/man
--with-xml
--with-apache=/src/apache_1.3.12
If you have any other addiitons (MySQL, GD, etc.), be sure to add
them here. For the --with-apache string, put in the path to your
apache source directory, for example "/src/apache_1.3.12".
6. make
7. make install
This will add a directory to your Apache source directory under
src/modules/php4.
8. Now, reconfigure Apache to build in PHP4.
./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
You may get a message telling you that libmodphp4.a is out of date.
If so, go to the src/modules/php4 directory inside your apache
source directory and run this command:
ranlib libmodphp4.a
Then go back to the root of the apache source directory and run the
above configure command again. That'll bring the link table up to
date.
9. make
10. make install
11. copy and rename the php.ini-dist file to your "bin" directory from your
php4 source directory:
cp php.ini-dist /usr/local/bin/php.ini
or (if your don't have a local directory)
cp php.ini-dist /usr/bin/php.ini
-
国产电影制作的特效与国外的差距在哪里
中国和国外起跑线是不一样的,纵观发展史,虽然中国不停地努力缩小差距,但是技术上仍然落后美国一大截。下面是小编整理的国产电影制作的特效与国外的差距在哪里的相关内容,仅供参考,欢迎大家阅读。迪士尼的《奇幻森林》已经上映有一段时间。从万牛奔腾到随风而动的细...
-
客厅和卧室隔断怎么样
随着房价的不断上涨,很多人都喜欢在单间的空间里用隔断的手法来划分居室的空间。客厅与卧室间的`隔断是常见的一种方式,那客厅和卧室隔断怎么样呢?下面我们就去看看客厅和卧室隔断的优点吧。功能多样在小户型里,每一处设计都要做到物尽其用,隔断的好处当然不止在于...
-
Word三种排版小技巧推荐
快速剔除办公模板中的编号办公过程中常常要使用固定的模板,例如每次都在原有模板中修改填充在括号中的字母编号,如果旧的模板括号()中都已经填上了字符。由于字符的随机性,我们不好一次性删掉其中的'选项,只得多次批量删除。其实借助于Word的特殊替换,可快速完成替...
-
把Word转换成PPT的办法
我们通常用Word来录入、编辑、打印材料,而有时需要将已经编辑、打印好的材料,做成PowerPoint演示文稿,以供演示、讲座使用。如果在PowerPoint中重新录入,既麻烦又浪费时间。如果在两者之间,通过一块块地复制、粘贴,一张张地制成幻灯片,也比较费事。其实,我们可以利用Po...