在 Mac OX X 下面安装 php

 

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 
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

时间: 2024-05-22 11:48:14

在 Mac OX X 下面安装 php的相关文章

mac android studio 怎么安装sdk manager 以及下载sdk?

问题描述 mac android studio 怎么安装sdk manager 以及下载sdk? 我在mac上安装完毕了android studio 打开应用但是无法创建工程,这是由于没有下载sdk,此时我没有安装sdk manager怎么安装sdk manager 以及下载sdk? 解决方案 去官网下载mac版的sdk啊

虚拟机 mac ox联网失败

问题描述 虚拟机 mac ox联网失败 在win7系统的虚拟机装mac ox的以太网连接成功,但互联网还是失败,怎么办? 解决方案 是不能打开网页吗?QQ能不能上?估计是没有设置DNS的问题 解决方案二: 上网可以用nat模式啊,或者你看看root下面你网卡什么的开了没 有

苹果mac系统下可以安装的聊天工具

上网聊天是绝对不能缺的,那么在mac电脑上能安装哪些聊天软件呢?又该怎么使用,我们一起来看看吧! Mac平台Messenger使用指导 MSN Messenger已然在中国成为了除了QQ外最流行的即时通讯工具了,微软当然也不会放弃Windows以外平台的MSN Messenger用户,于是在Mac OS X 10系统出现后微软就专门为Mac平台开发了基本功能的MSN Messenger,一直更新到现在的最新版本. 功能及安装使用: 下载完成后挂载DMG文件,将Microsoft Messenge

苹果MAC电脑上怎么安装驱动精灵

  苹果MAC电脑上怎么安装驱动精灵?驱动精灵是实现智能驱动匹配.安装.备份等功能的专业级驱动管理和维护软件,非常好用.MAC上的驱动精灵是一款第三方的黑苹果驱动安装软件.它非常适合用于安装驱动,不过还需要慢慢调试才能使用.下面,安下小编给大家带来苹果MAC电脑上安装驱动精灵的方法,希望对你有帮助! 苹果MAC电脑上安装驱动精灵的方法 1. 点击 Quick Start 可选择 EasyBeast.User DSDT.DSDT Free 三中安装模式 2. 点击 Drivers 可单独选择声卡.

Mac OS X如何安装Win7

Mac OS X如何安装Win7 需要准备的: 1.Windows 7安装光盘,如果是Macbook Air,则必须准备外接光驱. 2.要安装的笔记本要与英特网连接(仅限Air). 3.准备一个大于600MB的U盘(只限Air用户,且必须为FAT32格式) 一切准备就绪,下面开始Boot Camp安装Windows 7之旅. 在使用工具下找到Boot Cmap助理 在Finder下点选"前往"下面的实用工具,然后点选工具程序资料夹中的Boot Cmap助理. 阅读说明点击继续 点选打开

Mac OS X如何安装软件

Mac OS X上面安装软件有两种方式: 1.就是直接复制粘贴,这也是最主要的一种方式,一般来说,MAC OS X上的程序会打包成DMG,ISO.双击以后,系统会自动挂上磁盘镜像,并在FINDER中显示.打开以后你经常会看见类似 程序 -> APPLICATION这样的一个界面,那只是一个加了背景图片的文件夹,把程序拖到APPLICATION里面就可以了. 当然,还是的,APPLICATION文件夹只是系统默认放程序的文件夹,你也可以把你的程序放到任何地方. 2.有些程序做成了安装包,这就和WI

Mac OS X无法安装Windows XP SP3的问题怎么解决

Mac OS X无法安装Windows XP SP3的问题解决办法:在Windows XP SP2下打开注册表编辑器(开始菜单-运行-输入regedit)找到以下子键:HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionSetup,建立一个新的字符串值,命名为 BootDir,将该键值设置为当前系统盘符,如 C:,退出注册表编辑器,就可以顺利升级Windows XP SP3了.

Mac OS X 下安装Nginx问题详解

  Mac OS X 下安装Nginx问题碰到的朋友不多,因为在mac系统安装nginx环境不实用了,不过有人碰到了我们就一起来看看,说不定对你会有帮助呢. 我是通过brew install nginx的,前面都很顺利, nginx常用命令: nginx -s stop/quit/reopen/reload 用ln -s 命令创建个软件链接于 /usr/sbin/ 下以方便操作. 直接搞个server看看效果,代码如下: server { listen 80; server_name www.g

Mac系统Flash无法安装怎么办?

  Mac系统Flash无法安装怎么办?最近很多使用Mac的朋友都有遇到浏览器提示"Adobe flash player因过期而遭到阻止"的错误提示,并且还无法通过在线更新来解决问题,下面小编就教大家在网上下载Adobe Flash player for Mac手动安装来解决这个问题. 1.首先我们下载Adobe flash player for Mac的安装文件,如图所示. 2.在下载栏中找到下载的flash安装文件,打开它 3.在新弹出的窗口中,对着"Install Ad