How to install Zend Framework in Ubuntu• Jul 7th, 2012
• Category: PHP, Zend
Zend Framework is one of the most powerful framework for PHP, it has lots of built in component and its very useful to develop large scale complex web application.
I will show how to install Zend Application Framework on Ubuntu. I hope you have already installed php, apache in you Ubuntu box.
- Download the latest version of Zend Framework from the zend site
- Save the Framework source on your www directory and extract it. I have extracted it in /var/www/ directory
3.Now set the suitable permission to the directory. So type in the following commands to Shell
#sudo chmod -R 0755 /var/www/ZendFramework-1.11.12/
4. Now enable the Zend framework tool or the zf tool. zf is a command line tool to create project and perform others operation for zend application. To enable the zf tool, we have to create a symlink to the tool. Copy and run the command to your shell
# ln -s /var/www/ZendFramework-1.11.1/bin/zf.sh /usr/bin/zf
This will create a symlink to /usr/bin/
5. Next we will enable the Library path to the php.ini. So to do that we will open the file in a vim editor. So for that we will again go to the terminal and type the following,As we are using Ubuntu so php.ini will be in “/etc/php5/apache2/”.
# sudo vim /etc/php5/apache2/php.ini
I am using vim editor here to edit the php.ini file, you can use whatever tool you like
There search for include_path. You will see an area that says,
;include_path = “.:/usr/share/php”;
include_path = “.:/usr/share/php :/var/www/ZendFramework-1.11.12/library”
Uncomment the include_path line and add your Zend Framework library path. Save the file and exit.
6. Restart the apache with bellow command in shell
#sudo /etc/init.d/apache2 restart
7. Now we are ready to create project. In the shell run the bellow command
#zf create project /var/www/zend_learn
This command will create a project in /var/www/ directory with a name zend_learn
8. Now open your browser and type http://localhost/zend_learn/public/
You should see the bellow output in the browser
You are ready to code in Zend Framework