For anyone getting started with Zend Framework 2 (or ZF2), the best way to get up and running quick is by installing the Zend Skeleton Application available on github. Here is the quick and easy way to get the skeleton application installed on Linux machine. You'll install the skeleton application first, and then we'll install ZF2.
1. Change directory to where you want to install ZF2 Skeleton Application.
cd /home/zf
2. Download the latest ZF2 Skeleton Application from github.
# wget -O skeleton.zip https://github.com/zendframework/ZendSkeletonApplication/archive/master.zip Resolving github.com... 207.97.227.239 ... Length: 289904 (283K) [application/zip] Saving to: “master”
3. Unzip, and rename the skeleton application.
# unzip skeleton.zip # mv ZendSkeletonApplication-master skeleton
4. Change directory to skeleton folder.
# cd skeleton
5. Install Zend Framework 2.
# php composer.phar self-update # php composer.phar install
The composer.phar install statement above installs ZF2 in the vendor/zendframework/zendframework folder.
If you're getting the following error, you may wish to install directly via GIT as shown below.
[Composer\Downloader\TransportException]
The "https://api.github.com/repos/zendframework/zf2/zipball/release-2.1.999
" file could not be downloaded: failed to open stream: HTTP request failed!
# yum install git # git clone git://github.com/zendframework/ZendSkeletonApplication.git --recursive