安装docker
yum update
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum list docker-ce --showduplicates | sort -r
yum install docker-ce
systemctl start docker
systemctl enable docker
docker version
git clone https://github.com/Laradock/laradock.git
cp env-example .env
service docker start
vi mysql/Dockerfile
改ARG MYSQL_VERSION=latest为ARG MYSQL_VERSION=5.7
vi .env
MYSQL_VERSION=latest为MYSQL_VERSION=5.7
docker-compose up -d nginx mysql redis beanstalkd
在 laradock 父级目录下创建一个与 laradock 同级的 wwwroot 目录,然后在 wwwroot 目录下运行 laravel new blog 命令创建一个新的 Laravel 应用
cd /home/www
mkdir wwwroot
cd laradock
vi .env
添加如下配置:
DB_HOST=mysql
REDIS_HOST=redis
QUEUE_HOST=beanstalkd
APPLICATION=../wwwroot/
cd /home/www/wwwroot
yum -y install mailx
curl -sS https://getcomposer.org/installer | php
php conposer.phar
mv composer.phar /usr/local/bin/composer
cd /usr/local/bin
chmod 744 composer
composer global require "laravel/installer"
Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_PARSE)
Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE)
意思是laravel需要更新的php版本
星期一, 07/29/2019 - 17:29 — 杨超