Skip to main content

Yii is a high-performance, component-based PHP framework for developing large-scale Web applications rapidly. It enables maximum reusability in Web programming and can significantly accelerate your Web application development process.

- Advertisement -

We wrote how to install Yii framework in XAMPP on Windows, and here are instructions how to install it on Ubuntu (or any other GNU/Linux) environment.

Install XAMPP

XAMPP is a free and open source cross-platform web server solution stack package, consisting mainly of the Apache HTTP Server, MySQL database, and interpreters for programming scripts.

1) Download the XAMPP from http://www.apachefriends.org/en/xampp-linux.html and install it, if you haven't yet. We'll assume that the XAMPP is installed in /opt/lampp folder; and make sure that MySQL and Apache services are running.

Install Yii framework

2) Get the Yii framework from the site http://www.yiiframework.com

3) Extract the compressed files into XAMPP htdocs folder, e.g. /opt/lampp/htdocs/yiiframework

- Advertisement -
- Advertisement -

4) Yii framework contains requirements checker so you could run it with http://localhost/yiiframework/requirements. You have to be sure that there isn't any Failed status for requirements.

Image
Yii xampp ubuntu 02

 

Install PHP command line interpreter

The next step is to setup environment variables or else you could experience error when you use yiic command:

'php.exe' is not recognized as an internal or external command, operable program or batch file.

5) Run the following command in order to install php5-cli (if it hasn't yes installed)

apt-get install php5-cli

Creating application

6) Open the console/terminal, navigate to %yii-framework-path%/framework (in our case the full path is /opt/lampp/htdocs/yiiframework/framework)

7) Enter the following command in order to create web application

./yiic webapp ../../yiitestapp

8) You'll be asked with yes|no; enter yes

9) The application is created and you can access it on http://localhost/yiitestapp

Image
Yii xampp ubuntu 05

- Advertisement -