ubuntu symfony2
来源:程序员人生 发布时间:2014-09-17 23:15:56 阅读次数:2967次
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
看是否配置成功
生活不易,码农辛苦
如果您觉得本网站对您的学习有所帮助,可以手机扫描二维码进行捐赠