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/
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值