Tuesday, June 8, 2010

How to install Zend framework in Linux

Getting the framework

Zend Framework can be downloaded from http://framework.zend.com/download/latest in either .zip or .tar.gz format.

Extracting and Copying framework

  • Create a new directory in /usr/local/ called ZendFrameworkCli

  • Extract the downloaded archive file, ZendFramework-1.10.0-minimal.zip in your Downloadsdirectory by double clicking on it.

  • Copy to /usr/local/ZendFrameworkCli by opening Terminal and typing:

sudo cp -r ~/Downloads/ZendFramework-1.10.0-minimal /usr/local/ZendFrameworkCli

Steps to Follow:-

1. [root@www html]# whereis php

php: /usr/bin/php /etc/php.d /etc/php.ini /usr/lib/php /usr/include/php /usr/share/man/man1/php.1.gz

2. [root@www ~]# ln -s /usr/local/ZendFrameworkCli/bin/zf.sh /usr/local/bin/zf

3. [root@www ~]# php -i | grep include_path
include_path => .:/usr/share/pear:/usr/share/php => .:/usr/share/pear:/usr/share/php

4. vi /etc/php.ini (change like this!)

[root@www etc]# grep include_path /etc/php.ini
; (directory must also be in include_path or full path must
;include_path = “.:/php/includes”
include_path = “.:/usr/share/pear:/usr/share/php:
/usr/local/ZendFrameworkCli/library
;include_path = “.;c:\php\includes”

5. [root@www etc]# service httpd status
httpd (pid 4102) is running…
[root@www etc]# service httpd restart
Stopping httpd: [OK]
Starting httpd: [OK]
[root@www etc]# php -i | grep include_pathinclude_path => “.:/usr/share/pear:/usr/share/php:/usr/local/ZendFrameworkCli/ZendFramework-1.10.5-minimal/library => “.:/usr/share/pear:/usr/share/php:/usr/local/ZendFrameworkCli/ZendFramework-1.10.5-minimal/library

6.yum install php-xml

**Testing Zend_Tool whether you install correctly or not

You can test your installation of the Zend_Tool command line interface by opening a Terminal or Command

Prompt and typing:

! zf show version

If all has worked, you should see:

! Zend Framework Version: 1.10.0

No comments:

Post a Comment