$ sudo curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony
$ sudo chmod a+x /usr/local/bin/symfony
This will create a global symfony command in your system.
—
$ symfony new my_project_name // $ symfony new blog
use the most recent version in any Symfony branch
$ symfony new my_project_name 2.8
$ symfony new my_project_name 3.1
use a specific Symfony version
$ symfony new my_project_name 2.8.1
$ symfony new my_project_name 3.0.2
—
The installer also supports a special version called lts which installs the most recent Symfony LTS version available:
$ symfony new my_project_name lts
——–
Symfony 2.8.7 was successfully installed but your system doesn’t meet its
technical requirements! Fix the following issues before executing
your Symfony application:
* simplexml_import_dom() must be available
> Install and enable the SimpleXML extension.
After fixing these issues, re-check Symfony requirements executing this command:
php blog/app/check.php
Then, you can:
* Change your current directory to /home/ubunto/blog
* Configure your application in app/config/parameters.yml file.
* Run your application:
1. Execute the php app/console server:run command.
2. Browse to the http://localhost:8000 URL.
Solveing this issue:
sudo apt-get install php-xml
—
“sudo apt-get install php-xml” worked for my PHP 7 on Ubuntu 16.04 LTS.
or try:
sudo apt-get install php7.0-xml
This reinstalled/re-enabled SimpleXML and everything is working as intended.
—
[OK]
Your system is ready to run Symfony projects
Optional recommendations to improve your setup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* intl extension should be available
> Install and enable the intl extension (used for validators).
Note The command console could use a different php.ini file
~~~~ than the one used with your web server. To be on the
safe side, please check the requirements from your web
server using the web/config.php script.
Solving:
sudo apt-get install php7.0-intl
=============
Running the Symfony Application
$ cd my_project_name/ // cd blog/
$ php app/console server:run
// Quit the server with CONTROL-C.
Then, open your browser and access the http://localhost:8000/ URL to see the Welcome Page of Symfony