首页 >> 读书频道 >> 电脑 >> Unix/Mac OS X installs
 
· asp+语法介绍(二)
· Unix/HP-UX i
· 下一步做什么?
· 亲密接触ASP.Net(
· 亲密接触ASP.Net(
· 在新版本的 PHP 中使
· 处理表单
· 亲密接触ASP.Net(
· 实用的脚本
· 亲密接触ASP.Net(
· 您的第一个 PHP 页面
· 亲密接触ASP.Net(
 
· 国家六部门联合发文
· 红楼梦:120回全本[清
· 常见图像文件格式详解
· 拉封丹寓言
· 电视剧《刁蛮公主》下载和
· 美容养颜手册
· 加油金顺剧情分集介绍完整
· 素质教育在美国
· 全唐诗卷四十六
· 韩剧《布拉格恋人》剧情介
· 夜航船[作者:明·张岱]
· 局外人[作者:韩·可爱淘
 
· (出租)中动商场部分及写
· (出租)中动动漫基地&#
· 喜剧学院
· 《善德女王》剧情介绍
· 魔女18号 剧情
· 丑女无敌剧情介绍
· 魔女幼熙剧情介绍
· 龙游天下剧情介绍
· 震撼世界的七日剧情介绍
· 静静的白桦林剧情介绍
· 心情日记—老公今天我想对
· 旗舰剧情介绍
欢迎来到月影社区!如果您觉得这里不错,请推荐给您的朋友们。月影社区:http://wf66.com/

Unix/Mac OS X installs


查看有无更新版本

关键字:PHP 2006-9-22

 

This section contains notes and hints specific to installing PHP on Mac OS X Server. Using Packages

There are a few pre-packaged and pre-compiled versions of PHP for Mac OS X. This can help 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 checking whether somebody has already built a packaged version of PHP with the features you need. 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.

例子 3-2. Mac OS X server install1. Get the latest distributions of Apache and PHP2. 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 PHP 4 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 additions (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. make7. make install This will add a directory to your Apache source directory under src/modules/php4. 8. Now, reconfigure Apache to build in PHP 4. ./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. make10. make install11. copy and rename the php.ini-dist file to your "bin" directory from your PHP 4 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.iniCompiling for MacOS X client

Those tips are graciously provided by Marc Liyanage.

The PHP module for the Apache web server included in Mac OS X. This version includes support for the MySQL and PostgreSQL databases.

NOTE: Be careful when you do this, you could screw up your Apache web server!

Do this to install:

1. Open a terminal window

2. Type "wget http://www.diax.ch/users/liyanage/software/macosx/libphp4.so.gz", wait for download to finish

3. Type "gunzip libphp4.so.gz"

4. Type "sudo apxs -i -a -n php4 libphp4.so" Now type "sudo open -a TextEdit /etc/httpd/httpd.conf" TextEdit will open with the web server configuration file. Locate these two lines towards the end of the file: (Use the Find command) #AddType application/x-httpd-php .php #AddType application/x-httpd-php-source .phpsRemove the two hash marks (#), then save the file and quit TextEdit.

Finally, type "sudo apachectl graceful" to restart the web server.

PHP should now be up and running. You can test it by dropping a file into your "Sites" folder which is called "test.php". Into that file, write this line: "<?php phpinfo() ?>".

Now open up 127.0.0.1/~your_username/test.php in your web browser. You should see a status table with information about the PHP module.

Unix/Mac OS X installs

[ 1 ]
Unix/Mac OS X installs num

打印本页 关闭

关于我们版权声明本站导航友情连结作品演示 TOP↑