源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

全新Mac配置PHP开发环境教程

  • 时间:2020-08-08 04:04 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:全新Mac配置PHP开发环境教程
用了一年的Mac OS X了,之前不熟悉这个系统,用的是系统自带的PHP以及DMG包安装的MySQL,时间长了,慢慢觉得MacBook的速度跟不上了,虽然关机次数不多,但是每次开机,或者唤醒电脑的时候,系统明显有一定时间的卡顿。特别表现在开机的时候。完全可以去泡一个来一桶了。因此干掉MD101上的光驱,换上256G的Sandisk SSD, 干掉原厂的2G 2,换上8G 2 。 速度应该是杠杠的了,至少可以再服役2年吧。 趁着这次加硬盘的机会,就准备彻底重做开发环境。现在对Mac也有了一定的了解,特地记录一下本次的开发环境安装详情,给自己一个备忘,希望也可以帮助到刚接触Mac 环境的同学们。本开发环境,全部基于[url=http://brew.sh/]HomeBrew[/url]安装。 主要软件版本:PHP5.5.14,Nginx 1.6.0,MySQL5.6.19 [b]OS X Mavericks[/b] 重新安装系统,在苹果商店下载好OS X Mavericks安装文件,然后准备一支16G的USB3.0 U盘。制作 OSX Mavericks全新安装启动U盘。 插上U盘,在终端执行:
[url=https://github.com/robbyrussell/oh-my-zsh]Oh 猛戳到官网[/url] 安装 oh my zsh
[url=http://www.iterm2.com/#/section/documentatio]http://www.iterm2.com/#/section/documentatio[/url] n), 这里就不详细说明了。 安装开发常用的包&软件 安装开发包
[url=http://blog.frd.mn/install-nginx-php-fpm-mysql-and-phpmyadmin-on-os-x-mavericks-using-homebrew/]外国友人的这篇文章[/url] 查看一下MySQL运行情况
 ~ ps aux | grep mysql
calvin   1695 0.0 0.5 2719864 90908 ?? S  1:38上午 0:00.31 /usr/local/Cellar/mysql/5.6.19/bin/mysqld --basedir=/usr/local/Cellar/mysql/5.6.19 --datadir=/usr/local/var/mysql --plugin-dir=/usr/local/Cellar/mysql/5.6.19/lib/plugin --bind-address=127.0.0.1 --log-error=/usr/local/var/mysql/CalvinsMacBook-Pro.local.err --pid-file=/usr/local/var/mysql/CalvinsMacBook-Pro.local.pid --socket=/tmp/mysql.sock --port=3306
calvin   1323 0.0 0.0 2444628 1020 ?? S  1:38上午 0:00.04 /bin/sh /usr/local/opt/mysql/bin/mysqld_safe --bind-address=127.0.0.1 --datadir=/usr/local/var/mysql

#测试连接MySQL
mysql -uroot -p
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 23
Server version: 5.6.19-log Homebrew

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
[b]安装phpmyadmin[/b]
[url=http://phalconphp.com/]php55-phalcon[/url] 和[url=http://www.swoole.com/]php55-swoole[/url].一个是C语言写的PHP框架,安装来个人摸索熟悉一下,还没有真正的使用过,大致看了一下文档,感觉非常吊炸天。目前公司的项目是基于Yii2的,也看看这个框架。 另外一个[url=http://www.swoole.com/]swoole是国产的PHP高性能网络通信框架[/url],貌似不错,可能在项目中会考虑用到它。 由于Mac自带了php和php-fpm,因此需要添加系统环境变量PATH来替代自带PHP版本。
[url=http://blog.frd.mn/install-nginx-php-fpm-mysql-and-phpmyadmin-on-os-x-mavericks-using-homebrew/]Install Nginx, PHP-FPM, MySQL and phpMyAdmin on OS X Mavericks using Homebrew[/url] 本文由Fish创作
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部