|
|
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] |
|
|
| The URI to TrackBack this entry is : http://blog.tntsoft.com/trackback.php/34 | |
|
|
|
|