note 15489 deleted from ref.image by jimw
| From: | jimw@php.net | Date: | Thu, 27 Sep 2001 17:50:04 +0000 |
| Subject: | note 15489 deleted from ref.image by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-18376@lists.php.net to get a copy of this message | ||
I've been trying to build the apache web server with mysql, php, perl, and image support on a
Redhat 7 linux Server for a few days and thought it might be helpful to someone else to show them
what I had to do. I do a vi on all the Install docs because you should read them.
####### Create an empty directory with full access ##########
cd /usr
mkdir comp # use whatever directory you want
chown root.billg comp
chmod 777 comp
cd mods
################ Copy the required files to an empty directory. ##########
############# You should download the newest versions off the web #########
{copy the following source files to the /usr/comp directory
apache_1.3.20.tar.gz
freetype-2.0.4.tar.gz
ftjam-20010626.tar.gz
gd-1.8.4.tar.gz
jpegsrc.v6b.tar.gz
libpng-1.2.0.tar.gz
mod_perl-1.26.tar.gz
php-4.0.6.tar.gz
zlib-1.1.3.tar.gz
}
################# UnTar all the required Files #####################
tar -xzf apache_1.3.20.tar.gz
tar -xzf freetype-2.0.4.tar.gz
tar xzf ftjam-20010626.tar.gz
tar -xzf gd-1.8.4.tar.gz
tar -xzf jpegsrc.v6b.tar.gz
tar -xzf libpng-1.2.0.tar.gz
tar xzf mod_perl-1.26.tar.gz
tar -xzf php-4.0.6.tar.gz
tar xzf zlib-1.1.3.tar.gz
############ Build the zlib system #############
cd ../zlib-1.1.3
vi README
vi Makefile
./configure
make test
make install
############ Build the libpng system ##################
cd libpng-1.2.0
vi INSTALL {read the installation instructions}
cp scripts/makefile.linux makefile
vi configure {make any necessary changes}
./configure
make test
make
############# Configure the Jpeg-6b module ##################
cd ../jpeg-6b
vi install.doc {Read documentation}
./configure --enable-shared
make
make install
############# Configure the Jam C Compiler ##################
cd ../ftjam-20010626
make # this builds the jam0 file
cp jam0 /bin/jam # copied to bin so I can run from anywhere
############## Configure Freetype using Jam ##################
cd ../freetype-2.0.4
jam
################ Configure the GD Module ###################
cd ../gd-1.8.4
vi Makefile ### {several modifications are required in this file Ex below}
cp /usr/local/include/freetype2/freetype . -r
make
make install
######### You must do an initial configure of apache ######
######### for the PHP & PERL Builds #####################################
cd /usr/comp/apache_1.3.20
./configure --prefix=/usr/local/apache
########### Configure the Php Module ##################
cd ../php-4.0.6
./configure --with-mysql --with-apache=../apache_1.3.20 --enable-track-vars
--target=i386.redhat.linux --with-gettext --with-zlib --enable-ftp --enable-magic-quotes
--enable-discard-path --enable-debugger --enable-debug --with-filepro
--with-config-file-path=/usr/local/lib --with-gd --with-t1lib --with-png-dir=/usr/local/lib
make
make install
########### configure the Perl Module ##########################
cd ../mod_perl-1.26
perl Makefile.PL APACHE_SRC=../apache_1.3.20/src DO_HTTPD=1 PERL_MARK_WHERE=1 EVERYTHING=1
PREFIX=/usr/local/apache USE_APACI=1 APACI_ARGS="--enable-module=rewrite
--enable-module=auth-dbm"
make
make install
############ Configure the Apache Web Server ######################
cd ../apache_1.3.20
./configure --prefix=/usr/local/apache --activate-module=src/modules/perl/libperl.a
--activate-module=src/modules/php4/libphp4.a --enable-module=auth_dbm
make
make install
cd /usr/local/apache/bin
cp apachectl /etc/rc.d/init.d/httpd
/etc/rc.d/init.d/httpd stop # { This should already be stopped ###
/etc/rc.d/init.d/httpd start
##############################################################
# The following is the Makefile for GD that I modified. #
# All the changes I made are in this file. Modify your gd to look the way you want it#
########################################
#Depending on your system, you will need to modify this makefile.
#If you do not have gcc, change the setting for COMPILER, but you must
#use an ANSI standard C compiler (NOT the old SunOS 4.1.3 cc
#compiler; get gcc if you are still using it).
COMPILER=gcc
#If the ar command fails on your system, consult the ar manpage
#for your system.
AR=ar
#If you don't have FreeType, libjpeg and/or Xpm installed, including the
#header files, uncomment this (default). You really must install
#libpng and zlib to get anywhere if you wish to create PNG images.
#CFLAGS=-O -DHAVE_LIBPNG -DHAVE_LIBJPEG
#If you do have FreeType, libjpeg and/or Xpm fully installed, uncomment a
#variation of this and comment out the line above. See also LIBS below.
CFLAGS=-O -DHAVE_LIBXPM -DHAVE_LIBPNG -DHAVE_LIBJPEG \
-DHAVE_LIBFREETYPE # -DHAVE_LIBTTF
#To use the old FreeType 1.x library, add this additional #define
#to the line above
#-DHAVE_LIBTTF
#If you don't have FreeType Xpm fully installed, uncomment this
#(default).
#PLEASE NOTE: YOU MAY HAVE TO JUGGLE THE ORDER OF THE LIBRARIES.
#Some systems are very picky about link order. They don't all agree
#on the right order, either.
#LIBS=-lgd -lpng -lz -lm
#If you do have FreeType, JPEG and/or Xpm fully installed, uncomment a
#variation of this and comment out the line above. Note that
#Xpm requires X11. See also CFLAGS above.
LIBS=-lgd -lpng -lz -ljpeg -lfreetype -lm -lttf
#Note: for Freetype 1.x, use DHAVE_LIBTTF and -lttf instead.
#Typical install locations for freetype, zlib, xpm, libjpeg and libpng header
#files. If yours are somewhere else, change this. -I. is important to
#ensure that the version of gd you are installing is used, and not an
#older release in your directory tree somewhere.
INCLUDEDIRS=-I. -I/usr/include/freetype2 -I/usr/include/X11 -I/usr/X11R6/include/X11
-I/usr/local/include
#Typical install locations for freetype, zlib, xpm and libpng libraries.
#If yours are somewhere else, other than a standard location
#such as /lib or /usr/lib, then change this. Be sure to keep
#-L. as this allows the gd library itself to be found.
#Put -L. first so that old versions of the gd library elsewhere
#on your system can't cause conflicts while building a new one.
#This line shouldn't hurt if you don't actually have some of the
#optional libraries and directories.
LIBDIRS=-L. -L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib
#Location where libgd.a should be installed by "make install".
INSTALL_LIB=/usr/local/lib
#Location where .h files should be installed by "make install".
INSTALL_INCLUDE=/usr/local/include
#Location where useful non-test programs should be installed by "make install".
INSTALL_BIN=/usr/local/bin
#
#
# Changes should not be required below here.
#
#