Installation in Linux
We are installing our Yii2 framework thorugh Composer. So first we need to install composer on our Linux system.
In order to work composer Yii2 in our systems, some packages need to be installed first to support them.
So let's get started. Open your Terminal and start executing the following code.
Installation of prerequisites for Composer and Yii2 framework
Step 1 The curl installation
Step 2 The php5-cli package installation
Look at the above snapshot, it is asking for permission, press y and then "enter".
Step 3 The php5-mysql package installation
Step 4 The php5-mycrypt package installation
To activate it, we need to run the following command.
Now these four packages will alwayse remain in your system and you don't need to install them every time while installating Yii framework.
Let's install the composer globally in our system.
Step 1 The Composer installation
Step 2 Installing Composer Globally
Step 3 After composer installed, install composer asset plugin.
Here, you may be asked for a Token, which indicates GitHub username and password. If you don't have one just create it. It is very easy to create and free to use.
This command allows you to manage asset plugins like css, js, etc which manages npm and bower dependencies.
Now we are ready to install basic and advanced templates.
Step 4 To install Basic template
After the download is complete, you can rename it as you want. Our folder is named as basic.
Step 5 To install Advanced template
Here we have named it as Advanced.
Step 6 Run it on the browser with the following URL,
Look at the above snapshot, you have successfully downloaded your Yii2 framework in your system. Now start your application.