mac搭建mamp环境
1 先安装homebrew;
执行:cd /usr/local;
非root用户执行:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
执行:
brew update
already up-to-date 表示成功!
可能出现错误,打开xcode,点击同意;
更过关于homebrew请到官网:
http://brew.sh/index_zh-cn.html
2 安装mysql
$ brew install mysql
3 安装php
添加brew的PHP扩展库:
brew update brew tap homebrew/dupes brew tap josegonzales/homebrew-php
查看php5.5的选项
brew options php55
执行安装 ,后面选项可以调整
brew install php55 --with-fpm --with-gmp --with-imap --with-tidy --with-debug --with-mysql --with-libmysql --with-apache
查看还有哪些扩展可以安装,然后执行brew install php55-XXX就可以了
brew search php55
开机自动启动
ln -sfv /usr/local/opt/php55/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php55.plist
linux 查看apache版本 rpm -qi httpd
Mac 查看apache版本 suso apachectl -v
Linux上配置端口方式是这样的:
<VirtualHost *:1000>
DocumentRoot "/Users/lijundong/Documents"
ErrorLog /Users/lijundong/Documents/logs
</VirtualHost>
<Directory '/Users/lijundong/Documents'>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Mac上配置端口是这样的
<VirtualHost *:1000>
ServerName my.document.com
DocumentRoot "/Users/lijundong/Documents"
DirectoryIndex index.html index.php
<Directory "/Users/lijundong/Documents">
Options -Indexes +FollowSymlinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
之前一直出错是因为版本不同 配置配置的方式不同。
最新文章
- Arduino uno LED灯实验
- Error:Execution failed for task &#39;:app:transformClassesWithInstantRunForDebug&#39;. >; java.lang.ClassNotFoundException: io.realm.RealmObject
- python 练习多级菜单思路
- [PHP]array_map与array_column之间的关系
- placeholder在ie浏览器里不显示的问题解决
- POJ 1287 Networking (最小生成树)
- 一步一步ITextSharp 低级操作函数使用
- jQuery之手风琴图片
- 【问题汇总】ListView的FooterView设置可见性的问题
- spm3 基本
- LeetCode OJ 54. Spiral Matrix
- iOS开发——打包静态库与Framework
- 5.volatile的应用
- Now trying to drop the old temporary tablespace, the session hangs.
- k8s应用机密信息与配置管理(九)--技术流ken
- Ubuntu软件的安装与删除
- 使用AS-REP Roasting和kerberoasting攻击kerberos
- zabbix监控短信息接口是否正常
- python初级 2 字符串格式化
- [Ubuntu] LightDM 轻量级桌面显示管理器
热门文章
- iOS基于MBProgressHUD的二次封装,一行搞定,使用超简单
- PHP生成器Generators
- 32-bit Assembly on x86_64 Linux (Use Nasm and ld&;gcc)
- 使用Windows Azure的VM安装和配置CDH搭建Hadoop集群
- C++11 之 scoped enum
- python笔记-调用eval函数出现invalid syntax错误
- NOIP2012pj摆花[DP 多重背包方案数]
- java分层开发
- 炮(棋盘DP)
- 杭电OJ——1198 Farm Irrigation (并查集)