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
546 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now