程序员人生 网站导航

ubuntu symfony2

栏目:access时间:2014-09-17 23:15:56

1.下载symfony2

symfony2


2.解压symfony2到apache  var/www,目录结构如下

path/to/webroot/ <- your web server directory (sometimes named htdocs or public) Symfony/ <- the new directory app/ cache/ config/ logs/ src/ ... vendor/ ... web/ app.php ...


3.安装intl,pdo-mysql

sudo apt-get install php5-intl

sudo apt-get install php5-mysql   //包含pdo扩展


4.设置权限,这里采用了ACL not chmod +a

$ rm -rf app/cache/*
$ rm -rf app/logs/*
$ APACHEUSER=`ps aux | grep -E '[a]pache|[h]ttpd' | grep -v root | head -1 | cut -d -f1`
$ sudo setfacl -R -m u:$APACHEUSER:rwX -m u:`whoami`:rwX app/cache app/logs
$ sudo setfacl -dR -m u:$APACHEUSER:rwX -m u:`whoami`:rwX app/cache app/logs


5.访问http://localhost/Symfony/web/config.php

看是否配置成功

------分隔线----------------------------
------分隔线----------------------------

最新技术推荐