Installing Zend Server CE on Ubuntu Server 10.04

Door Shadow op maandag 23 augustus 2010 13:06 - Reacties (4)
Categorie: -, Views: 12.228

Installing Zend-Server-CE on Ubuntu Server 10.04 proved to be a real pain in the ass. Somehow the MySQL server in the Ubuntu repository differs from the version required by Zend server, so after a default installation you will probably get the following error: "PHP MySQL library version xxx differs from your MySQL server". I looked the internet for solutions but found only people asking the same questing without finding a solution. So I figured a workaround myself, just install mysql-server from the older Ubuntu Server 9.10 (karmic) manually before installing zend-server-ce!

Use the following commands after a fresh install of Ubuntu Server 10.04:


code:
1
2
3
4
sudo aptitude install libdbi-perl libdbd-mysql-perl libreadline5
sudo aptitude install mysql-common

wget http://ftp.osuosl.org/pub/ubuntu/pool/universe/m/mysql-dfsg-5.0/mysql-server-5.0_5.1.30really5.0.83-0ubuntu3_i386.deb


Now mysql-server-5.0 is downloaded to your home directory
Also download the following files:

code:
1
2
3
wget http://ftp.osuosl.org/pub/ubuntu/pool/universe/m/mysql-dfsg-5.0/mysql-server-core-5.0_5.1.30really5.0.83-0ubuntu3_i386.deb
wget http://ftp.osuosl.org/pub/ubuntu/pool/universe/m/mysql-dfsg-5.0/mysql-client-5.0_5.1.30really5.0.83-0ubuntu3_i386.deb
wget http://ftp.osuosl.org/pub/ubuntu/pool/universe/m/mysql-dfsg-5.0/libmysqlclient15off_5.1.30really5.0.83-0ubuntu3_i386.deb


Install these files in the following order:

code:
1
2
3
4
sudo dpkg -i libmysqlclient15off_5.1.30really5.0.83-0ubuntu3_i386.deb
sudo dpkg -i mysql-client-5.0_5.1.30really5.0.83-0ubuntu3_i386.deb
sudo dpkg -i mysql-server-core-5.0_5.1.30really5.0.83-0ubuntu3_i386.deb
sudo dpkg -i mysql-server-5.0_5.1.30really5.0.83-0ubuntu3_i386.deb



Now the zend-server might be installed (just follow the default procedure from now). Add the Zend repository to by editing the following file:

code:
1
sudo vim /etc/apt/sources.list


Add to the end of this file:

code:
1
deb http://repos.zend.com/zend-server/deb server non-free


Save the file and exit the editor. Now install Zend Server:

code:
1
2
3
wget http://repos.zend.com/deb/zend.key -O- | sudo apt-key add -
sudo aptitude update
sudo aptitude install zend-server-ce-php-5.3




Add the <install_path>/bin directory to the $PATH environment variable for all users.

code:
1
sudo vim /etc/profile


Add to end of file:

code:
1
2
PATH=$PATH:/usr/local/zend/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/zend/lib


In order for the changes to take effect, run the following command:

code:
1
source /etc/profile



I also installed the zend-framework extras and phpMyAdmin:

code:
1
2
sudo aptitude install zend-server-framework-extras
sudo aptitude install phpmyadmin-zend-server


(configure for lighthttp (the zend server GUI webserver), enter your mysql administrator password and create a new random password for phpmyadmin mysql user when asked)

By default phpMyAdmin will be only accesible from the localhost, to allow access from another machine (ex. in your home-network) edit the following part of the lighttpd configuration:

code:
1
2
3
4
5
6
7
8
9
10
11
12
sudo vim /usr/local/zend/gui/lighttpd/etc/lighttpd.conf

=====
...
$HTTP["remoteip"] !~ "127.0.0.1" {
$HTTP["url"] =~ "^/phpmyadmin/" {
url.access-deny = ( "192.168.1" )
server.errorfile-prefix = "//usr/local/zend/gui/lighttpd/share/lighttpd-custom-errors/errorcode-"
}
}
...
=====


Restart all Zend Server Community Edition daemons:

code:
1
sudo /usr/local/zend/bin/zendctl.sh restart




Now you might access the zend server GUI at port 10081 of the server (so for example http://192.168.1.70:10081).
Accept licence agreement and enter a password for access to the zend server GUI.
There is a link to phpmyadmin in the server GUI.
Enjoy!

Reacties


Door Tweakers user i-chat, maandag 23 augustus 2010 13:51

sounds like a *#$# poor way of fixing stuff. - anyhow, did you look for a bugg tracker for zend, cuz these kinds of shizzle, should be avoided. i would difinetly stay away from zend untill they fix this

note: 10.4 is an LTS meaning for production, therefore these kinds of hacks should be avoided at all time..

[Reactie gewijzigd op maandag 23 augustus 2010 13:52]


Door Tweakers user Shadow, maandag 23 augustus 2010 14:09

I understand it is a really poor way of fixing things. I found a bug report about this issue from a couple of months ago, so it does not look like they will fix this issue in this release of Zend Server. By the way, Zend Server CE 5 does run (out-of-the-box) fine on Ubuntu Server 9.10 (that is why I used the Mysql-Server from that) but if you are determined to run Zend Server on Ubuntu Server 10.04 this is the way to go.

Door Tweakers user cosmo_roel, maandag 23 augustus 2010 15:19

Although this may be a poor way of fixing things, I don't think Zend is really to blame. This Zend product just requires a certain version of a library. You, the one installing, have to make sure that requirement is met beforehand. The install method for this particular dependency, is the subject of "a poor way of fixing things". Or am I overlooking something?

Door Tweakers user i-chat, maandag 23 augustus 2010 17:10

cosmo_roel, - even thought that may sound like a good reason in theory, in real life it is not,
as in, you dont want to install one package from here and another one from there, and the 3rd one from, where ever it is you pulled it from...

also mind you that ubuntu LTS should be considered the stable branch, thus the Version your production servers run on. even when 9.04 (a year after) got released most servers ran still ubuntu 8.04 and even so with the release of 9.10...

yet now we've been with the release of 10.4 (being the next LTS), for over 3 months now, it should have been evedent that Zend releases a patch for this. because untill they do, people are stuck using hardy.

Reageren is niet meer mogelijk