安装composer,命令如下
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
chmod +x /usr/local/bin/composer
切换到Apache默认目录下
cd /var/www/
composer create-project laravel/laravel --prefer-dist "5.1.11"
composer install
修改权限
cd laravel
chmod -R 777 storage/
修改配置
vim/etc/httpd/conf/httpd.conf
把DocumentRoot “/var/www/html”改为DocumentRoot “/var/www/laravel/public”
重启Apache服务
service httpd restart