0

At present we are on Apache/2.2.15 (UNIX) version. To fix the vulnerabilities we are suggested to upgrade to new version. I got new version from online using "wget" command and followed steps mentioned on this link http://httpd.apache.org/docs/2.2/install.html#download.

Once I am done, checked version using httpd -v. It gives me old version Apache/2.2.15 (UNIX). If I check using /usr/local/apache2/bin/httpd - v. It gives me new version. Did I successfully upgraded the version or not? If not what should I do?

I tried "yum install httpd" - It says "Nothing to do".

enter image description here

  • 1
    Please don't post *pictures* of text. Just post the text of interest, edited for brevity as much as possible. – larsks Oct 05 '17 at 17:32
  • This sounds as if you are just trying around, here mixing different forms of installation. That never is a good idea. Is the old installation based on packages and the local software management? Or is that a "wild installation" too? – arkascha Oct 05 '17 at 17:38
  • 1
    And btw: why do you download version 2.2? Current stable and well proven is 2.4... – arkascha Oct 05 '17 at 17:38
  • Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. – jww Oct 05 '17 at 19:08

2 Answers2

1

You now have two versions of Apache installed. You have the one installed with the system package manager (yum) in /usr/sbin/httpd. You have one installed manually in /usr/local/apache2/....

Which one you get will be determined entirely by which path you use.

In general, mixing system-managed packages with manually installed packages is a recipe for trouble. If you want to stick with the newer version in /usr/local, you should remove the system version, and realize that you will lose some manageability. For example, you will no longer be able to use yum install ... to install new Apache modules, and you will not be able to verify the installed files using tools like rpmverify.

If your distribution currently has Apache 2.2.x, that suggests your distribution is fairly old. For example, RHEL (and CentOS) 7 (and similar variants) have version 2.4.6 packaged, so you may want to update your host to something newer than whatever you're running now.

larsks
  • 277,717
  • 41
  • 399
  • 399
  • @user3781360 your next step is to disable the original httpd daemon, then enable the new one saved in /usr/local. How you accomplish that depends on whether your system uses the newer systemd services or the original SystemV init.d services. – UncaAlby Nov 09 '17 at 18:59
0

Yes, its successfully upgraded as per the screenshot.

  • httpd 2.2.15 is the version with RHEL 6 repository, here HTTPD_HOME is /etc/httpd (Highest version provided for HTTPD via RPM RHEL 6 is 2.2.15)

  • httpd 2.4.6 is the version with EPEL-HTTPD24 repository, here HTTPD_HOME is /usr/local/apache2/

Giri
  • 171
  • 4