LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-20-2003, 01:29 PM   #1
tarballed
Member
 
Registered: Jun 2002
Distribution: RH, FC, FreeBSD,OpenBSD
Posts: 326

Rep: Reputation: 30
Quick question on Apache


Mmorning everyone. I have a quick question on apache.

I have installed and compiled apache 1.3.27 onto my Linux box. My question is, if I wanted to recompile apache to add a few options, what would be the best way to go about doing that?

Is there a link of some sort on how to recompile? I have been working a lot with apache, PHP, mysql and IBM DB2 and I need to recompile apache to add a few new options.

Any suggestions or links would be great.

Thank you.

Tarballed
 
Old 02-20-2003, 01:41 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,569

Rep: Reputation: 171Reputation: 171
It depends how you change it. If you run ./configure with extra options, you need make and make install. If you're changing one of Apache source files, only make and make install (it will be shorter than the first case, because only changed files will be compiled).
 
Old 02-20-2003, 01:43 PM   #3
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
If you installed it from source then just recompile it. First do:

./configure --help

This will give you a list of options to choose from. What ever options you want to add put them in your ./configure statement. Like lets say the option to add php support is --enable-php(Which I don't think it is) You would do:

./configure --enable-php

Then do:

make
make install

./configure is where you add your options like --enable-supermantoflythroughmyscreen or whatever.

Last edited by Crashed_Again; 02-20-2003 at 01:45 PM.
 
Old 02-20-2003, 01:44 PM   #4
tarballed
Member
 
Registered: Jun 2002
Distribution: RH, FC, FreeBSD,OpenBSD
Posts: 326

Original Poster
Rep: Reputation: 30
Thanks Mara for your reply. I have been learning a lot compiling Apache and PHP, but I have many questions on so many things.

Let me ask this:

I have both Apache 1.3.27 and PHP 4.3.0 installed on my server. If I wanted to completely start over, meaning recompile both apache and PHP brand new with no residue left over, what would be the best way to go about doing that?

Thanks again.

Tarballed
 
Old 02-20-2003, 01:49 PM   #5
tarballed
Member
 
Registered: Jun 2002
Distribution: RH, FC, FreeBSD,OpenBSD
Posts: 326

Original Poster
Rep: Reputation: 30
Hmm. Very interesting thing happened when I tried to restart the apache server after doing a bit of recompiling. Here is an error message I received:

[root@ubergeek apache_1.3.27]# /usr/local/apache/bin/apachectl restart
/usr/local/apache/bin/apachectl restart: httpd not running, trying to start
Syntax error on line 205 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp4.so into server: libdb2.so.1: cannot open shared object file: No such file or directory
/usr/local/apache/bin/apachectl restart: httpd could not be started

I did not do anything fancy when I was compiling apache. This is what I specified:

./configure --prefix=/usr/local/apache --enable-module=so

This is what I specified for PHP(version 4.3.1)

--with-mysql --with-apxs=/usr/local/apache/bin/apxs

Any idea on what this could be?
Can I somehow completely remove all of apache and PHP, then start over, to get a clean slate?

Tarballed
 
Old 02-20-2003, 02:06 PM   #6
tarballed
Member
 
Registered: Jun 2002
Distribution: RH, FC, FreeBSD,OpenBSD
Posts: 326

Original Poster
Rep: Reputation: 30
Yes. What would be the best way to completely start over from scratch for apache and PHP?

I want to remove any previous install of apache and PHP, then do fresh installs of both.

What would be the best way to do that?

Thanks everyone.

Tarballed
 
Old 02-20-2003, 02:10 PM   #7
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,569

Rep: Reputation: 171Reputation: 171
Quote:
libdb2.so.1: cannot open shared object file: No such file or directory
Find this library and modify your LD_LIBRARY_PATH (add the directory the file's in).

Quote:
Can I somehow completely remove all of apache and PHP, then start over, to get a clean slate?
make clean
But you can have two versions at the same time. Just use --prefix for both Apache and PHP and modify PATH and LD_LIBRARY_PATH.
 
Old 02-20-2003, 02:14 PM   #8
tarballed
Member
 
Registered: Jun 2002
Distribution: RH, FC, FreeBSD,OpenBSD
Posts: 326

Original Poster
Rep: Reputation: 30
Ok...I found where libdb2.so.1 is. Here is the location:

/opt/IBM/db2/V8.1/lib/libdb2.so.1

This is embarassing, but what exactly is:

LD_LIBRARY_PATH

I am not sure how to modify this to point to the correct info.

Could I trouble you for a quick lesson on how to do that?

I appreciate it.

Tarballed
 
Old 02-20-2003, 02:19 PM   #9
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,569

Rep: Reputation: 171Reputation: 171
LD_LIBRARY_PATH is like PATH, but for libraries. So to modify it:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/IBM/db2/V8.1/lib

The same effect you get when you add /opt/IBM/db2/V8.1/lib to /etc/ld.conf.so and run ldconfig.
 
Old 02-20-2003, 03:45 PM   #10
tarballed
Member
 
Registered: Jun 2002
Distribution: RH, FC, FreeBSD,OpenBSD
Posts: 326

Original Poster
Rep: Reputation: 30
Thanks Mara.

Once I added:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/IBM/db2/V8.1/lib

Everything seemed to work. I was able to compile PHP and everything worked. I ran 'Make', which worked. And then 'Make Install' and no problems.

Where can I find more info on LD_LIBRARY_PATH ?

I am trying to learn as much as I can about Apache, PHP and databases since my company is really pushing to go in that direction.

Do you have any recommendations or suggestions? books? links?
anything would be great.

Thank you.

Tarballed
 
Old 02-21-2003, 04:22 PM   #11
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,569

Rep: Reputation: 171Reputation: 171
A book about environmental variables (and shell) would be good. I don't know any title...
 
  


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
quick apache 2 question eckertc1 Linux - Software 8 03-09-2005 01:38 AM
Quick question about apache The_Messiah Slackware 2 09-04-2004 05:39 PM
Quick Apache question karlan Linux - Software 2 07-03-2004 03:20 AM
A quick Apache question. slackMeUp Slackware 5 04-25-2004 04:19 PM
Quick apache question needforspeed Linux - Software 4 01-30-2004 05:11 PM


All times are GMT -5. The time now is 03:10 AM.

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