0. 首先安装一下 composer
php composer.phar dump-autoload
mv composer.phar /usr/local/bin/composer 加入环境变量
composer install 初始化
1. 安装 composer 安装
2. composer.json 提前准备好这个文件
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*"
},
"config": {
"preferred-install": "dist"
},
"repositories": {
"packagist": {
"type": "composer",
"url": "https://packagist.phpcomposer.com"
}
}
}
3. 执行安装命令
composer create-project laravel/laravel --prefer-dist
4.配置nginx
server {
#listen 80 default_server;
#listen [::]:80 default_server;
listen 80;
root /var/www/html/session;
index index.php index.html index.htm index.nginx-debian.html server.php;
server_name thinkme.com;
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php5.6-fpm.sock;
}
}
5.访问
6 .学习资料
laravel 安装 https://www.cnblogs.com/tujia/p/6377777.html laravel安装 redis 并驱动 session https://cs.laravel-china.org/ laravel 速记首次
|