Apache2 + GD + Zend

xiaoxiao2021-03-06  104

Related Environment: Apache2.0.5 php4.3.8 mysql4.0.20 GD2.0.12 Zendoptimizer-2 [1] .5.5

Apache2

# CD / USR / SRC

# TAR ZXVF /HOME/INSTALL/Httpd-2.x.x.tar.gz

# cd /usr/src/httpd-2.x.x

# make clean

# ./configure -prefix = / usr / local / httpd --enable-so -enable-reporte

# Make

# Make Indtall

Set up Apache boot

FreeType

# CD / USR / SRC

# TAR ZXVF /HOME/INSTALL /FREETYPE-2.1.4.tar.gz

# cd /usr/src/freetype-2.1.4

# mkdir / usr / local / freetype

# make clean

# ./configure --prefix = / usr / local / freetype

# Make

# make install

Zlib

# CD / USR / SRC

# TAR ZXVF /HOME/INSTALL/ZLIB 1.1.4.tar.gz

# cd /usr/src/zlib 1.1.4

# mkdir / usr / local / zlib

# make clean

# ./configure --prefix = / usr / local / zlib

# Make

# make install

I started to install it according to that document, but it was more smooth, but when I installed GD-2, I found that I didn't find this.

/us/local/freeetype/include/freeetype2/freeetype/freeetype.h

File, one check, discover / usr / local / freetype / whole directory empty.

I have newly inspected the installation process of FreeType.

The following information is prompted when running ./configure --prefix = / usr / local / freetype

FreeType Build System - Automatic System Detection

The Following Settings Are Used:

Platform UNIX

Compiler CC

Configuration Directory ./builds/unix

Configuration rules ./builds/unix/unix.mk

IF this does not correspond to your system or settings please remove the file

`config.mk 'from this Directory Then Read The Install File for Help.

Otherwise, Simply Type `make 'again to build the library,

OR `Make Refdoc 'to Build The API Reference (The Latter Needs Python).

Make: Nothing to be done for `UNIX '.

So, I add a step of command Make Refdoc, at Make, and finally in Make Install.

Last check / usr / local / freetype / There are many files below. (Nothing to install no problem)

In return to GD2 installation

After changing /usr/local/freeetype/include/freetype2/freetype/freetype.h,

Run Make or find the following errors.

From gdft.c: 59: /usr/local/freetype/include/freetype2/freetype/freetype.h: 19: 36: /usr/include/ft2build.h: no such file or directoryin file incroDed from / usr / local / FreeType / include / freetype2 / freetype / freetype.h: 20,

Make [2]: *** [gdft.lo] Error 1

Make [2]: Leaving Directory `/Home/hfei/gd-2.0.28 '

Make [1]: *** [all-recursive] error 1

Make [1]: Leaving Directory `/Home/hfei/gd-2.0.28 '

Make: *** [all] Error 2

What is this problem?

LibPNG

# CD / USR / SRC

# TAR ZXVF /HOME/INSTALL/LIBPNG-1.2.5.Tar.gz

# cd /usr/src/libpng-1.2.5

# mkdir / usr / local / libpng

# make clean

# CP scripts / makefile.linux makefile

Modify /usr/src/libpng-1.2.5/makefile file below the following three sentences

prefix = / usr / local / libpng

Zliblib = / usr / local / Zlib / LIB

Zlibinc = / usr / local / zlib / incrude

# Make

# make install

JPEG

# CD / USR / SRC

# TAR ZXVF /HOME/INSTALL/JPEGSRC.V6B.TAR.GZ

# CD / USR / SRC / JPEG-6B

# MKDIR / USR / local / JPEG

# make clean

# ./configure --prefix = / usr / local / jpeg

# Make

# mkdir / usr / local / jpeg / bin

# mkdir / usr / local / jpeg / incrude

# mkdir / usr / local / jpeg / lib

# MKDIR / USR / LOCAL / JPEG / MAN

# MKDIR / USR / LOCAL / JPEG / MAN / Man1

# make install

# make install-lib

# make install-headers

GD-2

# CD / USR / SRC

# TAR ZXVF /HOME/INSTALL/GD-2.0.15.tar.gz

# cd /usr/src/gd-2.0.15

# MKDIR / USR / LOCAL / GD

# make clean

# ./configure --prefix = / usr / local / gd --with-PNG = / usr / local / libpng /

--with-freetype = / usr / local / freetype --with-jpeg = / usr / local / jpert

Open /usr/local/freeetype/include/freeetype2/freetype/freeetype.h

Delete #ifndef ft_freeetype_h

#error "` ft2build.h 'hasn't been included yet! "

#Error "please always useful" to include the include freetype header files. "

#Error "EXAMPLE:"

#error "#include " # r "#include ft_freeetype_h"

#ENDIF

Add: #include

#include ft_freeetype_h

# Make

# make install

PHP

# CD / USR / SRC

# TAR ZXVF /HOME/INSTALL/PHP-4.3.2.tar.gz

# cd /usr/src/php-4.3.2

# MKDIR / USR / local / PHP

# make clean

#. / configure --prefix = / usr / local / php --with-apxs2 = / usr / local / apache2 / bin / apxs --with-xmlrpc --with-mysql = / usr / local / mysql --with -gd = / usr / local / gd --with-jpeg-dir = / usr / local / jpeg --with-png-dir = / usr / local / libpng --with-zlib-dir = / usr / local / Zlib --with-freetype-dir = / usr / local / freetype --disable-cgi --with-config-file-path = / usr / local / php --enable-track-vars --with-TSRM-PTH

# Make

# make install

Apache: /usr/local/apache2/conf/httpd.conf

LoadModule PHP4_Module Modules / Libphp4.so

AddType Application / X-httpd-php .php .phtml

AcceptpathInfo On (Para Las Librerias XCS DE XML-RPC)

Apache starts the prompt / usr / local / apache2 / modules directory no libphp4.so file, is it necessary?

Cp /usr/src/php-4.3.8/libs/libphp4.so / usr / local / apache2 / modules

Zend

Download Zendoptimizer-2 [1] .5.5-Linux-glibc21-i386.tar

#TAR ZXVF ZENDOPTIMizer-2 [1] .5.5-Linux-Glibc21-i386.tar

Enter the decompressed directory. PHP.INI-DIST in the PHP source code to compile the directory specified (PHP.INI's path is compiled ./config-file-path = / usr / local / pHP in ./Configure )

#Cp php.ini-dist / usr / local / php

#. / Install

Press the prompt operation, select the default installation path / etc / locate / zend. Requirements to enter the php.ini path (PHP.INI's path is specified in ./configure is specified as --With-config-file-path = / usr / local / PHP)

#service apachectl stop

#service apachectl start

#vi info.php

Enter the following:

PHPINFO ();

?>

Check if Zend is up.

Apache module

Apache is a modular server, and the core server species only contains the most commonly used modules, and the extension feature is provided by other modules. During the setting, you must specify the module you need to include. There is a module checkout in the document, where the state "BASE" module is bound to the core server by default, if you don't need to include a module (such as MOD_USERDIR), it must be explicitly disabled; other status modules (such as MOD_EXPIRES, must also be explicitly enabled to enable it into the core server. Apache has two ways of using modules, one is permanent to incorporate core; if the operating system supports dynamic sharing object (DSO), the module can also be dynamically compiled. The storage of the DSO module is independent and core, which can be used by the core using the runtime configuration instruction provided by the Mod_SO module. If there is any dynamic module in the compilation, the Mod_SO module will automatically contain the core. If you want the core to load DSO, not actually compiling any dynamic module, you need to specify -enable-so.

--enable-module [= shared]

Compile and contain module modules. Module is the module name that removes "_module" in the document. To compile a module into DSO, you need to add = shared options.

--Disable-module

Exclude the module Module that may be compiled and included.

--enable-modules = module-list

Compile and contain module-list separated by spaces.

--enable-mods-shared = module-list

Compile and contain module-lists separated by spaces into DSO.

--enable-modules and --enable-mods-shared module-list options are typically separated by spaces, such as compiling and containing enable mod_dav and mod_info,

./configure --enable-Dav --Nable-Info

Alternatively, write it equivalent:

./configure --enable-modules = "DAV INFO"

Alternatively, you can include "all" or "most" modules with keyword all or MOST, and then use -Disable-module to exclude the modules you don't need. For example, containing all modules DSO, exclude mod_info,

./configure --enable-mods-shared = all --disable-info

In addition to the standard module group, Apache 2.0 also provides a choice, which is multi-processing modules (MPMS). One must contain one MPM during the compilation process, and the MPM Documentation Page has the default MPM corresponding to various platforms, but can also be changed in the configure command line.

--with-mpm = name

Select MPM called Name.

转载请注明原文地址:https://www.9cbs.com/read-103897.html

New Post(0)