系统相关
首页 > 系统相关> > ubuntu18.04安装ThinkPHP6

ubuntu18.04安装ThinkPHP6

作者:互联网

一、安装Lamp环境所需应用(apache、mysql、php)

sudo apt install apache2
sudo apt install mysql-server
sudo apt install php


安装 composer

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usrl/bin/composer

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer #添加下载源



创建项目
sudo chmod -R 777 /var/www/html
cd /var/www/html
composer create-project topthink/think tp6


启动项目(测试)
php think run #在默认端口8000启动tp,http://localhost:8000/
php think run -p 80 #指定在80端口启动tp

因为本次部署是在服务器,且绑定域名了,可直接在浏览器访问,如:
http://your_ip/tp6/public

标签:ubuntu18.04,install,sudo,apt,ThinkPHP6,composer,php,安装,think
来源: https://www.cnblogs.com/cute/p/16300925.html