composer安装laravel

./configure \
  --prefix=/usr/local/php \
  --with-mysql=mysqlnd \
  --with-mysqli=mysqlnd \
  --enable-short-tags \
  --disable-posix \
  --with-config-file-path=/usr/local/php/etc \
  --with-config-file-scan-dir=/usr/local/php/etc/conf.d \
  --enable-ftp \
  --with-curl=/usr \
  --with-zlib \
  --enable-xml \
  --with-gd \
  --with-jpeg-dir=/usr/lib \
  --with-png-dir=/usr/lib \
  --with-freetype-dir=/usr/lib \
  --enable-mbstring \
  --enable-sockets \
  --enable-exif \
  --enable-fpm \
  --with-openssl \
  --enable-zip \
  --with-mcrypt \
  --disable-fileinfo

安装composer

sudo apt-get install libmcrypt libmcrypt-devel
sudo apt-get install php-mbstring
sudo apt-get install php-xml
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer        
composer -V

安装laravel


sudo apt-get install php-mbstring
composer create-project --prefer-dist laravel/laravel blog "5.2.*"

composer config -g repo.packagist composer https://packagist.phpcomposer.com

2、设置目录权限:对于storage文件夹和bootstrap/cache必须设置为服务器可以写入的权限(window下可以忽略)
5、(补充)如果你没有使用Composer安装(直接下载放到web服务器的网站根目录下),还需要做两步
a、将.env.example文件复制一份,改名为.env
b、修改秘钥,这串秘钥存放在.env全局配置文件中,修改方法很简单只需在终端执行下面的命令(更安全有关需要修改)
php artisan key:generate



你可能感兴趣的:(laravel)