Install the necessary software components, if not already installed:
sudo apt-get update
sudo apt-get install curl wget unzip
Install the Symfony CLI by running the following command:
sudo curl https://get.symfony.com/cli/installer -o /usr/local/bin/symfony
Make the Symfony CLI executable:
sudo chmod a+x /usr/local/bin/symfony
Install the latest version of PHP, if not already installed:
sudo apt-get install php
Verify that you have the necessary PHP extensions:
php -m
Install the composer, if not already installed:
sudo apt-get install composer
Basic Symfony functions
To create a new Symfony project:
symfony new my_project
Change to the project directory:
cd my_project
Start the Symfony local web server:
symfony server:start
Navigate to http://<ip_address>:8000 in your web browser to access the Symfony application.
Note: The steps in this guide are only a very basic guide for the setup of Symfony on Ubuntu 22.10.
For a more advanced setup, including production deployments, refer to the official Symfony documentation.
Discussion