LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Quick question on Apache (https://www.linuxquestions.org/questions/linux-newbie-8/quick-question-on-apache-46340/)

tarballed 02-20-2003 12:29 PM

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

Mara 02-20-2003 12:41 PM

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).

Crashed_Again 02-20-2003 12:43 PM

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.

tarballed 02-20-2003 12:44 PM

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

tarballed 02-20-2003 12:49 PM

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

tarballed 02-20-2003 01:06 PM

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

Mara 02-20-2003 01:10 PM

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.

tarballed 02-20-2003 01:14 PM

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. :confused:

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

I appreciate it.

Tarballed

Mara 02-20-2003 01:19 PM

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.

tarballed 02-20-2003 02:45 PM

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

Mara 02-21-2003 03:22 PM

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


All times are GMT -5. The time now is 07:15 AM.