##1. 安装 (npm方法安装)
### 查看版本
##1.下载安装yii2
composer create-project yiisoft/yii2-app-advanced my-blog
下载完成后在 environments/dev/common/config/main-local.php
配置基本数据库信息
```
return [
'components' => [
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=yii2advanced',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
],
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => '@common/mail',
// send all mails to a file by default. You have to set
// 'useFileTransport' to false and configure a transport
// for the mailer to send real emails.
'useFileTransport' => true,
],
],
];
```
2.配置nginx --》不再说明
执行 php init 初识化配置信息
因为我用的mongodb所以需要配置下mongogii
mongo用户表结构
用户表
id username phone email password password_hash status type createTime updateTime
生成user modle
-----未完待续-----