os mac apache+php+mysql环境配置
1。启用系统自带的apache 服务
打开终端(terminal)
#sudo apachectl start
#sudo vi /etc/apache2/httpd.conf
修改
LoadModule php5_module libexec/apache2/libphp5.so
//开启php
/*****如果访问403****/
<Directory />
AllowOverride none
Order allow,deny
Allow from all
# Require all denied
Require all granted
</Directory>
/****修改Require all granted*****/
Include /Volumes/App/webserver/vhosts/*.conf
引入虚拟主机的文件。
#wq //保存退出
#vi /Volumes/App/webserver/vhosts/sv1.conf
<VirtualHost *:80>
ServerAdmin www.sv1.com
DocumentRoot "/Volumes/App/webserver/wwwroot/sv1/wwwroot"
ServerName www.sv1.com
ErrorLog "/Volumes/App/webserver/log/apache2/sv1-error_log"
CustomLog "/Volumes/App/webserver/log/apache2/sv1-access_log" common
</VirtualHost>
#sudo vi /etc/hosts
#sudo apachectl restart //重启
2。mysql
添加brew
参考:http://brew.sh/index_zh-cn.html
打开终端窗口, 粘贴以上脚本。
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$brew install mysql
$unset TMPDIR
$mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/Volumes/App/webserver/mysqldata --tmpdir=/tmp/
$mysql.server start
$mysqladmin -u root password 'newpassword'
拷贝:/usr/local/var/mysql/下的文件到 /Volumes/App/webserver/mysqldata
修改/usr/local/Cellar/mysql/5.6.10/homebrew.mxcl.mysql.plist
<string>--datadir=/Volumes/App/webserver/mysqldata</string>
数据库目录文件位置。
$sudo cp /usr/local/Cellar/mysql/5.6./homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/
$launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
/* ~ 标记为当前用户目录 */
http://mac.pcbeta.com/thread-138241-1-1.html
os mac apache+php+mysql环境配置的更多相关文章
- mac上搭建mysql环境配置和Navicat连接mysql
mac上搭建mysql环境配置 1.下载mysql for mac: https://downloads.mysql.com/archives/community/ 注意:mysql版本要和你的MAC ...
- Apache+php+mysql环境配置
Apache+PHP+MySQL环境搭建 标题格式 正文格式 阶段性完成格式 正文中强调格式 ————————————————————————————— 前语:本文是从我写过的doc文档迁移过来的,由 ...
- windows 7 64bit 下apache php mysql 环境配置
在64位环境下安装apache,php和配置过程 准备好安装包.(64位版本) Apache 下载地址:http://www.apachelounge.com/download/ Php 下载地址:h ...
- Apache+Django+Mysql环境配置
环境要求:Apache:2.2 Mysql:5.5 Django:1.5 python:2.7 首先下载mod_wsgi-win32-ap22py27-3.3.so 下载下来后,改名成mod_wsg ...
- windows下apache+php+mysql 环境配置方法
一 准备 1 下载apache http://httpd.apache.org/download.cgi#apache24 httpd-2.2.22-win32-x86-openssl-0.9.8t. ...
- center os7.2 apache+php+mysql环境配置并设置https访问
本人阿里云购买的center os7.2系统,小程序只支持https,因此需要配置https 安装apache yum -y install httpd systemctl start httpd a ...
- 在Mac上安装mysql并配置环境(详细篇)
在Mac上安装mysql并配置环境(详细篇) 1.下载mysql mysql官网 这一步根据自己电脑架构选择,分为arm和x86 下载完成之后打开就可以 接下来运行安装就可以,一直下一步,设置完密码就 ...
- Ubuntu+Apache+PHP+Mysql环境搭建(完整版)(转)
http://www.2cto.com/os/201505/401588.html Ubuntu+Apache+PHP+Mysql环境搭建(完整版) 一.操作系统Ubuntu 14.04 64位,阿里 ...
- mac电脑使用,开发环境配置指南
mac电脑使用,开发环境配置指南 前端工具链,mac下都很好用 用brew来装软件 用brew cask来装应用 Introduction · macOS Setup Guidehttp://sour ...
随机推荐
- 数学概念——H 最美素数
H - 数论,晒素数 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit S ...
- python关键字、转义符和字符串格式化
最近在学learn python the hard way,学习到第37章,进行了关于关键字.转义符和字符串格式化的总结.看手头上的中文版没有及时更新.于是就把这些翻译过来,以作查阅. 关键字: 关键 ...
- 《ACM国际大学生程序设计竞赛题解I》——6.11
pku 1107: Description Weird Wally's Wireless Widgets, Inc. manufactures an eclectic assortment of sm ...
- Apache-Tika解析Word文档
通常在使用爬虫时,爬取到网上的文章都是各式各样的格式处理起来比较麻烦,这里我们使用Apache-Tika来处理Word格式的文章,如下: package com.mengyao.tika.app; i ...
- jiaocheng https://github.com/CarpenterLee/JCFInternals
https://github.com/CarpenterLee/JCFInternals
- Unity3D NGUI制作进度条
利用GUI可以制作进度条,但是NGUI更加方便 我是用的NGUI3.5.3, 先找到NGUI Slider的预制体,利用自带的UISlider来制作. 主要是利用UISlider的Value来控制进 ...
- 适配iOS7uinavigationbar遮挡tableView的问题
//适配iOS7uinavigationbar遮挡tableView的问题 if([[[UIDevice currentDevice]systemVersion]floatValue]>=7.0 ...
- 技术型创业者easy遇到的三大问题
关于创业这事儿.由于经历的事情实在是太多了,所以真是想到哪儿写到哪儿. 这一篇算是<杂记>的番外篇.我今天想说的东西太多了,实在是非常想和很多其它人讨论讨论关于创业的事情. 这样的感觉就像 ...
- Linux基本配置和管理 2 ---- Linux多命令协作----管道及重定向
1 管道和重定向 1 在Linux中大多数命令都很简单,很少出现复杂的命令,每个命令只是实现一个简单的功能,我们可以通过组合不同的命令来实现复杂的功能 2 在Linux中几乎所有的命令返回的数据都是纯 ...
- [Javascript] Proper use of console.assert in JavaScript
Learn about console.assert, which is syntactic sugar for logging an error the console when a given c ...