Solved

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

Posted on 2011-03-03
6
553 Views
Last Modified: 2012-05-11
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!!!!
0
Comment
Question by:Raz
  • 3
  • 2
6 Comments
 
LVL 2

Accepted Solution

by:
Adjroth earned 500 total points
ID: 35024991
You'll need to configure it using "./configure" first.

Example:
./configure --prefix=/path/to/apache
make install

Here are two links to help you out:
http://httpd.apache.org/docs/2.0/install.html
http://httpd.apache.org/docs/2.0/programs/configure.html#installationdirectories
0
 
LVL 35

Expert Comment

by:torimar
ID: 35024998
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.
0
 

Author Comment

by:Raz
ID: 35025453
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
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 35

Expert Comment

by:torimar
ID: 35025496
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.
0
 

Author Comment

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

Thank you too torimar.
0
 

Author Closing Comment

by:Raz
ID: 35025916
Great!!! thank you
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PHP Upload using Uploadify 4 109
Use of SSL Certificates - http vs https 3 82
linux 13 75
How to configure virtual host in apache2 to have its own root folder 6 16
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question