Installing Zend Server 6.1 using Nginx and PHP 5.4.

Zend recently updated Zend Server and added the ability to use Nginx as the web server. I thought I would give it a go. I have installed Zend Server 6.1 on a fresh new install of Cent OS 6.4 (I used the minimal install ISO weighing at around 300 meg).

The following are the steps required to install.

Firstly we need to create the Nginx repository file as we re going to use yum to install everything:

touch /etc/yum.repos.d/nginx.repo

Next we need to add the repo details to use. Firstly open the file in vi:

vi /etc/yum.repos.d/nginx.repo

Then add the repo details (press “i” before typing, 😡 to close and save the file)

[nginx]
 name=nginx repo
 baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
 gpgcheck=0
 enabled=1

We now need to do the same for Zend Server:

touch /etc/yum.repos.d/zend.repo

Open the file:

vi /etc/yum.repos.d/zend.repo

Enter the repo details (remembering to press “i” before typing, 😡 to close and save the file):

[Zend]
 name=zend-server
 baseurl=http://repos.zend.com/zend-server/6.1/rpm/$basearch
 enabled=1
 gpgcheck=1
 gpgkey=http://repos.zend.com/zend.key
[Zend_noarch]
 name=zend-server - noarch
 baseurl=http://repos.zend.com/zend-server/6.1/rpm/noarch
 enabled=1
 gpgcheck=1
 gpgkey=http://repos.zend.com/zend.key

Now we simply need to download everything. For this I am choosing to use PHP 5.4 (my choices are 5.4 and 5.3, replace 5.4 with 5.3 in the next command if you are chosing PHP 5.3):

yum install zend-server-nginx-php-5.4

You maybe prompted to allow a key to be used. This is ok we are using the official repos for the packages so select y if prompted.

After some time (depending on your connection speed) Zend Server 6.1, PHP 5.4 and Nginx will be installed and we can reach the GUI. You maybe wondering when we installed Nginx. When we asked yum to install Zend Server it saw that it was dependant upon Nginx being installed first so added this to the download list (and used the Nginx repo from above to install it).

Now I am only using this locally behind a router etc so decided that I would disable iptables. I strongly recommend you do not do this for public servers. To disable iptables simply run the following command:

/etc/init.d/iptables stop

We can now access both the Nginx web server and the Zend Studio control panel which is located at http://your-ip:80081

Now we shall finish the installation. Firstly accept the licence and click next. The choose the profile you are using. As this is a development machine for me I am going to choose the development option. Needless to say you should choose the option that is right for your situation. Again click on next.

On this next page it is going to ask you for a password 4 time. 2 for the admin and 2 for the developer. If you intend to use the free licence, the developer password really is not going to be of much use but I would set something you will know anyway. The developer user is disabled for the free licence. Click next after entering the password.

On the next page click next. Read the summary and click submit.

After a few moments you will enter the web interface for the Zend Server application. Be sure to browse about and become comfortable with it. Be warned tho the initial licence is a trial licence and after 7 days you will need to enter a new licence. As mentioned there is a free licence which will disable some functionality (but still useful). For a breakdown of what each licence includes be sure to check our the Zend Server editions page which has more info.

One last note. The first time entering the web interface you will not be prompted for a login. After this you will need to use a login. The login is:

Username: admin
Password: As entered

Enjoy and happy programming.

Updating Zend Server 6.01 (PHP 5.4.11) to 6.10 (PHP 5.4.16)

Not too long ago I installed Zend Server which is a great tool that can help you manage and debug your PHP applications. It can also help make sure that your development environment is the same as your live environment so that surprises are less common for you.

Recently Zend updated Zend Server to 6.10 however there are no good instructions on how to update the product. After a bit of browsing I could see some questions about how to do this but little in the way of answers (it did only update a few days ago).

Anyway when you install Zend Server on Linux it sets up a new yum repository to use to install and keep the package updated however when trying to update nothing actually updated.

Upon checking the repository file at “/etc/yum.repos.d/zend.repo” I found that this contained the following:

[Zend]
 name=Zend Server
 baseurl=http://repos.zend.com/zend-server/6.0/rpm/$basearch
 enabled=1
 gpgcheck=1
 gpgkey=http://repos.zend.com/zend.key
[Zend_noarch]
 name=Zend Server - noarch
 baseurl=http://repos.zend.com/zend-server/6.0/rpm/noarch
 enabled=1
 gpgcheck=1
 gpgkey=http://repos.zend.com/zend.key

As you can see the file specifically references the repository for 6.0. To try to fix this I changed the file to have:

[Zend]
 name=Zend Server
 baseurl=http://repos.zend.com/zend-server/6.1/rpm/$basearch
 enabled=1
 gpgcheck=1
 gpgkey=http://repos.zend.com/zend.key
[Zend_noarch]
 name=Zend Server - noarch
 baseurl=http://repos.zend.com/zend-server/6.1/rpm/noarch
 enabled=1
 gpgcheck=1
 gpgkey=http://repos.zend.com/zend.key

Once I had done this I then carried out the following 2 commands:

yum clean all
yum update

This now prompted me if I wanted to update many components. Low and behold Zend Server now reports:

PHP Version 5.4.16Zend Server Version: 6.1.0

Zend Framework: 1.12.3, 2.2.1
Zend Server Gateway: 0.9.0
Build: 71826

Fingers crossed. All appears fine.

One thing that is a bit disappointing however is that now we have no ETA on Zend Server with PHP 5.5 support. I was looking forward to utilising some of the PHP 5.5 features on the product I am making.