Install Zend Framework 1.8 on Ubuntu with Zend_Tool
17 June 2009 - 4:06pm

One of new features in ZendFramework 1.8 is "Zend_Tool".
Zend_Tool provides a command-line script that can be used to ease many common project related tasks like
- setting up the project tree
- add controllers
- add actions (and related view scripts)
- add model classes
- etc.
This instruction will guideline you to install Zend Framework 1.8 on Ubuntu with Zend_Tool.
FYI my environment are:
- Ubuntu 9.04 (Jaunty Jackalope)
- Apache 2.2
- download ZendFramework minimal at http://zendframework.com/download/latest
I use Zend Framework 1.8.3 that released on June 09, 2009. and keepfile at desktop - extract compress file to /usr/local/
pangpond@Julius:~$ sudo tar --directory=/usr/local/ -xzvf ./Desktop/ZendFramework-1.8.3-minimal.tar.gz - rename extracted folder to ZendFrameworkCli
pangpond@Julius:~$ sudo mv /usr/local/ZendFramework-1.8.3-minimal /usr/local/ZendFrameworkCli - open ~/.bashrc and uncomment following line
pangpond@Julius:~$ sudo vim ~/.bashrc
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi - open ~/.bash_aliases to add alias then close terminal and open a new terminal window to take effect.
pangpond@Julius:~$ sudo vim ~/.bash_aliases
alias zf='/usr/local/ZendFrameworkCli/bin/zf.sh' - now run zf command to check zf version
pangpond@Julius:~$ zf show version
Zend Framework Version: 1.8.3 - cd to your www root path and use zf create project projectname command to create project and tree (I create at store all project at ~/Sites)
pangpond@Julius:~$ cd ~/Sites/
pangpond@Julius:~/Sites$ zf create project zendframework - copy all Zend library to project library path
pangpond@Julius:~/Sites$ cp -R /usr/local/ZendFrameworkCli/library/Zend ~/Sites/zendframework/library/ - now I have to config virtualhost
pangpond@Julius:~/Sites$ sudo vim /etc/apache2/sites-enabled/000-default
ServerName zendframework
DocumentRoot /home/pangpond/Sites/zendframework/public
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /home/pangpond/Sites/zendframework/public/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory> - restart apache to take effect
pangpond@Julius:~/Sites$ sudo /etc/init.d/apache2 restart - edit /etc/hosts file
pangpond@Julius:~/Sites$ sudo vim /etc/hosts
127.0.0.1 zendframework
and then enter http://zendframework in browser. If everything ok you will see welcome screen like this.












Responses
18 June 2009 - 9:09am
Your post much appreciate!
Note: i am not bot ;P
8 July 2009 - 5:38pm
Hi,
I could do till step 5 successfully, but the output of step 6 is as below:
/usr/local/ZendFrameworkCli/bin/zf.sh: 44: php: not found
Pls help me!!
Regards,
Srinivas
10 July 2009 - 2:54am
It's depend on Step 3.
Actually I rename ZendFramework-1.8.3-minimal to ZendFrameworkCli
and keep that folder to /usr/local/
like
from : /usr/local/ZendFramework-1.8.3-minimal
to : /usr/local/ZendFrameworkCli
13 July 2009 - 4:13pm
Hi,
I did the same, changed to ZendFrameworkCli and the error message is also reflecting this in it.
Any other inputs pls... It's still not working and showing the same message.
Regards,
Srinivas
14 July 2009 - 1:37pm
Umm.. I think maybe coz your download file not work.
If not found bin/zf.sh in your download package.
try to download it again at http://www.zend.com/community/downloads
***choose Zend Framework 1.8 minimal from a list, It's not Zend Framework 1.8 full
29 August 2009 - 12:15pm
I've found the same problem, too. I tried to open /usr/local/ZendFrameworkCli/bin/zf.sh it and found this line
# find php: pear first, command -v second, straight up php lastly.
Correct it by do install php-pear first and make sure the file /usr/local/ZendFrameworkCli/bin/zf.sh was can execute.
เจอ error นี้ต้องลง php-pear ก่อนนะจ๊ะ
sudo aptitude install php-pear
29 August 2009 - 12:16pm
ใส่ alias zf='/usr/local/ZendFrameworkCli/bin/zf.sh' ลงไปใน .bashrc เลยก็ได้แถวๆ alias ด้านล่าง ง่ายดี
29 August 2009 - 12:24pm
zf create project ramique.comUSEFUL HELP Ramique.Com started !!!!!!