Setting Up Yii Framework on Ubuntu

Posted By : Varun Sharma | 09-Jan-2014

For Setting Up Yii Framework first you need to have LAMP installed on your system 

 

Step 1: Installing LAMP

I'm assuming you already have Linux (Ubuntu 12.04) installed on your system.

1. Install Apache

sudo apt-get install apache2

2. Install MySQL

sudo apt-get install mysql-server

3. Install PHP

sudo apt-get install php5 libapache2-mod-php5

4. Check Apache

Open your web browser and navigate through http://localhost/. You should see a message saying, It works!

5. Restart Server 

Your System should restart Apache automatically after installing PHP & MySQL if doesn't then run this command

sudo /etc/init.d/apache2 restart

6. Check PHP

You can check PHP by executing any PHP file from /var/www.

If that executes, then you are done with your LAMP setup.

 

Step 2: SetUp Yii Framework 

1. You need to download latest version of Yii Framework

2. Unzip that & rename the extracted folder as yii_framework & place that inside /var/www directory

3. Finally your Yii Framework should be at /var/www/yii_framework

 

Step 3: Building First Test Application

1. First of all change permissions of your www directory

2. Run this command inside /var/www directory to create your test application.

php yii_framework/framework/yiic.php webapp testapp

3. The above command will make Yii application named testapp inside /var/www

4. Test the above application from your Web Browser by navigating to

http://hostname/testapp/index.php

 

>Hope it helps !

Varun Sharma
[email protected]

http://oodlestechnologies.com/

About Author

Author Image
Varun Sharma

Varun is an experienced Groovy and Grails developer and has worked extensively on designing and developing applications with FaceBook , Linkedin and Twitter integrations using Grails technologies. Varun loves painting and photography.

Request for Proposal

Name is required

Comment is required

Sending message..