Setting up Zend Server on Red Hat Enterprise Linux
Saturday, July 11, 2009
Zend Framework applications have certain prerequisites to run properly. Some of these are general, some are specific to the particular application. The general requirement is a web server that supports PHP version 5.2.x or later. The most commonly used web server is Apache, although there are others that may be used.
There are many ways of setting up and maintaining a suitable web server. One very convenient way has been released by Zend, in the form of their product Zend Server. This comes in two versions: a free, unsupported version (Zend Server Community Edition) and a commercially supported version.
Zend Server has one special advantage for Zend Framework applications: it will install an up-to-date version of the framework on the target system, and add it to the PHP include path, so that any PHP application running on the server will be able to make use of it automatically. Also it will update the framework as part of its general update facility.
This article will look at setting up Zend Server Community Edition (CE) on a server running Red Hat Enterprise Linux 5.3 or a compatible OS, such as CentOS 5.3. This is a common platform for running a web server.
The target machine should have the Apache web server installed, but should not have PHP support added. This is to avoid conflicts between the version of PHP shipped with the Linux distribution and that installed by Zend Server CE.
The following steps need to be performed as root.
Set up the Zend Server CE repository
This is done by creating a repository file with the following content:
[Zend] name=Zend CE $releasever - $basearch - Released Updates baseurl=http://repos.zend.com/rpm/ce/$basearch/ enabled=1 gpgcheck=0 [Zendce-noarch] name=Zend CE - noarch baseurl=http://repos.zend.com/rpm/ce/noarch enabled=1 gpgcheck=0
Call the file zend.repo and store it in the /etc/yum.repos.d directory.
This can also be done using a graphical utility as follows:
- Select Add/Remove Software from the Applications menu.
- Select the Edit – Repositories menu item.
- Add the two new repositories by pressing the Add button, then entering the details given above in the dialog that is brought up.
- Make the repositories active by checking the box next to them in the list.
- Exit the Repository Manager dialog by pressing the Close button.
The Zend Server CE packages should now be available for installation.
Set the SELinux System Setting to Permissive
If you are using SELinux on the server, set its system setting to permissive for the duration of the installation and set up.
This can be done from the terminal using the following command:
setenforce permissive
This can also be done using a graphical utility by selecting either Security Level and Firewall or SELinux Management from the System – Administration menu. In the former case, the setting can be set from the SELinux tab; in the latter, the setting can be set from the front page.
Install Zend Server CE from the repository
Run the following command from the terminal:
yum install zend-ceWhen the installation has completed, run the following command:
yum clean all
This can also be done using a graphical utility by select Add/Remove Software from the Applications menu. Go to the List tab in the main window, check the box next to the zend-ce package, and press the Apply button.
To keep the installation up to date, you should periodically run the following command:
yum update "*zend*"This can also be done using a graphical utility by selecting Software Updater from the Applications – System Tools menu. You will be presented with a list of the updates available for your system. Make sure all the updates which you wish to install are checked and then click on Apply Updates.
Set Zend Server CE to launch at start up
It is advisable to set the zend-server service to start automatically when the machine boots. Also, you should set the web server service (httpd) not to be started automatically by the system, as zend-server will do this itself.
This can be done from the terminal using the following commands:
chkconfig zend-server on chkconfig httpd off
This can also be done using a graphical utility by selecting Services from the System – Administration menu. You can then check zend-server on and httpd off in the Background Services list using the GUI.
Set the Administration (Web) Interface Password
Zend Server has a browser-based administration interface. This can be accessed via either of the following URLs:
The secure (https) URL should be preferred, unless port 443 is not open on your machine, in which case you will have to use the other (http) URL.
When you navigate to this URL on the target machine, you will be given the opportunity to set the Zend Server administrative password.


