How can I install httpd 2.2 in /etc/ directory in CentoOS 7

6,329

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

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

Share:
6,329

Related videos on Youtube

Carlos Durán
Author by

Carlos Durán

Updated on September 18, 2022

Comments

  • Carlos Durán
    Carlos Durán over 1 year

    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.

    • BE77Y
      BE77Y over 9 years
      Can you elaborate on your reasoning for requiring an older version of httpd, please?
    • FooBee
      FooBee over 9 years
      /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.
    • Carlos Durán
      Carlos Durán over 9 years
      I'm migrating from Ubuntu to CentOS and I want to keep the same version of Apache server
    • drookie
      drookie over 9 years
      Basically, you don't need and should not need the 2.2 on fresh installation. 2.4 is fully compatible with 2.2 configurations.
    • FooBee
      FooBee over 9 years
      @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. httpd.apache.org/docs/2.4/upgrading.html
    • drookie
      drookie over 9 years
      This is like 10 minutes of work.
    • FooBee
      FooBee over 9 years
      @drookie: I didn't say it was complicated, just that you have to adapt it and they are not fully compatible.
  • FooBee
    FooBee over 9 years
    As I said, Apache binaries doesn't belong into /etc.
  • Sreeraj
    Sreeraj over 9 years
    @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.
  • FooBee
    FooBee over 9 years
    I honestly never tried it, but reading httpd.apache.org/docs/2.4/programs/configure.html confirms this.
  • Carlos Durán
    Carlos Durán over 9 years
    That works Sree. Thank you. Anyway I'll try test with official 2.4 version too.