• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

在 Mac OX X 下面安装 php

发布: 2007-6-08 22:43 | 作者: seanhe | 来源: | 查看: 42次 | 进入软件测试论坛讨论

领测软件测试网

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

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备2023014753号-2
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网