mac下操作cakephp
在mac min下操作cakephp
1. git clone -b 2.x git://github.com/cakephp/cakephp.git
git clone后的文件放在哪?---当前目录下
2.如何给目录修改名字?
HTTPDUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
setfacl -R -m u:${HTTPDUSER}:rwx app/tmp
setfacl -R -d -m u:${HTTPDUSER}:rwx app/tmp
mac底下没有setfacl命令。
setfacl命令的用途是修改文件目录权限
HTTPDUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
sudo chmod -R -m u:${HTTPDUSER}:rwx app/tmp
sudo chmod -R -d -m u:${HTTPDUSER}:rwx app/tmp
3.如何给配置服务器
manager-osx ===> Open Application Folder ===> apache2 ===> cong ===> vhosts
配置cakephp2.conf
<VirtualHost *:80> #项目地址 DocumentRoot /Users/mac/Sites/cakephp2 directoryIndex index.html index.php index.htm index.shtml ServerName cakephp2.dev <Directory /Users/mac/Sites/cakephp2> Options FollowSymLinks Indexes AllowOverride all #Order allow,deny #Allow from all Require all granted </Directory> </VirtualHost>