One of the most widely used PHP frameworks, Symfony, makes it simple and quick to create your own applications. With a large developer community and a variety of decoupled and reusable components, Symfony has drawn a lot of interest from the open-source community.
I’ll walk you through the process of installing and configuring Symfony 3.0.0 for AKLWEB HOST LEMP VPS application development in this post.<\/p>\n\n\n\n
The officially recommended method to install Symfony is to use the Symfony installer.<\/p>\n\n\n\n
Log in from an SSH terminal, input:<\/p>\n\n\n\n
sudo curl -LsS http:\/\/symfony.com\/installer -o \/usr\/local\/bin\/symfony\nsudo chmod a+x \/usr\/local\/bin\/symfony<\/code><\/pre>\n\n\n\nNow you can use the symfony<\/code> command from your shell.<\/p>\n\n\n\nStep 2: Create the Symfony application<\/h2>\n\n\n\n
Create a new application with Symfony:<\/p>\n\n\n\n
symfony new my_project<\/code><\/pre>\n\n\n\nThis command will create a directory called my_project<\/code> in your home directory to host all of your application files.<\/p>\n\n\n\nIf you want to specify the version of Symfony, append the version number to the command mentioned above, like:<\/p>\n\n\n\n
symfony new my_project 2.6\nsymfony new my_project 2.6.5\nsymfony new my_project 2.7.0-RC1\nsymfony new my_project lts<\/code><\/pre>\n\n\n\nStep 3: Run and verify the Symfony application<\/h2>\n\n\n\n
Execute the following commands to start the Symfony application:<\/p>\n\n\n\n
cd my_project\/\nphp bin\/console server:run<\/code><\/pre>\n\n\n\nIf the operation was successful, you will see the prompt [OK] Server running on http:\/\/127.0.0.1:8000<\/code> appear on your screen. You can verify the result by accessing the URL http:\/\/127.0.0.1:8000\/<\/code> from a web browser.<\/p>\n\n\n\nKeep the command running in the current SSH terminal. Open another SSH terminal and download a text browser called Lynx:<\/p>\n\n\n\n
sudo yum install -y lynx<\/code><\/pre>\n\n\n\nVisit http:\/\/127.0.0.1:8000\/<\/code> from Lynx:<\/p>\n\n\n\nlynx http:\/\/127.0.0.1:8000\/<\/code><\/pre>\n\n\n\nYou will see the welcome page of Symfony: “Welcome to Symfony 3.0.0”. Then press Shift + Q<\/strong> to quit Lynx.<\/p>\n\n\n\n