MAC Environment Setting Up(二)PHP environment

WBOY
发布: 2016-06-13 13:14:17
原创
788 人浏览过

MAC Environment Setting Up(2)PHP environment
MAC Environment Setting Up(2)PHP environment
1. Check and Install Apache2
>sudo apachectl -v
Server version: Apache/2.2.22 (Unix)
Server built:   Jun 20 2012 13:57:09

My apache with version 2.2.22 is already there.
>sudo apachectl start
Visit the home page http://localhost. I can see the testing page.
The default web pages will be under this directory /Library/WebServer/Documents.

2. Check and Install PHP
In /etc/apache2/httpd.conf, uncomment this line:
LoadModule php5_module libexec/apache2/libphp5.so

Copy and prepare the PHP configuration files.
>sudo cp /etc/php.ini.default /etc/php.ini
We can change this configuration file as we like.

Prepare the testing page of PHP.
>sudo cp /Library/WebServer/Documents/index.html.en /Library/WebServer/Documents/info.php

Then we can visit the page http://localhost/info.php now.

3. KeePassX
http://www.keepassx.org/

4. Install MySQL
Download these installation files from here http://dev.mysql.com/downloads/mysql/5.1.html.
mysql-5.1.65-osx10.6-x86_64.dmg

After install this software, I got the mysql in this folder mysql-5.1.65-osx10.6-x86_64.

If we install MySQLStartupItem.pkg, then MySQL will start automatically when the PC start.

MySQL.prefPane is for the icon in system configuration.

>chmod 777 /etc/bashrc
>sudo vi /etc/bashrc
Add 3 lines at the bottom
#mysql
alias mysql='/usr/local/mysql/bin/mysql'
alias mysqladmin='/usr/local/mysql/bin/mysqladmin'

>. /etc/bashrc
>mysqladmin -u root password 'kaishi'
Set the root password of MySQL.

5. Install Coda
http://soft.macx.cn/2647.htm


references:
http://sillycat.iteye.com/blog/1543227
http://sillycat.iteye.com/blog/1286175
http://sillycat.iteye.com/blog/1073598
http://sillycat.iteye.com/blog/1040371

http://sillycat.iteye.com/blog/768664
http://sillycat.iteye.com/blog/769110
http://sillycat.iteye.com/blog/770369

http://maestric.com/doc/mac/apache_php_mysql_snow_leopard
http://dancewithnet.com/2010/05/09/run-apache-php-mysql-in-mac-os-x/

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!