-1

CentOS 7 has got only httpd 2.4 available in its repositories. I downloaded the 2.2 version and I did a manual installation, but httpd was installed in /usr/local/ directory.

Is there any way to do the manual installation with /etc/ directory as target?

Thank you.

Carlos Durán
  • 11
  • 3
  • 8
  • 1
    Can you elaborate on your reasoning for requiring an older version of httpd, please? – BE77Y Dec 12 '14 at 09:18
  • `/etc/` is the location for config files, not for binaries. Apache has no place there. Or do you want to place just the config files in `/etc`? And yes, why Apache 2.2? If you need the older version, you could stick with CentOS 6. – Sven Dec 12 '14 at 09:20
  • I'm migrating from Ubuntu to CentOS and I want to keep the same version of Apache server – Carlos Durán Dec 12 '14 at 09:21
  • Basically, you don't need and should not need the 2.2 on fresh installation. 2.4 is fully compatible with 2.2 configurations. – drookie Dec 12 '14 at 09:33
  • 1
    @drookie: No, it is not. There are some minor but important differences, e.g. in the auth control area, and you have to adapt your config if you use these. http://httpd.apache.org/docs/2.4/upgrading.html – Sven Dec 12 '14 at 10:07
  • This is like 10 minutes of work. – drookie Dec 12 '14 at 10:23
  • 2
    @drookie: I didn't say it was complicated, just that you *have* to adapt it and they are not fully compatible. – Sven Dec 12 '14 at 10:25

1 Answers1

-2

Use the option --prefix=/etc/httpd with ./configure while installing.

./configure --prefix=/etc/httpd --your-other-options...

Sreeraj
  • 464
  • 1
  • 5
  • 15
  • 2
    As I said, Apache binaries doesn't belong into `/etc`. – Sven Dec 12 '14 at 10:08
  • @Sven , I think the OP wants all the config files in /etc/ directory just like a regular rpm installation. In that case, the `--prefix` options works and is recommended. – Sreeraj Dec 12 '14 at 10:12
  • 1
    I honestly never tried it, but reading http://httpd.apache.org/docs/2.4/programs/configure.html confirms this. – Sven Dec 12 '14 at 10:26
  • That works Sree. Thank you. Anyway I'll try test with official 2.4 version too. – Carlos Durán Dec 12 '14 at 11:17