30.07.2012 Views

Reference Guide

Reference Guide

Reference Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Install the following packages:<br />

Zend Server <strong>Reference</strong> Manual<br />

Users of distributions with package managers (mainly Debian, Ubuntu, RHEL, CentOS and Fedora Core<br />

and many others) should install the following packages from their distribution's repository: gcc, make,<br />

autoconf, automake and libtool. Some of these tools depend on each other, for instance the libtool<br />

package depends on the gcc package, but no damage can be done from specifying all of them.<br />

Note:<br />

Users who utilize distributions that do not have package managers (Linux from scratch anyone?), can<br />

compile these tools themselves or obtain pre-compiled binaries for them quite easily.<br />

Additionally, you can compile a PHP extension from the main PHP source (as opposed to PECL). This<br />

requires installing a package from the Zend Server repository called php-5.2-source-zend-server or php-<br />

5.3-source-zend-server, depending on your Zend Server's major PHP version. This package includes full<br />

PHP sources as patched, for security or optimization concerns, by the Zend development team. This<br />

ensures that you are using the exact same source code we used when building Zend Server.<br />

Scenario 1: compile a PECL extension called Newt<br />

Newt is a PHP extension for RedHat's Newt (New Terminal) library, a terminal-based window and widget<br />

library for writing applications with user friendly interfaces.<br />

Being what it is, this extension requires the existence of the Newt library development files. If you are<br />

using Debian or Ubuntu you should install a package called libnewt-dev. On RedHat based distributions<br />

the package name is newt-devel. Make sure these are installed before continuing.<br />

NOTE: Other extensions will have other dependencies. For example, the Mcrypt extension will require the<br />

Mcrypt development package.<br />

NOTE: Since PECL will attempt to write the extension onto /usr/local/zend/lib/php_extensions, you will<br />

have to become a super user to perform this procedure. This is only needed for the actual make install.<br />

To compile your own extension:<br />

1. Assuming you have the Newt development package installed, run:<br />

# /usr/local/zend/bin/pecl install newt<br />

The truncated output of this command, along with explanations:<br />

PECL retrieves the package from the repository...*/ downloading newt-1.2.1.tgz<br />

Starting to download newt-1.2.1.tgz (24,853 bytes)<br />

.........done: 24,853 bytes<br />

5 source files, building<br />

/*The phpize script is executed...*/<br />

209

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!