The installation parameters composer -vvv is a showcase installation progress, the installation fails when using other parameters tested, the card has been fixed
curl -vvv https://getcomposer.org/installer | PHP
mv composer.phar / usr / local / bin / composer
Under install git, under the order code on github clone
APT-GET install git
Before you create a project, you want to install php extensions and unzip command, do not create these extensions behind the project is not successful
APT-GET-install php7.3 ZIP mbstring php7.3-
APT-GET install unzip
If you encounter a warning, not allowed to use as root, you can not control directly ignored on the line, no need to use a non-root user. First to set up mirror sites, go to create a project, otherwise it will get stuck motionless
Composer config -g repo.packagist Composer https://mirrors.aliyun.com/composer/
Composer-the Create Project topthink / 6.0.x of Think = -dev thinkphp
After the download is complete framework code, take root .example.env into .env, so debug mode is enabled by default, you can see errors in the code
configuration nginx rewrite to remove index.php prefix configuration pathinfo pass variables to use tp6.0 route
nginx configuration files thinkphp as follows:
server { listen 80; server_name tp.com; access_log /var/log/nginx/tp.com.access.log main; error_log /var/log/nginx/tp.com.error.log; root /var/www/html/thinkphp/public; if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?s=$1 last; break; } location / { index index.html index.php; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_split_path_info ^(.+\.php)(/.*)$; fastcgi_param PATH_INFO $fastcgi_path_info; include fastcgi_params; } }
Video Address: