Let op: Tweakers stopt per 2023 met Tweakblogs. In dit artikel leggen we uit waarom we hiervoor hebben gekozen.

Installing Zend Server CE on Ubuntu Server 10.04

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

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!