How to Install and Configure Symfony on an Ubuntu VPS
Edit Article

  • 1 Editor

We are now going to see an interesting and easy topic that will refresh your knowledge. We will be reminding you through the concepts of how to get started with Symfony on an Ubuntu VPS. Hope you all will enjoy and refresh your knowledge effortlessly.


Let us now start with some basics...


Many of may need a website for business purposes. Some of you might know to create it, because some of them may not. But have you ever thought what is behind it and how it functions. This is where VPS plays an important role. VPS is very important part of the hosting and stands for the Virtual Private Server. Suppose you want to create a website then in this case the domain hosting is very important. Here Symfony on an Ubuntu VPS is very important to make the web application framework. Those both make the hosting and framework perfect. Symfony is known to be the very famous framework component of PHP.


Hope you have what you wanted... Let’s go in for some more details.

Overview about Symfony

Symfony is an important kind of the framework. A set of the components works as an application framework. Symfony is a leading PHP framework which is used for creating web application. Well, the term of the Symfony is the useful reusable set of standalone PHP component. It is basically used for solving the common problem inside the web development. Generally, Symfony is famous full stock framework because of its components. Another part of Symfony is Symfony 1.0. It was for the monolithic framework. Now the Symfony is commonly used in the PHP framework which was released few years ago.


Now hope you have got your knowledge refreshed. Now let us know about what Ubuntu VPS is ?

Overview about Ubuntu VPS

Everyone is well aware with VPS which stands for the Virtual Private Server. This is useful at time of hosting. Here the term we use is Ubuntu VPS. The Ubuntu VPS has famed Linux Distro. The Latest version of Ubuntu VPS is 12.04. The specialty of this Ubuntu VPS is provides a long-term support which is commonly known by the name of LTS. In general terms Ubuntu is called Linux. The Ubuntu developers term it as A2.


I hope you are clear till this. Now we will move on to some more in depth topics of Installation and Configuring.


I have provided the process step by step so that you can go through and understand the concept in a jiffy.

How to install Symfony Framework on an Ubuntu VPS ?

Installation of the Symfony on an Ubuntu VPS is simple.


Here are some important steps which you need to follow for installation of the Symfony on an Ubuntu VPS:

First Step:

Installation of PHP:

Before installation of the Symfony on an Ubuntu VPS:-

You need to install the PHP which is for the Command line Environment. It is not required to install the full feature web servers like Nginx and Apache. The reason behind this is because, the Symfony comes with the console command. It makes it easy to manage PHP’s while you are doing the developing application.


Read Also:


Install and Configure Apache Tomcat on Ubuntu VPS



Install Nginx, HHVM and MySQL (LNMH) on Ubuntu



First of all you have to update the package manger cache:

$ sudo apt-get update

Then execute PHP script through command lined and need to install the php5-cli

$ sudo apt-get install php5-cli

Then check if it is installed successfully or not?

$ php –v

PHP

Once it’s done you will get an output, which will be on installation.


Here the second step is the most vital and required.

Second Step:

Configuring date.timezone in php.ini

Once the installation of Symfony is done, some of the process must be followed which include:


The need of date.timezone which is set in your php.ini file(s) is required.


After that process need to edit the server’s php.ini. The path where file is located is /etc/php5/cli/php.ini


Next process is to open the php.ini file as well as the command line editor.

$ sudo nano /etc/php5/cli/php.ini

Third Step:

Through installing official installer, it is growing way to create the new Symfony project. a simple one script is created to give the facility for bootstrap of new Symfony applications.


Path of the Symfony Installer download and place it as /usr/local/bin

$ sudo curl -LsS http://symfony.com/installer -o /usr/local/bin/symfony

After that need to do executable script with next command

$ sudo chmod a+x /usr/local/bin/symfony

Now need to test the Symfony Installer, run:

$ Symfony

After that you will get an output.

Fourth Step:

Creating New Project:

Read Also: Deploy a Symfony Apps to Production on Ubuntu Server


Need to change the public Project inside:

$ cd Public

Create the project

$ composer create-project symfony/framework-standard-edition 
projectName “2.5.*”

Fifth Step:

Application Running with the Symfony Console:

One side of the Symfony Console is CLI script. It has several commands which are required at times of build and test application. There also you have the facility to include your own commands which are written in PHP.

Six Step:

Setting up PhpStorm:

In this, opening JDK is required. It is because you need to install the JDK $ sudo apt-get install openjdk-7-jdk. Here few things are required to Disable spelling like.

JDK

Then, From indexing exclude some directories: app/cache and app/logs Select the PHP interpreter Set up PHP code sniffer

Seven Step:

Server Configuration

This is for checking if everything is ok! Well for the Symfony2 has the better present:

http://www.example.com/Symfony/web/config.php

Global Configuration:

For some other drivers use the following MySQL, SQLite, PosgreSQL, Oracle etc. After the connection information, let's move to click the next. Then generate the global secret string which is for against the protection of CSRF.

Conclusion:

With the process explained step by step hope you have understood the installation process of Symfony. We have given many examples to make the installation process of Symfony on an Ubuntu VPS easy. If you feel that some more information has to be included in this please feel free to let us know. We will update it as soon as possible. Stay connected to our page for more topics that refresh your knowledge.

Article Tools

Did this article help you?

YesNo

Become
an Author!

Write an Article