Link to home
Start Free TrialLog in
Avatar of Raz
RazFlag for United States of America

asked on

Apache httpd on linux --- "make install" installs apache under /usr/local/apache2. where can we modify the default installation path?

Hello everybody, I am new to Apache. I was tryinng to install apache on Linux, when i faced a challenge. I tried "make install" and it was trying to install apache under /usr/local/apache2. But i want to change this default installation path. I want to install some where else. Where can I change it. Please help me!!!!
ASKER CERTIFIED SOLUTION
Avatar of Adjroth
Adjroth

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In order to install a program to another than its default directory you would have to modify the 'make' file that comes with it.
The section that deals with the installation target will be marked by the variable "$(NORMAL_INSTALL)". Underneath, you will most likely find another variable called "$(DESTDIR)" or similar the definition of which will have to be altered in order to change the destination folder.

But this is not recommended at all.
In a program/service as complex as Apache there is no end to things that could or will go wrong if you meddle with the make-file - unless you really know what you are doing.

It is not even recommended to install Apache manually. Install it via your system's package manager (apt-get, aptitude, yum, pacman, zypper, yast etc.): this will make sure you install the version from your distros repository, which will be maintained and updated automatically when you update your system.
For security reasons, in a web application as critical as Apache, it is most important to make sure it is always up-to-date and all security fixes are applied immediately.
Avatar of Raz

ASKER

I have untarred httpd-2.2.17.tar. Executed following commands under httpd-2.2.17
./configure
make
make install (here is my problem)

Where do I find the make file?

I see below three files under httpd-2.2.17

Makefile
Makefile.in
Makefile.win

But there are no entries -  $(NORMAL_INSTALL) , $(DESTDIR)

Here are the contents of my httpd-2.2.17 directory.

$ pwd
/apps/elsdev/httpd-2.2.17
$ ls
ABOUT_APACHE  BuildAll.dsp  CHANGES        config.status  emacs-style  include         libhttpd.dsp  Makefile.win  modules.o      README            server   VERSIONING
acinclude.m4  BuildBin.dsp  config.layout  configure      httpd        INSTALL         LICENSE       modules       NOTICE         README.platforms  srclib
Apache.dsw    buildconf     config.log     configure.in   httpd.dsp    InstallBin.dsp  Makefile      modules.c     NWGNUmakefile  README-win32.txt  support
build         buildmark.o   config.nice    docs           httpd.spec   LAYOUT          Makefile.in   modules.lo    os             ROADMAP           test
Did you try the solution suggested by Adjroth?

Since Apache seems to have the install dir as a configure option, that appears to be the easiest and most normal way to go.
Check the second link posted by Adjroth.
Avatar of Raz

ASKER

Sorry, I overlooked the links provided by Adjroth. They solved my problem. Thanks a lot Adjroth!!!!!

Thank you too torimar.
Avatar of Raz

ASKER

Great!!! thank you