Subject: Re: YA php, apache, perl, mysql & CS1.2 thread
From: Darron Froese (darron@fudgehead.com)
Date: Wed Jun 14 2000 - 19:01:37 MDT
on 6/14/00 3:57 PM, Henrik Gudat (F.E.Systems) at emutech@magnet.ch wrote:
> I've been trying to set up a ydl system with the usual suspects -
> apache, php, mysql, perl. Unfortunately, the standard installation
> didn't do the trick for me. HTML pages with PHP tags reveal nothing
> that would make one believe PHP was there. All the rpms got
> installed, though.
>
> So I browsed the yellow-dog-general list archive where some suggested
> reinstalling the packages by compiling the sources. I grabbed apache,
> apache-devel and php 4.0.0, changed the httpd.config and compiled php
> with the --mysql and --with-apxs options. Still no success and back
> to square 1.
>
> I don't know how widespread this problem is but maybe there's some
> documentation on how to get these components up and running together
> or some kind soul can provide me with the essential steps.
>
> Thanks a lot for your help.
Here how I have done it in the past.
1. Download each piece.
Apache: <http://www.apache.org/dist/apache_1.3.12.tar.gz>
MySQL: <http://www.mysql.com/Downloads/MySQL-3.22/mysql-3.22.32.tar.gz>
PHP:
<http://www.php.net/do_download.php?download_file=php-4.0.0.tar.gz&source_si
te=www.php.net>
mod_perl: <http://perl.apache.org/dist/mod_perl-1.24.tar.gz>
2. Untar them all.
tar -zxvf apache_1.3.12.tar.gz
tar -zxvf mysql-3.22.32.tar.gz
tar -zxvf php-4.0.0.tar.gz
tar -zxvf mod_perl-1.24.tar.gz
3. Install mysql
cd mysql-3.22.32
./configure \
--prefix=/usr/local/mysql-3.22.32 \
--with-libwrap \
--disable-large-files
make
make install
cd /usr/local/
ln -s mysql-3.22.32 mysql
/usr/local/mysql/scripts/mysql_install_db
/usr/local/mysql/bin/safe_mysqld &
4. Compile Apache
cd apache_1.3.12
./configure \
--prefix=/usr/local/apache_1.3.12 \
--enable-module=so \
--enable-module=headers \
--enable-module=rewrite \
--enable-module=mime_magic \
--enable-module=speling \
--enable-module=info \
--enable-module=expires
make
make install
cd /usr/local
ln -s apache_1.3.12 apache
pico /usr/local/apache/conf/httpd.conf <- Change whatever options you need.
/usr/local/apache/bin/apachectl start
5. Compile PHP
cd php-4.0.0
./configure \
--with-apxs=/usr/local/apache/bin/apxs \
--with-mysql=/usr/local/mysql
Additional configure flags are optional but you will need their respective
libraries installed, the above script will get you a php module that can
talk to mysql. My normal script is a little longer:
./configure \
--with-mysql=/usr/local/mysql-prod \
--with-pdflib \
--enable-ftp \
--with-ldap \
--with-imap=../imap-4.5 \
--with-zlib \
--with-jpeg-dir=/usr/lib \
--with-tiff-dir=/usr/lib \
--with-zlib-dir=/usr/lib \
--with-png-dir=/usr/lib \
--with-gd \
--with-ttf \
--with-xml \
--enable-trans-sid \
--enable-track-vars=yes \
--enable-magic-quotes=yes
make
make install
pico /usr/local/apache/conf/httpd.conf
Search for these lines:
# And for PHP 4.x, use:
#
#AddType application/x-httpd-php .php
#AddType application/x-httpd-php .php3
#AddType application/x-httpd-php-source .phps
Uncomment the AddType directives:
# And for PHP 4.x, use:
#
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php-source .phps
/usr/local/apache/bin/apachectl restart
6. Mod_Perl
cd mod_perl
perl Makefile.PL \
USE_APXS=1 \
WITH_APXS=/usr/local/apache/bin/apxs \
EVERYTHING=1
make
make test
make install
/usr/local/apache/bin/apachectl restart
7. Now create a docuent called info.php and put it in your web directory
(probably /home/httpd/html). Inside that document type:
<? phpinfo(); ?>
View that document in your web browser - you should see an automatically
generated page that has many php information on it.
Hope that helps at all.
-- Darron darron@fudgehead.com
This archive was generated by hypermail 2a24 : Wed Jun 14 2000 - 19:04:01 MDT