系统环境
OS: Mac OS X 10.10.5
安装PHP 7.1
brew install php71 --with-pear
安装Composer
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
安装辅助工具
- PhpStorm
- MySQL Workbench (https://dev.mysql.com/downloads/workbench/)
PHP >= 7.0.0
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension
新建Laravel项目
composer create-project --prefer-dist laravel/laravel findBricks "5.5.*"
初始化
修改config/app.php中的
'url' => env('APP_URL', 'http://localhost:8000'),
'timezone' => 'PRC',
'locale' => 'zh',
同步到GitHub仓库
创建仓库
初次推送
git init
git add -A
git commit -m "first commit"
git remote add origin https://github.com/patientkitty/librarySeating.git
git push -u origin master
启动站点
在Laravel项目目录下运行
php artisan serve --port=8088
问题汇总
MySQL启动问题
故障现象:. ERROR! The server quit without updating PID file (/usr/local/var/mysql/NYUSH1499LP-MX.local.pid)
故障判断:pid文件根本找不到,手动创建一旦启动MySQL又被删除,可能是目录权限问题
解决方法:chown -R mysql:mysql + 路径