The last major release of Zend Framework, which happened in 2007, was version 1.0; during the last five years, Zend Framework has undergone a lot of changes to be a successful PHP-based framework. But by merely updatingthe framework, Zend Framework has retained some of the issues that were inherently present in Zend Framework 1.0.
Zend Framework 2.0 is an attempt to make Zend Framework better by rearchitecting the framework right from the core. Some of the key features of Zend Framework 2.0 over its previous version are listed as follows:
◆ PHP 5.3 features such as namespaces and closures
◆ A modular application architecture
◆ Event manager
◆ Dependency Injection (DI)
We will get to know about implementing the new features of Zend Framework 2.0 in the coming chapters.
In this chapter we will cover the installation and configuration of some of the prerequisites of Zend Framework 2.0. ZF2 can be installed on most PHP-enabled web servers that support PHP 5.3.3 or later.
We have used Zend Server Community Edition as our default web server; however, any other PHP stack that supports PHP 5.3.3 can be used. Alternatively, you can also download Apache and PHP separately and install PHP over Apache.
Introduction to Zend Server Community Edition (CE)
Zend Server Community Edition is the free version of the popular Zend Server stack. The Zend Server stack provides a pre-integrated PHP application stack that could be used across development, testing, and production. This enables application development teams to have a consistent environment across all stages of development.
Zend Server CE also provides features such as Zend Optimizer+ for PHP bytecode caching and Zend Guard for encoding files.
Zend Server CE – system requirements
Zend Server offers installers for Windows, Mac OS X, and a universal installation package compatible with most Linux distributions.
More details on the installation requirements can be found at http://www.zend.com/en/ products/server/system-requirements.
Our next step will be to download and install Zend Server CE; I am running Ubuntu 12.04
Precise Pangolin. The installation procedure for other operating systems could be different;
you can always refer to the Zend Server website for installation instructions. The following
are the steps to install the Zend Server CE:
1. Visit the Zend Server Community Edition website (http://www.zend.com/en/ community/zend-server-ce) and download the latest version of Zend Server that is applicable to your operating system. In thiscase, we will be downloading the Linux installer.
2. Once the installer is downloaded, extract the contents of the installer to a temporary location:
$ tar -zxvf ZendServer-5.6.0-RepositoryInstaller-linux.tar.gz
3. After extracting, the installer needs to be started with administrator privileges:
$ cd ZendServer-RepositoryInstaller-linux/
$ sudo ./install_zs.sh 5.3 ce
4. During the installation, the installer will request you to download various packages:
5. Zend Server will be installed into /usr/local/zend by default; the default document root will point to /var/www. You can use the following files to make configuration changes to the Zend Server instance:
6. Once the installation is completed, you should be able to open http://localhost on your web browser. This should take you to a test page like the one shown in the following screenshot:
2. Once the installer is downloaded, extract the contents of the installer to a temporary location:
$ tar -zxvf ZendServer-5.6.0-RepositoryInstaller-linux.tar.gz
3. After extracting, the installer needs to be started with administrator privileges:
$ cd ZendServer-RepositoryInstaller-linux/
$ sudo ./install_zs.sh 5.3 ce
4. During the installation, the installer will request you to download various packages:
5. Zend Server will be installed into /usr/local/zend by default; the default document root will point to /var/www. You can use the following files to make configuration changes to the Zend Server instance:
- Apache master configuration is available in /etc/apache2/apache2.conf
- PHP configuration is controlled by /var/local/zend/etc/php.ini
What just happened?
We will be using Git to check out Zend Framework from Github; one of the major changes that happened to Zend Framework 2.0 is that the source control has changed from SVN to Git.
Your next task will be to install Git. We will be making use of Git when we are setting up our Zend Framework project.
Không có nhận xét nào:
Đăng nhận xét