> 백엔드 개발 > PHP 튜토리얼 > MAC Environment Setting Up(二)PHP environment

MAC Environment Setting Up(二)PHP environment

WBOY
풀어 주다: 2016-06-13 13:14:17
원래의
810명이 탐색했습니다.

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으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿