Symfony5をインストールする手順

Symfony5をインストールする手順を記述してます。ここではOSにubuntuを利用してます。
環境
- OS ubuntu20.04
- Symfony 5.1.2
composerを利用
composerを使ってインストールします。
※Ubuntu20.04にComposerをインストールする手順はこちら
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
composer create-project symfony/skeleton sf-project ※sf-projectは任意のプロジェクト名を指定 <出力結果> Writing lock file Generating optimized autoload files 27 packages you are using are looking for funding. Use the `composer fund` command to find out more! Symfony operations: 3 recipes (d910667423f5612ae5037ec9c3fe639a) - Configuring symfony/framework-bundle (>=5.1): From github.com/symfony/recipes:master - Configuring symfony/console (>=5.1): From github.com/symfony/recipes:master - Configuring symfony/routing (>=5.1): From github.com/symfony/recipes:master Executing script cache:clear [OK] Executing script assets:install public [OK] Some files may have been created or updated to configure your new packages. Please review, edit and commit them: these files are yours. Some files may have been created or updated to configure your new packages. Please review, edit and commit them: these files are yours. What's next? * Run your application: 1. Go to the project directory 2. Create your code repository with the git init command 3. Download the Symfony CLI at https://symfony.com/download to install a development web server * Read the documentation at https://symfony.com/doc |
バージョン確認
1 2 3 4 |
./bin/console -V <出力結果> Symfony 5.1.2 (env: dev, debug: true) |
Symfony5起動
下記のコマンドで起動します。
※5系では、まだ「composer require server」は利用できないようです。
1 2 3 4 5 |
php -S IPアドレス:8001 -t public or php -S localhost:8001 -t public |
ブラウザから http://プライベートIP or サーバーアドレス or localhost:8001 にアクセスします。

-
前の記事
docker composeを利用してGroup Officeを構築する手順 2020.07.06
-
次の記事
CentOs8 caddy2.0をインストールする 2020.07.07
コメントを書く