0
How to install zftool on windows and linux?
0
How to install zftool on windows and linux?
2
Since the topic is about zend why not for Linux as well?
For Linux (versions based on Debian):
Launch the terminal and navigate to your server’s root directory (in my case /var/www):
$ cd /var/www
$ git clone git://github.com/zendframework/ZendSkeletonApplication.git --recursive nomedoseuprojeto
To install git in the terminal (Debian-based systems):
$ sudo apt-get install git
//ou
$ sudo aptitude install git
Access the Skeleton directory/folder that we clone with git
$ cd nomedoseuprojeto
$ php composer.phar self-update
$ php composer.phar install
$ php composer.phar require zendframework/zftool:dev-master
Inside the vendor/bin directory we have the file zf.php. It is zftool. To execute:
$ /var/www/nomedoseuprojeto/vendor/bin/zf.php version
You can create a symbolic link to facilitate
$ sudo ln -s /var/www/nomedoseuprojeto/vendor/bin/zf.php /bin/zf
And to run just be in the folder of some zend project. Following this post would be:
$ cd /var/www/nomedoseuprojeto/
$ zf version
Something like:
Zftool - Zend Framework 2 command line Tool The application in this Folder is using Zend Framework 2.2.0dev
Type zf to list basic information.
1
My solution
Create a folder where zftool will be in my case c:\server\zftool
Download the zftool.phar
in http://packages.zendframework.com/zftool.phar
and put inside the folder above
Still inside the folder, create a file called zf2.bat
@echo off
php C: server zftool zftool.phar %*
Add folder path in windows path
Start Menu > Computer > Right Button > Properties > Advanced System Settings > Advanced Tab> Environment variables
In the Variable column look for 'Path' and click on edit and put at the end
;C:\server\zftool
Should your php.exe
is not in the path
will not work. In my case php.exe
is in
C:\server\Zend\ZendServer\bin
, just step 4 up would look like this
;C: server Zend Zendserver bin;C: server zftool
Restart the computer.
In the terminal type
C:>zf2 --version
The exit should be something like:
Zftool - Zend Framework 2 command line Tool
The application in this Folder is using Zend Framework 2.2.5
Browser other questions tagged linux windows zend framework command-line
You are not signed in. Login or sign up in order to post.
It is not a question. You should present the problem as question and answer. Write a question here and then add the answer below. You can add an answer to your question yourself.
– EMBarbosa
personally I found it unnecessary but...
– Bruno Rozendo
Are you in doubt in any part of the Zftool installation process or are you doing the process correctly and still going wrong? Because if you do not know anything about the subject the ideal is to look for a tutorial before
– Erlon Charles
@Erloncharles see the issue of the question. He had trouble installing and wanted to share the solution, but had done as a forum post.
– EMBarbosa