简体   繁体   English

使用控制台安装Zend Framework 2

[英]Install Zend Framework 2 with console

EDIT: It exists now: ZFTool 编辑:现在存在:ZFTool

I am trying to install Zend Framework 2 on my ubuntu system. 我正在尝试在我的ubuntu系统上安装Zend Framework 2 I have installed ZF1.11.11 with apt-get install zend-framework , but I would like to install the latest Zend Framework , ZF2 . 我已经使用apt-get install zend-framework安装了ZF1.11.11 ,但是我想安装最新的Zend Framework ZF2

I am a newbie in both ZF and Ubuntu. 我是ZF和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. 因此,如果我使用诸如composerpyrus之类的工具安装zend,甚至只是将Zend提取到Skeleton Project ,该项目就可以工作,但我真的会错过控制台。 Makes my life much easier. 使我的生活更加轻松。

Is there a way? 有办法吗? Could someone give me some console commands having zf ? 有人可以给我一些带有zf的控制台命令吗?

The most common way to install the framework via commandline is using GIT and Composer. 通过命令行安装框架的最常见方法是使用GIT和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. 就像Jani提到的那样,尚未创建ZF1中的CLI。 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 1)从站点( http://framework.zend.com/downloads/latest )下载Zip文件。2)将其解压缩到/ var / www /目录中。3)为目录设置适当的权限。

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

4) enable the Zend framework tool or the zf tool. 4)启用Zend框架工具或zf工具。 zf is a command line tool to create project and perform others operation for zend application. zf是用于创建项目并为zend应用程序执行其他操作的命令行工具。 To enable the zf tool, we have to create a symlink to the tool. 要启用zf工具,我们必须创建指向该工具的符号链接。 Copy and run the command to your shell 将命令复制并运行到您的shell

$ ln -s /var/www/ZendFramework-1.11.1/bin/zf.sh  /usr/bin/zf

5) enable the Library path to the php.ini. 5)启用库路径到php.ini。

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

6) Restart the apache 6)重新启动apache

7) $ zf create project /var/www/example 7)$ zf创建项目/var/www/example

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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