Download the latest version of Zend framework from
http://framework.zend.com/download/latest
At the time of writing it was 1.10.2 available at Zend 1.10.2
$ pwd
/tmp
$ wget http://framework.zend.com/releases/ZendFramework-1.10.2/ZendFramework-1.10.2.tar.gz
$ mkdir /opt/zendframework
$ tar -C /opt/zendframework -zxvf ZendFramework-1.10.2.tar.gz
$ cd /opt/zendframework
Create a symbolic link to the downloaded zend framework release in order to help ease maintaining different releases
$ ln -s ZendFramework-1.10.2.tar.gz currentzend
Edit php.ini to include the path to the symbolic link created for zend release
$ vi /etc/php5/apache2/php.ini
; UNIX: “/path1:/path2”
include_path = “.:/opt/zendframework/currentzend”
In order to do command line execution in zend, we need to set up the PHP CLI by again editing php.ini for the cli
$ vi /etc/php5/cli/php.ini
; UNIX: “/path1:/path2”
include_path = “.:/opt/zendframework/currentzend”
For all users, set the path to Zend’s bin directory
$ vi ~/.bashrc
and add the line
PATH=$PATH:/opt/zendframework/currentzend/bin
Restart apache for the changes to take effect
$ /etc/init.d/apache2 restart
To check if the changes take place as expected, type
$ zf.sh show version
and you should get
Zend Framework Version 1.10.2
Now, we move into setting up Zend framework
$ cd /var/www
$ zf.sh create project myzend
This will set up the MVC zend structure. Copy the Zend folder into your new project “myzend”
$ cp -r /opt/zendframework/currentzend/library/Zend /var/www/myzend/library/Zend
Now go to your project to test if the installation was successful by typing
http://localhost/myzend/public/
This should open up the welcome page to zend framework.