Sei sulla pagina 1di 4

Code for Thought

 

I code flying cool stuff.

 
 
 
 
  ← Netbeans vs Eclipse as a PHP IDE – a brief review How to install

Yii Framework in Ubuntu/Linux – Quick start guide

About

 

Hi, I am Sum-Wai, an Information Technologist based in Malaysia. This is where I

share earth shattering programming tips, you

I am Sum-Wai, an Information Technologist based in Malaysia. This is where I share earth shattering
 

First download Yii from the Yii’s download page on the website. Recommended to choose a stable version to start with.

Uncompress the package somewhere comfy, lets just say your username is rajamal(I am using non English names for demo for a change!) and you’ve extracted it to the following example path

should subscribe to my blog now. Yes, dooo it.

Contact Me

should subscribe to my blog now. Yes, dooo it. Contact Me /home/rajamal/source/yii-1.1.5.r2654   Recent

/home/rajamal/source/yii-1.1.5.r2654

 

Recent Comments

rename the folder to just yii to make our life easier

   
 

mv yii-1.1.5.r2654 yii

 
 
 

sweet, our folder name is yii now, then we create a symlink in ~/bin directly so we can use yiic anywhere. Create a bin folder inside your home directory if it is not already created, and make sure the bin directory is added to $PATH.

Tags

 

mkdir /home/rajamal/bin

 
 
 
 
 
 

Make sure the “bin” directory is added to $PATH

 
 

yii

 
   

gedit ~/.profile

 

Categories

 

CMS

Database

 

Editor

Google

 

Add this to .profile

 

IDE

 

Java

   

if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH"

 

Linux

NLP

fi

PHP

Prototype

Generated by www.PDFonFly.com at 8/15/2011 4:40:27 AM

then inside of bin, create a symlink to yiic like this. (yiic help us do routine stuff like creating a new webapp or creating a new migration)

ln -s /home/rajamal/source/yii/framework/yiic yiic

open up a new terminal window, now you can just use

Scala

WordPress

Good to know

yiic webapp yourappname

to create a new web application! (UPDATE: added step to include ~/bin into $PATH variable)

This entry was posted in PHP and tagged yii. Bookmark the permalink.

6 Responses to Yii Framework in Ubuntu/Linux – Quick start guide

seal trip says: seal trip

Nice tutorial!

seal trip says: seal trip

Just moved over to linux / ubuntu (from windows)…And I followed your tutorial.

yiic webapp myAppname

I followed your tutorial. yiic webapp myAppname Did not work for me The response I got

Did not work for me The response I got was;

Command not found

Did you have to set any path variables?

not found Did you have to set any path variables? Reply Artis says: June 14, 2011

Artis says:

Try running the command:

source ~/.profile

It should come into effect after running it. If it does not work after a reboot or losing a bash session, add the command to ~/.bashrc file.

Hope this helps!

add the command to ~/.bashrc file. Hope this helps! Reply prettyscripts says: March 17, 2011 at

i’ve been typing the full path to do that… thanks for the tip. this is makes my life easier.

» PHP Yii framework tip on Ubuntu (and other) Linux’es henry says: June 26, 2011 at

henry says:

thank you

Leave a Reply

Your email address will not be published. Required fields are marked *

Name *

Name * Email * Website Comment

Email *

Name * Email * Website Comment

Website

Name * Email * Website Comment

Comment

55 66
55
66

You may use these HTML tags and attributes: <a href="" title=""> <abbr title="">

<acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

Post Comment

Fresh from my oven.