一、安装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
原创文章,作者:端木书台,如若转载,请注明出处:https://blog.ytso.com/272359.html