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
MAC Environment Setting Up(二)PHP environment
相关文章
如何在 PHP 中精准查询 MySQL 中指定年份与周数的费用数据
如何在 PHP 中精准查询 MySQL 数据库中指定年份与周数的费用记录
如何在 Laravel 中完整获取 MySQL 存储过程返回的多个结果集
如何在 Laravel 中完整获取 MySQL 存储过程的多个结果集
Laravel 数据库迁移报错 SQLSTATE[22001] 的解决方案
本站声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门AI工具
相关专题
《Golang 生态工具与框架》系统梳理 Go 语言在实际工程中的主流工具链与框架选型思路,涵盖 Web 框架、RPC 通信、依赖管理、测试工具、代码生成与项目结构设计等内容。通过真实项目场景解析不同工具的适用边界与组合方式,帮助开发者构建高效、可维护的 Go 工程体系,并提升团队协作与交付效率。
1
2026.02.24
《Golang 性能优化专题》聚焦 Go 应用在高并发与大规模服务中的性能问题,从 profiling、内存分配、Goroutine 调度、GC 机制到 I/O 与锁竞争逐层分析。结合真实案例讲解定位瓶颈的方法与优化策略,帮助开发者建立系统化性能调优思维,在保证代码可维护性的同时显著提升服务吞吐与稳定性。
2
2026.02.24
Golang 面试题精选》系统整理企业常见 Go 技术面试问题,覆盖语言基础、并发模型、内存与调度机制、网络编程、工程实践与性能优化等核心知识点。每道题不仅给出答案,还拆解背后的设计原理与考察思路,帮助读者建立完整知识结构,在面试与实际开发中都能更从容应对复杂问题。
1
2026.02.24
《Golang 运行与部署实战》围绕 Go 应用从开发完成到稳定上线的完整流程展开,系统讲解编译构建、环境配置、日志与配置管理、容器化部署以及常见运维问题处理。结合真实项目场景,拆解自动化构建与持续部署思路,帮助开发者建立可靠的发布流程,提升服务稳定性与可维护性。
3
2026.02.24
《Golang 疑难杂症解决指南》聚焦开发过程中常见却棘手的问题,从并发模型、内存管理、性能瓶颈到工程化实践逐步拆解。通过真实案例与调试思路,帮助开发者定位问题根因,建立系统化排查方法。不只给出答案,更强调分析路径与工具使用,让你在复杂 Go 项目中具备持续解决问题的能力。
1
2026.02.24
Golang 入门路线涵盖从零到上手的核心路径:首先打牢基础语法与切片等底层机制;随后攻克 Go 的灵魂——接口设计与 Goroutine 并发模型;接着通过 Gin 框架与 GORM 深入 Web 开发实战;最后在微服务与云原生工具开发中进阶,旨在培养具备高性能并发处理能力的后端工程师。
0
2026.02.24
本专题汇总苹果官网最新可用入口及中国站点访问方式,涵盖官网直达链接、iPhone官方页面查看方法与常见访问说明,帮助用户快速进入苹果官方网站,便捷了解产品信息与官方服务。
14
2026.02.24
本专题系统整理Asianfanfics(AFF)官方网站最新可用入口,涵盖官方平台最新直达地址、官网登录方式及中文访问指引,帮助用户快速、安全地进入AFF平台浏览与使用相关内容。
15
2026.02.24
热门下载
相关下载
精品课程
最新文章


