Wednesday, January 12, 2011

Installing Zend_Tool or the zf command in the console

The prerequisite of this tutorial is that you will have to install the Zend Framework. If you have not done so please install it. This link "Installing PHP5, MySQL and Zend Framework 1.11.2 in Ubuntu" should help you do it.

After you have installed Zend Framework you can use Zend_Tool from your console to create project and other components of Zend.

In order to do this you will have to make an alias of the zend framework bin folder in the .bash_aliases file.

sudo gedit /home/aabhushan/.bash_aliases

Then, add the following and save it

alias zf='/usr/share/php5/zend/bin/zf.sh'

You will also have to make sure the following code in .bashrc is uncommented so that the alias file is being read.

if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi

You can use the following command to open the .bashrc file.

sudo gedit /home/aabhushan/.bashrc

If the above process worked out fine then your Zend_Tool should be working. You can test it by opening a new window of the console and running the zf command. The following command will give you the version of the Zend Framework that you are using

zf show version

No comments:

Post a Comment