简体   繁体   中英

Install Zend Framework 2 with console

EDIT: It exists now: ZFTool

I am trying to install Zend Framework 2 on my ubuntu system. I have installed ZF1.11.11 with apt-get install zend-framework , but I would like to install the latest Zend Framework , ZF2 .

I am a newbie in both ZF and Ubuntu. So, was really easy for me to manage a little project with lines like:

zf create project
zf create model
zf create action
zf enable layout

So, if I install zend with some tools like composer , pyrus or even just extract Zend into Skeleton Project , the project should work, but I would really miss the console. Makes my life much easier.

Is there a way? Could someone give me some console commands having zf ?

The most common way to install the framework via commandline is using GIT and Composer. Check out this part of the official Documentation for installation guidelines.

And as mentioned by Jani, a CLI as in ZF1 is yet to be created. It will come sooner or later, but for now there is none.

manual installation:

1) Download Zip file .from site ( http://framework.zend.com/downloads/latest ) 2) extracted it in /var/www/ directory 3) set the suitable permission to the directory

$ sudo chmod -R 0755  /var/www/ZendFramework-1.11.12/

4) 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

5) enable the Library path to the php.ini.

include_path = ".:/usr/share/php :/var/www/ZendFramework-1.11.12/library"

6) Restart the apache

7) $ zf create project /var/www/example

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM