5 C
Texas
angeloma
Senior Writer and partner

How to install Symfony on Ubuntu 20.04?

Hello, friends. Hope you are well. There are many PHP frameworks but in this post, you will learn how to install Symfony. Maybe this is one of the most advanced ones out there.

Symfony is an entire web development platform that includes a framework:

The leading PHP framework to create websites and web applications. Built on top of the Symfony Components.

One of the main advantages of Symfony is that it has an MIT license, which is the same as a permissive free software license.

On the other hand, it uses the Model – View – Controller pattern that is so widespread among developers. Also, it allows you to create from simple websites to macro projects and complex applications all hand in hand with a huge community of users.

- Advertisement -

So, let’s get started.

Install Symfony on Ubuntu 20.04

Symfony can be installed via composer or from your installer which is the easiest and most feasible option.

So, open the terminal and upgrade Ubuntu 20.04

sudo apt update
sudo apt upgrade

Symfony is a PHP framework, so it requires PHP to work. If you already have a LAMP or LEMP server you do not need this step.

sudo apt install php php-json php-ctype php-curl php-mbstring php-xml php-zip php-tokenizer php-tokenizer libpcre3 --no-install-recommends

After this, install GIT, unzip and zip for a successful installation

sudo apt install git zip unzip

After that, download and install the symfony-cli tool

wget https://get.symfony.com/cli/installer -O - | bash
1.- Download Symfony Cli
1.- Download Symfony Cli

After that, add the Symfony installation path to the PATH user.

export PATH="$HOME/.symfony/bin:$PATH".

And apply the changes by running

source ~/.bashrc

With this, we will be able to use the tool from any location of the prompt.

Now configure the email and user of your user in Git.

git config --global user.email "[email protected]"
git config --global user.name "Angelo"

Now you can create a new project by running it.

symfony new example --full

Note: You have to replace example with the name of your project.

And now you can start working with your text editor like Visual Studio Code.

To start the local webserver you can run:

cd example
symfony server:start
2.- Serve the project
2.- Serve the project

Remember to replace example with the name of your project.

Now you can go to http://localhost:8000 and check your project.

3.- Symfony on Ubuntu 20.04
3.- Symfony on Ubuntu 20.04

So, enjoy it.

Conclusion

Thanks to this post, now you know how to install this framework on Ubuntu 20.04 this is the first step to start developing applications with this great framework.

More info: Official documentation

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article