Share my knowledge, feel my life. Eric Shan' Blog myBloggie 2.1.6 © 2005   
Mar 2025 April 2025 May 2025
S M T W T F S
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30    
Categories
About[5]
Blackberry[1]
dotNet and C Charp[1]
IPhone[10]
Life[4]
Unix&Linux[19]
WEB programming[16]
Windows API[5]
Windows Mobile[1]
Windows Multimedia[4]
Recent
CentOS mount CDrom and USB
CentOS GHOST(幽灵)漏洞修复方法
centos 改变语言并立即生效
centos vpn 接通后无法连接internet
让vlc播放中文字幕不出乱码
centos 取消屏保
php中ob_flush和flush的用法
CentOS检查,添加,删除自启动服务
CentOS中开机自动启动某个服务
Top命令中的翻页
Archives
February 2010[4]
September 2009[1]
August 2009[1]
January 2009[7]
October 2008[10]
June 2008[2]
December 2007[14]
November 2007[5]
May 2007[9]
April 2007[3]
March 2007[10]
User List
Eric Shan[66]
Search
Syndication
27 Dec 2008 12:13:33 pm
Install Apache, PHP, mysql, phpmyadmin, Zend Studio on MAC
Install Apache, PHP, mysql, phpmyadmin, Zend Studio on MAC leopard.

-Actually MAC intel has apache and PHP already built in in the system, so to
install Apache, PHP on MAC, just means enable it.

1. Enable Apache and PHP: go to System Preferences->Internet & Network-> Sharing->Web Sharing, click the it to enable it, this enable the Apache.

2. To install PHP on MAC, edit the file of /etc/apache2/httpd.conf, backup it before
modify it. Then remove the # on the sentence of

# LoadModule php5_module libexec/apache2/libphp5.so

After that go back to step one, shutdown Apache and restart it to make php start.

To test php is working, simply create a new php program by typing a program like below,

<?php phpinfo(); ?>

Then save this test.php at the folder under your user ID home directory's 'sites' folder. Then open Safari to navigate to the address of

http://localhost/~yourusername/test.php

so from now on the http://localhost/~yourusername, is mapped to your home directory's sites folder.

- To install mysql.
Download the mysql package mysql-5.0.67-osx10.5-x86.dmg, run the two installation package, then the double click the mysql.prefpane, this will install the Mysql icon in the system preferences, so you can start or stop Mysql server from there.

Try /usr/local/mysql/bin/mysql, this can execute sql sentence after on.

- To install phpmyadmin.
Download the package, phpMyAdmin-3.1.1-english.zip. unzip it into the subfolder of your 'sites' folder, then edit the file of config.sample.inc.php change the sentence of,

$cfg['Servers'][$i]['host'] = 'localhost';

to

$cfg['Servers'][$i]['host'] = '127.0.0.1';

after that use your safari to browse the address of http://127.0.0.1/~yourusername/yourphpadminfolder/, you should be able to see the login screen.

You need to create a user to make login from safari works, to do it run mysql, sudo /usr/local/mysql/bin/mysql, in mysql,

> CREATE USER admin@localhost IDENTIFIED BY 'createapassword' ;
>grant all privilleges on *.* to admin@localhost;

after that use your admin user with your new created password to log on from the Safari. Start using phpmyadmin.

-Install Zend Studio on MAC, download http://downloads.zend.com/studio/5.5.0/ZendStudio-5_5_0-Mac_OS_X.zip
Then upzip, and run the installer.
Category : Unix&Linux | Posted By : Eric Shan | Comments [0] | Trackbacks [0]
Trackbacks
The URI to TrackBack this entry is :
http://blog.tntsoft.com/trackback.php/34
Comments

Add Your Comment

Subject

Comments

Name

Email Address (Optional)

Home Page (Optional)

Security Code

Please enter the security code as displayed :



Template theme : aura
Powered by myBloggie Copyright © 2004 2006
-- myWebland --

Sponsed by TNTSoft Store