前提是安装了composer,记住宝塔php里面删除两个函数: putenv() ,proc_open。使用下面命令进行安装
ubuntu@VM-4-13-ubuntu:/www/wwwroot/laravel7.yshuq.com$ sudo composer create-project --prefer-dist laravel/laravel=7 laravel7
Creating a "laravel/laravel=7" project at "./laravel7"
Installing laravel/laravel (v7.0.0)
- Installing laravel/laravel (v7.0.0): Extracting archive
Created project in /www/wwwroot/laravel7.yshuq.com/laravel7
> @php -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
https://repo.packagist.org could not be fully loaded (curl error 28 while downloading https://repo.packagist.org/packages.json: Failed to connect to repo.packagist.org port 443: Connection timed out), package information was loaded from the local cache and may be out of date
Updating dependencies
Lock file operations: 92 installs, 0 updates, 0 removals
- Locking asm89/stack-cors (1.3.0)
- Locking brick/math (0.9.3)
- Locking doctrine/inflector (2.0.8)
- Locking doctrine/instantiator (1.5.0)
- Locking doctrine/lexer (1.2.3)
......
......
......
- Installing myclabs/deep-copy (1.11.1): Extracting archive
- Installing doctrine/instantiator (1.5.0): Extracting archive
- Installing phpunit/phpunit (8.5.34): Extracting archive
61 package suggestions were added by new dependencies, use `composer suggest` to see details.
Package fruitcake/laravel-cors is abandoned, you should avoid using it. No replacement was suggested.
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: facade/ignition
Discovered Package: fideloper/proxy
Discovered Package: fruitcake/laravel-cors
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Package manifest generated successfully.
67 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Found 5 security vulnerability advisories affecting 2 packages.
Run "composer audit" for a full list of advisories.
> @php artisan key:generate --ansi
Application key set successfully.
ubuntu@VM-4-13-ubuntu:/www/wwwroot/laravel7.yshuq.com$