EDU511 国际专业IT教育服务门户
设为首页   加入收藏    联系我们
寻找IT教育内容合作伙伴
招聘教育网络编辑和运营门户高手
中讯IT教育2008年改版上线
寻找地方站运营伙伴QQ:59955917
中讯IT 技术成就未来
操作系统
   你现在的位置:首页 >> 新闻系统 >> 操作系统 >> 苹果OS >> 正文

在 Mac OX X 下面安装 php

 
 
日期:07-10-18 23:19:53 点击: 来源:不详
 

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

 
责任编辑:admin
 
前一篇:
后一篇:
相关新闻(文章)

 
 
登录模块加载中...
 
热点操作系统技术
网站首页 | 关于网站| 在线咨询 | 友情链接 | 联系我们
地址:重庆渝中区大坪正街88号
本站建设得到重庆网通信息港与北京泰胜得风险投资机构的大力支持
电话:023-61630611 15902314551
邮箱:sysium_yuh@126.com yuhong@edu511.com
Copyright © edu511.com All rights reserved.
重庆视网科技发展有限公司版权所有 邮编:400041
ICP备案号:渝ICP备08002346号 QQ:59955917
网页设计/策划:重庆视网科技发展有限公司