最新IBM水货笔记本价格,详细点击进入

查看完整版本: 在 Mac OX X 下面安装 php

风舞残阳 2008-4-1 15:51

在 Mac OX X 下面安装 php

MacOSXinstalls
Thissectioncontainsnotesandhintsspecifictoinstalling[wiki]PHP[/wiki]onMacOSX.
UsingPackages
Thereareafewpre-packagedandpre-compiledversionsofPHPforMacOSX.Thiscangreatlyassistinsettingupastandardconfiguration,butifyouneedtohaveadifferentsetoffeatures(suchasasecureserver,oradifferentdatabasedriver),youmayneedtobuildPHPand/oryourwebserveryourself.Ifyouareunfamiliarwithbuildingandcompilingyourownsoftware,it'sworthinvestigatingwhetherornotsomebodyhasalreadybuiltapackagedversionofPHPwiththefeaturesyouneed.LightyearDesignoffersapre-builtversionofPHPforOSX,asdoesTenonIntersystems.
[color=#FFFFFF'][/color]

CompilingforOSXserver
TherearetwoslightlydifferentversionsofMacOSX,clientandserver.ThefollowingisforOSXServer.
Example2-3.MacOSXserverinstall
1.GetthelatestdistributionsofApacheandPHP
2.Untarthem,andruntheconfigureprogramonApachelikeso.
./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.Youmayalsowanttoaddthisline:
setenvOPTIM=-O2
Ifyouwantthecompilertodosomeoptimization.
5.Next,gotothephp4sourcedirectoryandconfigureit.
./configure--prefix=/usr
--sysconfdir=/etc
--localstatedir=/var
--mandir=/usr/share/man
--with-xml
--with-apache=/src/apache_1.3.12
Ifyouhaveanyotheraddiitons(My[wiki]SQL[/wiki],GD,etc.),besuretoadd
themhere.Forthe--with-apachestring,putinthepathtoyour
apachesourcedirectory,forexample"/src/apache_1.3.12".
6.make
7.makeinstall
ThiswilladdadirectorytoyourApachesourcedirectoryunder
src/modules/php4.
8.Now,reconfigureApachetobuildinPHP4.
./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
Youmaygetamessagetellingyouthatlibmodphp4.aisoutofdate.
Ifso,gotothesrc/modules/php4directoryinsideyourapache
sourcedirectoryandrunthiscommand:
ranliblibmodphp4.a
Thengobacktotherootoftheapachesourcedirectoryandrunthe
aboveconfigurecommandagain.That'llbringthelinktableupto
date.
9.make
10.makeinstall
11.copyandrenamethephp.ini-distfiletoyour"bin"directoryfromyour
php4sourcedirectory:
cpphp.ini-dist/usr/local/bin/php.ini
or(ifyourdon'thavealocaldirectory)
cpphp.ini-dist/usr/bin/php.ini

j7nv8 2008-6-3 20:14

:funk: :funk: :funk: :funk:
页: [1]
查看完整版本: 在 Mac OX X 下面安装 php