You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Fan, Tony" <TF...@Kronos.com> on 2006/11/10 20:09:50 UTC

[users@httpd] Is possible to redistribute apache 2 binary to different server within installing in different location for Unix?

Hi,

 

    I compiled Apache 2 in Unix (Solaris and AIX) without any problem
with prefix /usr/local/, is possible I can move my apache binary to
different system and install it to /opt directory?  

 

--Tony  


RE: [users@httpd] Is possible to redistribute apache 2 binary to different server within installing in different location for Unix?

Posted by "Fan, Tony" <TF...@Kronos.com>.
I checked envvars file and it's pointing right path.
LIBPATH="/usr/local/apache2/lib:$LIBPATH"
export LIBPATH

--Tony

-----Original Message-----
From: Sander Temme [mailto:sctemme@apache.org] 
Sent: Friday, November 10, 2006 6:07 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Is possible to redistribute apache 2 binary
to different server within installing in different location for Unix?


On Nov 10, 2006, at 2:28 PM, Fan, Tony wrote:

> Changes LIBPATH doesn't seem to help, is there other way to set switch
> on to force to using LIBPATH?

I am not very familiar with AIX. On most Unix systems, you can add  
directories to the dynamic linker's search path by setting and  
exporting the LD_LIBRARY_PATH variable. It could be that this is  
LIBPATH on AIX, but as I said I'm not very familiar with the  
platform. What value did you give this variable? It should be /usr/ 
local/apache2/lib .

The usual pitfalls apply: when you changed the envvars file, did you  
source it in your shell, or start a new shell?

S.

-- 
sctemme@apache.org            http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Is possible to redistribute apache 2 binary to different server within installing in different location for Unix?

Posted by Mark Lavi <ml...@sgi.com>.
Yes, and some *NIX derivatives have LD_LIBARY_64 as well.

To the original poster: why not just build another Apache instance with
the ultimate destination by using the ./configure --prefix=/wherever
option and then copy that directory. Then you should not have all of
these issues to resolve.

I use --prefix every time I do a build, it helps manage testing
instances.

--Mark 
Mark Lavi, Enterprise Web Management Team @ SGI
mailto:mlavi@sgi.com || phone:+1-650-933-7707

-----Original Message-----
From: Sander Temme [mailto:sctemme@apache.org] 
Sent: Friday, November 10, 2006 3:07 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Is possible to redistribute apache 2 binary
to different server within installing in different location for Unix?


On Nov 10, 2006, at 2:28 PM, Fan, Tony wrote:

> Changes LIBPATH doesn't seem to help, is there other way to set switch
> on to force to using LIBPATH?

I am not very familiar with AIX. On most Unix systems, you can add  
directories to the dynamic linker's search path by setting and  
exporting the LD_LIBRARY_PATH variable. It could be that this is  
LIBPATH on AIX, but as I said I'm not very familiar with the  
platform. What value did you give this variable? It should be /usr/ 
local/apache2/lib .

The usual pitfalls apply: when you changed the envvars file, did you  
source it in your shell, or start a new shell?

S.

-- 
sctemme@apache.org            http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Is possible to redistribute apache 2 binary to different server within installing in different location for Unix?

Posted by Sander Temme <sc...@apache.org>.
On Nov 10, 2006, at 2:28 PM, Fan, Tony wrote:

> Changes LIBPATH doesn't seem to help, is there other way to set switch
> on to force to using LIBPATH?

I am not very familiar with AIX. On most Unix systems, you can add  
directories to the dynamic linker's search path by setting and  
exporting the LD_LIBRARY_PATH variable. It could be that this is  
LIBPATH on AIX, but as I said I'm not very familiar with the  
platform. What value did you give this variable? It should be /usr/ 
local/apache2/lib .

The usual pitfalls apply: when you changed the envvars file, did you  
source it in your shell, or start a new shell?

S.

-- 
sctemme@apache.org            http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Is possible to redistribute apache 2 binary to different server within installing in different location for Unix?

Posted by "Fan, Tony" <TF...@Kronos.com>.
Thank you all who responded to me to help me out here,  I started from
AIX first and I moved apache from directory /usr/local/Kronos/apache2 to
/usr/local/apache2,  I changed path in apachectl and LIBPATH in envvars
file,  this is error I am getting:
# pwd
/usr/local/apache2/bin
# ./apachectl start
exec(): 0509-036 Cannot load program /usr/local/apache2/bin/httpd
because of the following errors:
        0509-022 Cannot load module
/usr/local/kronos/apache2/lib/libaprutil-1.so.
        0509-150   Dependent module
/usr/local/kronos/apache2/lib/libexpat.a(libexpat.so.0) could not be
loaded.
        0509-022 Cannot load module
/usr/local/kronos/apache2/lib/libexpat.a(libexpat.so.0).
        0509-026 System error: A file or directory in the path name does
not exist.
        0509-022 Cannot load module httpd.
        0509-150   Dependent module
/usr/local/kronos/apache2/lib/libaprutil-1.so could not be loaded.
        0509-022 Cannot load module .

Changes LIBPATH doesn't seem to help, is there other way to set switch
on to force to using LIBPATH?

--Tony 

-----Original Message-----
From: Mark Lavi [mailto:mlavi@sgi.com] 
Sent: Friday, November 10, 2006 2:25 PM
To: users@httpd.apache.org
Subject: RE: [users@httpd] Is possible to redistribute apache 2 binary
to different server within installing in different location for Unix?

So long as your destination system will provide for all of the
dependencies or have compatible successors for:
- processor
- operating system
- dynamic libraries (.so on Unix/Linux/etc, .dll on Windows platforms)

Then yes, you could try it and see if you encounter (and can solve) the
next set of issues other people have mentioned when replying to you.

The idea of a binary distribution of Apache (a la RPM, etc.) allows
this, but there are things to customize unless you are on an identical
clone of your build system.

--Mark 
Mark Lavi, Enterprise Web Management Team @ SGI
mailto:mlavi@sgi.com || phone:+1-650-933-7707
-----Original Message-----
From: jslive@gmail.com [mailto:jslive@gmail.com] On Behalf Of Joshua
Slive
Sent: Friday, November 10, 2006 11:18 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Is possible to redistribute apache 2 binary
to different server within installing in different location for Unix?

On 11/10/06, Fan, Tony <TF...@kronos.com> wrote:

>     I compiled Apache 2 in Unix (Solaris and AIX) without any problem
with
> prefix /usr/local/, is possible I can move my apache binary to
different
> system and install it to /opt directory?

Yes, but you'll probably need to edit apachectl to use the -f option
to point to the config file, and you will probably need to make
changes in the config file as well (at least ServerRoot and
DocumentRoot).

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Is possible to redistribute apache 2 binary to different server within installing in different location for Unix?

Posted by Mark Lavi <ml...@sgi.com>.
So long as your destination system will provide for all of the
dependencies or have compatible successors for:
- processor
- operating system
- dynamic libraries (.so on Unix/Linux/etc, .dll on Windows platforms)

Then yes, you could try it and see if you encounter (and can solve) the
next set of issues other people have mentioned when replying to you.

The idea of a binary distribution of Apache (a la RPM, etc.) allows
this, but there are things to customize unless you are on an identical
clone of your build system.

--Mark 
Mark Lavi, Enterprise Web Management Team @ SGI
mailto:mlavi@sgi.com || phone:+1-650-933-7707
-----Original Message-----
From: jslive@gmail.com [mailto:jslive@gmail.com] On Behalf Of Joshua
Slive
Sent: Friday, November 10, 2006 11:18 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Is possible to redistribute apache 2 binary
to different server within installing in different location for Unix?

On 11/10/06, Fan, Tony <TF...@kronos.com> wrote:

>     I compiled Apache 2 in Unix (Solaris and AIX) without any problem
with
> prefix /usr/local/, is possible I can move my apache binary to
different
> system and install it to /opt directory?

Yes, but you'll probably need to edit apachectl to use the -f option
to point to the config file, and you will probably need to make
changes in the config file as well (at least ServerRoot and
DocumentRoot).

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Is possible to redistribute apache 2 binary to different server within installing in different location for Unix?

Posted by Joshua Slive <jo...@slive.ca>.
On 11/10/06, Fan, Tony <TF...@kronos.com> wrote:

>     I compiled Apache 2 in Unix (Solaris and AIX) without any problem with
> prefix /usr/local/, is possible I can move my apache binary to different
> system and install it to /opt directory?

Yes, but you'll probably need to edit apachectl to use the -f option
to point to the config file, and you will probably need to make
changes in the config file as well (at least ServerRoot and
DocumentRoot).

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Is possible to redistribute apache 2 binary to different server within installing in different location for Unix?

Posted by Sander Temme <sc...@apache.org>.
Hi Tony,

On Nov 10, 2006, at 11:09 AM, Fan, Tony wrote:

>     I compiled Apache 2 in Unix (Solaris and AIX) without any  
> problem with prefix /usr/local/, is possible I can move my apache  
> binary to different system and install it to /opt directory?

This is not always straightforward. First and easiest, the httpd  
binary expects certain configuration files and log/content  
directories to be in certain locations. You can modify its behaviour  
by specifying the -f and/or -d flags on the command line.

Secondly, httpd links against numerous dynamic libraries, most  
notably libapr.so. These are installed in the lib subdirectory and  
will move with your installation. However, on most operating systems  
the full path to the library is hardcoded into the binary, and the  
dynamic linker will not be looking in the new installation directory.

You may be able to fix the latter problem using the LD_LIBRARY_PATH  
environment variable.

S.

-- 
sctemme@apache.org            http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF