Click to See Complete Forum and Search --> : Apache on redhat 9


zebra_
03-09-2006, 06:55 AM
Hi,

I've just been trying to install the latest version of apache on redhat 9 but i'm having a bit of a problem:

First I downloaded the latest version, then extracted the file:

#tar zxvf http.2.2.......

the changed into the new folder and typed

#./configure

here's the problem, when i give the 'make' command i get the following error:

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


Any help would be great!

I've also heard that redhat 9 has apache and php pre-installed but after putting a test.php file in /var/www/html and going to localhost in the browser i only got an error message which suggests to me that it is in fact not installed.

Cheers.

Architect
03-09-2006, 09:25 AM
Are you sure the ./configure was successful?
And also did you try just make or make install?

zebra_
03-09-2006, 11:20 AM
Hi,

Ok what i've done is tried again with an earlier version of apache. this time the error on make is different but here is an exact screen dump of the process:


[root@NeilLinux tars]# cd apache_1.3.34
[root@NeilLinux apache_1.3.34]# ls
ABOUT_APACHE configure LICENSE NWGNUenvironment.inc README WARNING-WIN.TXT
cgi-bin htdocs logs NWGNUhead.inc README.configure
conf icons Makefile.tmpl NWGNUmakefile README-WIN.TXT
config.layout INSTALL NOTICE NWGNUtail.inc src
[root@NeilLinux apache_1.3.34]# ./configure
Configuring for Apache, Version 1.3.34
+ Warning: Configuring Apache with default settings.
+ This is probably not what you really want.
+ Please read the README.configure and INSTALL files
+ first or at least run './configure --help' for
+ a compact summary of available options.
+ using installation path layout: Apache (config.layout)
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
+ configured for Linux platform
Error: could not find any of these C compilers
anywhere in your PATH: gcc cc acc c89
Configure terminated34
[root@NeilLinux apache_1.3.34]# make
===> src
make[1]: Entering directory `/root/tars/apache_1.3.34'
make[2]: Entering directory `/root/tars/apache_1.3.34/src'
make[2]: *** No rule to make target `all'. Stop.
make[2]: Leaving directory `/root/tars/apache_1.3.34/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/root/tars/apache_1.3.34'
make: *** [build] Error 2
[root@NeilLinux apache_1.3.34]#



Any thoughts?

je_fro
03-09-2006, 04:05 PM
Yes, it looks like you don't have gcc on your box.

zebra_
03-09-2006, 04:48 PM
whats gcc and how do i sort this problem out?


Thanks.

je_fro
03-09-2006, 05:15 PM
I think the easiest solution is to install the "Development Tools" from your install cd's. That will contain gcc (compiler) and glibc (libraries).

bwkaz
03-09-2006, 07:34 PM
But if you're going to install stuff from your distro CDs anyway, then it's going to be much, much simpler to install Apache and PHP from there too. ;)

zebra_
03-10-2006, 07:25 AM
Ok thanks for the tips guys, apache is now installed, i've edited the httpd.conf to suit, and now i need to restart the server, how do i do this in lnux?

thanks.

serz
03-10-2006, 07:48 AM
apachectl restart :)

zebra_
03-10-2006, 08:13 AM
thanks,

when i type that command it says the following:

[root@NeilLinux root]# apachectl restart
httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
httpd not running, trying to start
[root@NeilLinux root]#


??

Architect
03-10-2006, 08:41 AM
Is it running after that with your changes?
you could check with ps -ef | grep "apache"

zebra_
03-10-2006, 11:32 AM
Here is a screen dump from that command:

not exactly sure what its telling me.

[neil@NeilLinux neil]$ ps -ef | grep apache
neil 3069 3040 0 15:28 pts/0 00:00:00 grep apache

zebra_
03-10-2006, 12:51 PM
wow, i finally got it to work!

but now i have a new problem.

I need to use php.

I have successfully installed php and added the following lines to the end of httpd.conf:

LoadModule php5_module modules/libphp5.so
AddModule php5_module /usr/local/webserver/php/sapi/apache/mod_php5.c
AddType application/x-httpd-php .php .phtml

But when trying to start the server it says it can't find the file libphp5.so

so then i tried #locate libphp5.so but it found nothing.

Any thoughts?

By the way the add module line i guessed based on my experience in windows.


Thanks for all the help so far by the way.

zebra_
03-10-2006, 12:57 PM
ok i just did a search for libphp without and extension and got these options:

index.html
[root@NeilLinux webroot]# locate libphp
/root/webserver/php/sapi/apache/libphp5.module.in
/root/webserver/php/sapi/apache_hooks/libphp5.module.in


I tried adding each of these files to the loadmodule line in turn but both times got the same error:

[root@NeilLinux bin]# ./apachectl restart
httpd: Syntax error on line 413 of /usr/local/apache2/conf/httpd.conf: Cannot load /root/webserver/php/sapi/apache/libphp5.module.in into server: /root/webserver/php/sapi/apache/libphp5.module.in: cannot open shared object file: No such file or directory

perhaps i need to download this .so file from somewhere?

zebra_
03-10-2006, 01:56 PM
after a bit of searching around the net i tried re-compiling php with the following parameter:

./configure --with-apxs2=/usr/local/apache2/bin/apxs

But still no joy.

I'm stumped now.

Anyone know what i should do?

zebra_
03-10-2006, 02:01 PM
after looking in the php/libs folder i found the libphp5.so file, however when running the command locate libphp5.so it still doesn't find it which i find bizarre.

anyway, so in the httpd.conf file i directed it to the right place:

LoadModule php5_module /usr/local/webserver/php/libs/libphp5.so


and then tried to restart the apache server but got the following error:

[root@NeilLinux bin]# ./apachectl restart
httpd: Syntax error on line 413 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/webserver/php/libs/libphp5.so into server: /usr/local/webserver/php/libs/libphp5.so: undefined symbol: sqlite3SelectDelete


Any thoughts?

bwkaz
03-10-2006, 07:24 PM
(1) locate works off a database; in order for it to return correct results, the database has to be up to date. (updatedb is the command to do that.) Given that you have to re-update the database every time you add or delete files, I find it much easier to just use find instead of locate (find runs through the actual filesystem instead of just looking through a database): find /usr -name 'libphp*'

(2) I think you should install PHP from your distro packages as well. It looks like there's another library (perhaps related to mysql? not sure, but it looks like it needs a database of some sort) that your currently-installed libphp5.so file requires, but which isn't installed. If your distro's PHP also requires that same database, then PHP will actually depend on the database (so you can't install PHP without it). And the PHP library should work if both PHP and the database get installed.

zebra_
03-13-2006, 05:22 AM
thanks for the help, i'll give that a try

zebra_
03-13-2006, 05:42 AM
I was reluctant to install the one with my dist cds as i'm running redhat 9 so it would be a really old php release.

I just tried installing php ver 4 instead of 5 thogh and it works.

thanks for all the help.