Install Zend Framework 2 In Wamp Server on Windows
I’ve written one another article about installing zend framework 1.12 in wamp server on windows. But before some time zend has released its new version zend framework 2.1.1 that is not has the same installation process as its previous version. Although Zend Framwork 2 installation is much easy than version 1.12 but people don’t know that where to start. I’ll not take your too much time to explain it. Just move to following steps and get installed zend framework 2 on your windows system. For linux (Ubuntu) system, I’ll write another tutorial.
Step 1: Download Zend framework 2 Application Skeleton:
Actually Zend has released an application skeleton of zend framework and uploaded it to their Github repository. This application skeleton automatically installs Zend framework 2 on your computer by using composer tool. So first you need to download this application skeleton from github repository. Download it from the github link https://github.com/zendframework/ZendSkeletonApplication
Step 2: Extract It In Wamp/WWW And Rename It:
Extract the downloaded zip file of skeleton in your wamp/www directory and rename it according to you. In my case, it is “zendy”.
Step 3: Run Composer In Command Prompt:
If you don’t know about composer then I tell you what exact composer is? Composer is a PHP dependency management tool that enables you to declare any appropriate PHP library for your project and installs them in your project by command line. So before using composer, just check weather it is installed in your computer or not. Open command prompt and type “composer” and hit enter. If you’ve installed composer in your computer, you’ll see the following image otherwise you’ll get unrecognized command message.
If composer is not installed, you’ll see the following image:
Or if composer is properly installed in your computer:
If you don’t have composer installed in your computer, then first download it from http://getcomposer.org/download/ for your windows system and install it like other software. It is approximate of 550 KB.
After installation it will automatically creates the system environment variables in your computer so you can run the command “composer” from any directory in your command prompt. After installing the composer again type “composer” in cmd prompt and you’ll see the command prompt image shown above.
Step 4: Install Zend Framework 2 Using Composer:
Now reach at your extracted zend directory that you downloaded from github. In my case it is D:/wamp/www/zendy. May be different in your computer. After reaching this directory, run the following two commands one by one.
php composer.phar self-update
php composer.phar install
After running both the commands successfully, you’ll get the following image.
Step 5 : Run Your Zend Framework Project In Browser:
Congratulations, you’ve installed zend framework2 successfully in your wamp server. Restart your wamp server and open your browser and type http://localhost/zendy/public (in my case it is zendy and may be different according to you). You will get the Zend Framework Welcome page if your it has been installed successfully.
Step 6: Create Virtual Host:
If you want to run your zend framework project with appropriate local domain name, you have to make a virtual host for your project. I’ve told in my post http://blogaddition.com/2012/12/create-virtual-host-in-wamp/. You can read it.