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 ...
随机推荐
- Dinic 模板
#include <iostream> #include <cstring> #include <cstdio> #include <queue> us ...
- 【贪心】Codeforces 704B & 705D Ant Man
题目链接: http://codeforces.com/problemset/problem/704/B 题目大意: 给N个点,起点S终点T,每个点有X,A,B,C,D,根据I和J的X坐标可得I到J的 ...
- 通过web修改svn用户密码
使用方法: 将文件changePasswd.cgi和changePasswd.ini 放到apche安装目录下的cgi-bin下(cgi-bin的目录可以通过/etc/httpd/conf/httpd ...
- [Locked] Palindrome Permutation I & II
Palindrome Permutation I Given a string, determine if a permutation of the string could form a palin ...
- 分页过滤SQL求总条数SQL正则
public static void main(String[] args) throws Exception { String queryForScanUsers_SQL = "selec ...
- JSTL和select标签的组合使用
1.用于根据不同的值显示对应的内容,不能选择 <select name="grade"> <c:choose> <c:when test=" ...
- Intellij 快捷键大全
Intellij IDEA的快捷键非常好用,能大大提高我们的开发速度.这里列举了一些常用的快捷键. 快速查找: Ctrl+N 查找类 Ctrl+R 替换当前窗口的文本 Ctrl+F 当前代码中查 ...
- sql服务器内部参数使用详情(存储过程)
exec sp_help;返回当前数据库中的所有存储过程.exec sp_help datebase.dbo.table名称 返回当前表中的所有对象.如字段名称等.这个吊exec sp_helpfil ...
- opencv_形态学结构化元素对形态学图像处理的影响
场景 对大米预处理之后的二值图像做开运算再做canny边缘检测. python代码: # kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(3 ...
- 关于kali安装vmware的坑,linux套路太深。
http://www.linuxidc.com/Linux/2015-08/122240.htm 但是还有些坑 安装gcc5.4.1 apt-get install gcc-5 gcc-5所在目录 / ...