LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-23-2003, 12:53 AM   #1
drews
LQ Newbie
 
Registered: Dec 2003
Posts: 9

Rep: Reputation: 0
Installing Apache 2, PHP 4.3.4 and MySQL 4.0.17


I need help installing Apache 2.0.48, PHP 4.3.4 and MySQL 4.0.17. I also have the latest version of ModPerl, but if no one can help me with that, it's ok.

So basically I need someone to give me a short introduction for this. I have seached here, and everything I found is for Apache 1.* or PHP 4.2.* or MySQL 3.* and I know the install is different.

If someone could help out this total newb, or give a link to a really good, really detailed tutorial it would be great!

Thanks~
 
Old 12-23-2003, 01:01 AM   #2
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Are you installing from source? I've built an Apache 2.0.48/PHP-4.3.4/MySQL 4.0.16 box from source running on RedHat 9.

It's really easy and the build process is well documented.

Peace...
 
Old 12-23-2003, 10:14 AM   #3
drews
LQ Newbie
 
Registered: Dec 2003
Posts: 9

Original Poster
Rep: Reputation: 0
Yeah, I have all the source tar.gz... I have un tarred them, but Im not sure what to install first and how to configure it, etc...

Thanks
 
Old 12-23-2003, 10:36 AM   #4
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Ok, it's really easy to get this up and running.

First, Install Apache:

http://httpd.apache.org/docs-2.0/install.html

Then, install MySQL:
http://www.mysql.com/documentation/m...talling_source

Then, install PHP:
http://www.php.net/manual/en/install.apache2.php

In a nutshell, this is what I did:

1) Install Apache. When I configured 2.0.48, I configured it like this:

$ ./configure --enable-mods-shared=all --prefix=/usr/local/apache-2.0.48 --with-mpm=worker
$ make
$ su
# make install
# ln -s /usr/local/apache-2.0.48 /usr/local/apache

You can learn about the MPMs at the Apache link above.

2) Install MySQL. I basically followed the "quick install" procedure:
http://www.mysql.com/documentation/m...#Quick_install

I installed MySQL in /usr/local/mysql.

However, you should read the "Installation from source" link I posted above.

3) Install PHP. I basically followed the Apache 2.0 instructions linked to above, but I used this configure command:

$ ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql

Then I updated the Apache 2.0 httpd.conf file, per the PHP instructions, and everything "just worked".

The above doc should be sufficient to get you started. Additionally, EACH of the tarballs you downloaded should have README and INSTALL files you should read for last minute updates or other pertinent info.

Good luck!

Peace...
 
Old 12-23-2003, 01:26 PM   #5
drews
LQ Newbie
 
Registered: Dec 2003
Posts: 9

Original Poster
Rep: Reputation: 0
When I tried to start Apache after I installed it I get the following message:

/usr/sbin/apachectl: line 71: /usr/sbin/httpd: No such file or directory
/usr/sbin/apachectl start: httpd could not be started

Everything made and installed fine....

Also before I even tried to start installing PHP, when I tried to make MySQL I get:

make: *** No targets specified and no makefile found. Stop.


What should I do?
 
Old 12-23-2003, 04:19 PM   #6
poison
Member
 
Registered: Dec 2003
Location: Layer 7 =D
Distribution: Slackware, LFS, Rock Linux
Posts: 165

Rep: Reputation: 30
hi ^^
first of all: use apache 1.3.29...
the 2.* series isn't yet mature enough, and php only has _experimental_ support for the apache 2 series...
you can use the slackware packages for apache (http://www.slackware.com/pb/search.p...&string=apache) and MySQL (http://www.slackware.com/pb/search.p...t&string=mysql), since they are perfect...
for PHP: you have to compile it yourself to get a 'usable' version...
tell me if you need further assistence with that....the first compile is somehow...well....
for Perl: You don't actually need mod perl, the slack Perl package is sufficient, you need to configure apache so it handles Perl scripts the right way.
look up the manual on the AddHandler and Action directives...

regards

update:
-------------------------
here's a hint for compiling php. it's ment to be a hint, and it's optimized for my needs, with almost every funtionality available enabled.
here is the list of libs that I download and compile from source. you will most likely have most of them installed already, but I advice you to compile them from source since I noticed some problems with basic packages like bzip2 if you don't.

libiconv-1.9.1
gettext-0.12.1
recode-3.6
zlib-1.1.4
bzip2-1.0.2
curl-7.10.8
gmp-4.1.2
expat-1.95.7
libxml2-2.6.3
libxslt-1.1.1
Sablot-1.0
freetype-1.3.1
freetype-2.1.5
t1lib-5.0.0
libpng-1.0.15
libpng-1.2.5
jpegsrc.v6b
tiff-v3.5.7
gd-2.0.15
aspell-0.50.4
libmcrypt-2.5.7
libmcrypt-mars-0.9
libmcrypt-rc6-0.9
libmcrypt-skipjack-0.9
mhash-0.8.18
mcrypt-2.6.4
ming-0.2a
unixODBC-2.2.6
libiodbc-3.51.1

please notice that the order in which you compile the packages is somehow relevant, and you may wan't to follow the order in which they are listed.
also do a ./configure --help for each lib (if it's got a autoconf build system) ans see if there is a option to specify the location for libiconv, if yes __you must point to the prefix that you installed libiconv to__.
here's the configure line I use (not for the production envoironment ^^):
Code:
./configure 
 --with-apxs=/usr/sbin/apxs
 --with-config-file-path=/etc
 --enable-zend-multibyte
 --enable-shmop
 --enable-dio
 --enable-sockets
 --enable-ftp
 --enable-bcmath
 --enable-calendar
 --enable-wddx
 --with-gmp
 --enable-mbstring
 --with-openssl
 --with-curl=/usr/local
 --with-gettext=/usr/local
 --with-iconv=/usr/local
 --with-iconv-dir=/usr/local
 --with-recode=/usr/local
 --with-zlib=/usr/local 
 --with-zlib-dir=/usr/lib
 --with-bz2=/usr/local
 --with-gd
 --with-png-dir=/usr/local
 --with-jpeg-dir=/usr/local
 --with-tiff-dir=/usr/local
 --with-xpm-dir=/usr/local
 --enable-exif
 --enable-gd-native-ttf
 --with-freetype-dir=/usr/local
 --with-ttf=/usr/local
 --with-t1lib=/usr/local
 --with-mysql=/usr/local/mysql
 --with-mysql-sock=/tmp/mysql.sock
 --with-iodbc=/usr/local
 --with-unixODBC=/usr/local
 --enable-filepro
 --enable-dbase
 --enable-dbx
 --enable-dba
 --with-inifile
 --with-flatfile
 --with-dom=/usr/local
 --with-dom-xslt=/usr/local
 --with-dom-exslt=/usr/local
 --with-expat-dir=/usr/local
 --enable-xslt
 --with-xslt-sablot=/usr/local
 --with-ming=/usr/local
 --with-mcrypt=/usr/local
 --with-mhash=/usr/local
 --with-pspell=/usr/local
please remember that you may have to make some little changes to it ^^
hope it helps...

Last edited by poison; 12-23-2003 at 07:55 PM.
 
Old 12-23-2003, 05:00 PM   #7
badgerracing
LQ Newbie
 
Registered: Jun 2003
Posts: 6

Rep: Reputation: 0
The easiest way to get Apache 1.3.29, PHP 4.3.4 and MySQL installed is:

1. Install MySQL, which sounds like you already have.
2. Use Apachetoolbox to install the rest. This is really too easy to do, if you do not have a package which you want to install (php maybe) it will download and install it for you.

http://www.apachetoolbox.com/

John
 
Old 12-23-2003, 07:26 PM   #8
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally posted by drews
What should I do?
Well, if you decide to go the Apache 1.3.29 route as others have suggested, then use their info. If you want to stick with Apache 2.0.48 (I have no particular feelings on the matter as I've configured Apache 1.3.x servers on Linux in the past as well), then we can find out how and where you got Apache installed.

Peace...
 
Old 12-23-2003, 10:57 PM   #9
drews
LQ Newbie
 
Registered: Dec 2003
Posts: 9

Original Poster
Rep: Reputation: 0
I really would like to go the Apache 2.0.48 route... Its just that all the servers will someday be upgrading to that, and I might as well be prepared.

So.. I am still at the error messages above - any ideas? I don't have anything on this computer, should I just do a reinstall of Slackware except without MySQL, PHP and Apache?

That might be easiest, lol

Thanks for all the quick replies and help!
 
Old 12-23-2003, 11:28 PM   #10
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally posted by drews
I really would like to go the Apache 2.0.48 route... Its just that all the servers will someday be upgrading to that, and I might as well be prepared.

So.. I am still at the error messages above - any ideas? I don't have anything on this computer, should I just do a reinstall of Slackware except without MySQL, PHP and Apache?
Ok, how about this. Send me e-mail at: tomdkat@comcast.net and we can get this resolved offline. Then when you're up and running we can post the solution in this thread for archival purposes. Fair enough?

Peace...
 
Old 12-24-2003, 12:05 AM   #11
drews
LQ Newbie
 
Registered: Dec 2003
Posts: 9

Original Poster
Rep: Reputation: 0
Very cool

Will Do...
 
Old 02-15-2004, 12:57 PM   #12
LeniuNYC
LQ Newbie
 
Registered: Feb 2004
Location: new york
Posts: 27

Rep: Reputation: 15
i also got problems with installing php with MySQL 4.0.17 and apache2.0.48,
i mean, it intsalls alright, mysql and apache work without a problem, i even added the php conf to the httpd conf file, but when i try to turn apache on...

root@slack:/usr/local/apache2/bin# ./apachectl restart
Syntax error on line 1072 of /usr/local/apache2/conf/httpd.conf:
Invalid command 'AddModule', perhaps mis-spelled or defined by a module not included in the server configuration

the only way to make it work is to # this line:


AddModule mod_php4.c

and when i do, everything seems to be fine

(Apache/2.0.48 (Unix) PHP/4.3.4 Server at leniu.sytes.net Port 80)

but PHP just does not work, when i try to open any php file, it opens it as if it was a txt file... i reinstalled it 3 times already using different tutorials, but i either get stuck on the addmodule line, or loadmodule, which now seems to be working fine...



am i missing something, or is it just apache2's fault?
 
Old 02-15-2004, 07:52 PM   #13
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
How did you install PHP? From source or from pre-built binaries? Also, are you running PHP as an Apache DSO or otherwise?

I run PHP 4.3.4 as an Apache DSO and I load the module like this:

LoadModule php4_module modules/libphp4.so

Peace...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache not working after installing mysql and php alaateb Linux - Networking 6 04-22-2005 10:24 AM
Installing Apache, MySQL and PHP foo_mulan Linux - Newbie 1 07-16-2004 07:28 AM
Help Installing MySql, Apache and PHP for RedHat 8 rmedina Linux - Newbie 2 10-18-2003 06:36 PM
Installing Apache/MySQL/PHP triki Linux - Newbie 1 09-24-2003 04:16 PM
Installing Apache/MySQL/PHP triki Linux - Software 3 09-24-2003 02:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration