Go to https://symfony.com/download
Download Symfony binary, which is a command line tool that will start Symfony projects and give some other advantages.
Run this command inside your terminal:
curl -sS https://get.symfony.com/cli/installer | bash
After executing this command, it will show you this output and give you the option how to install it.
The Symfony CLI was installed successfully!
Use it as a local file:
/Users/name/.symfony5/bin/symfony
Or add the following line to your shell configuration file:
export PATH="$HOME/.symfony5/bin:$PATH"
Or install it globally on your system:
mv /Users/name/.symfony5/bin/symfony /usr/local/bin/symfony
Then start a new shell and run 'symfony'
In my opinion the best way is to install it globally by using the last option. Just copy/paste the command into your terminal and you are done.
Start a new project by typing:
symfony new mynewproject
This will bootstrap a new Symfony project that includes a git repository. It will also create an initial git commit called: Add initial set of files. This command actually clones https://github.com/symfony/skeleton github project and runs composer install.
You can also add --webapp on the end of the previously mentioned command. When you use this option, it installs webapp pack to get a fully configured web project.