Linux как обновить apache

How To Upgrade Apache Version in Ubuntu

upgrade apache version in ubuntu

It is important to upgrade Apache version regularly to avail new features and security updates. It is very easy to update your Apache web server to the latest version of Apache. Here’s how to upgrade Apache version in Ubuntu, Debian Linux.

How To Upgrade Apache Version in Ubuntu, Debian

Here are the steps to upgrade Apache version in Ubuntu. You can use them to upgrade Apache 2.2 to 2.4 or even update Apache to latest version.

1. Backup Apache configuration File

Before you upgrade Apache version in Ubuntu, take a backup of your Apache configuration file. It is located at one of the following locations, depending on your installation

  • /etc/apache2/httpd.conf
  • /etc/apache2/apache2.conf
  • /etc/httpd/httpd.conf
  • /etc/httpd/conf/httpd.conf
$sudo cp /etc/apache2/httpd.conf /etc/apache2/httpd-backup.conf

2. Install Prerequisites

Next, you need to install the following package.

$ sudo apt-get install software-properties-common

3. Add Repository

Add the following Apache2 PPA repository

$ sudo add-apt-repository ppa:ondrej/apache2 $ sudo apt-get update

4. Upgrade Apache Version in Ubuntu

Run the following command to upgrade Apache version

If you see any prompts after this step, enter NO or N and proceed further.

5. Check Apache Version Number

Run the following command to check Apache version number

That’s it! You have upgraded Apache web server version in Ubuntu, Debian Linux.

By the way, if you want to create charts & dashboards for your business or website, you can try Ubiq. We offer a 14-day free trial.

Источник

How to Upgrade Apache Version in CentOS, Redhat Linux

upgrade apache version in centos

It is important to update Apache regularly for new features & security updates. It is very easy to upgrade Apache web server to the latest version in CentOS. Here’s how to upgrade Apache version in CentOS, Redhat linux. You can also use these steps to upgrade Apache 2.2 to 2.4 or even update Apache to latest version.

How to Upgrade Apache Version in CentOS, Redhat Linux

Here are the steps to upgrade Apache version in CentOS 6, 7, Redhat and other Linux systems.

1. Check Apache Version Number

First, open terminal and run the following command to check Apache version number

# yum info httpd or # httpd -v Server version: Apache/2.4.16 (Unix)

2. Backup Apache configuration File

Before you upgrade Apache version in CentOS, take a backup of your Apache configuration file. It is located at one of the following locations, depending on your installation

  • /etc/apache2/httpd.conf
  • /etc/apache2/apache2.conf
  • /etc/httpd/httpd.conf
  • /etc/httpd/conf/httpd.conf
$sudo cp /etc/apache2/httpd.conf /etc/apache2/httpd-backup.conf

3. Install EPEL

Next you need to install EPEL repository on CentOS

# yum install -y epel-release

4. Enable EPEL Repository

Run the following command to enable EPEL repository for CentOS 7. You can get all CentOS 7 repos at http://mirror.centos.org/centos/7/

# cd /etc/yum.repos.d && wget http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml`rpm -q --qf "%" $(rpm -q --whatprovides redhat-release)`.repo

5. Upgrade Apache Version in CentOS

To update Apache in CentOS, we have to fully install the latest version of httpd (Apache server)

Читайте также:  Настройка клавиатура linux mint

6. Restart Apache Server

Open your config file to check if your config file has changed. If it has been overwritten then restore it from the backup you created in step 2. Finally, start Apache server

# service httpd start or # systemctl start httpd

That’s it! You have upgraded Apache web server version in CentOS, Redhat Linux.

Ubiq makes it easy to visualize data in minutes, and monitor in real-time dashboards. Try it Today!

Источник

Upgrade Apache to Current Version in Ubuntu 20

Upgrade Apache

Before you upgrade, please be sure you have a current backup of your site and configuration.

To start, we will check our version of Apache using this command

you will then see something like this:

ubuntu@servername:~$ apache2 -v Server version: Apache/2.4.41 (Ubuntu) Server built: 2021-09-28T16:55:53

Adding Apache PPA

The first thing we need to do to upgrade Ubuntu 20.04 Apache webserver to the latest version is adding the PPA by Ondřej Surý’s. If you don’t know, Ondřej is the maintainer for PHP on Debian and maintains the latest Apache PPA for Ubuntu along with Nginx and PHP.

To add the PPA, use the following command:

sudo add-apt-repository ppa:ondrej/apache2 -y && sudo apt update

Now we are ready to update apt and install the newest version of apache2. To do these tasks, we will use the following commands:

When prompted, press y to confirm the installation. Once these commands have finished running, we can recheck our version using the apache2 -v command.

ubuntu@serverip:~$ apache2 -v Server version: Apache/2.4.49 (Ubuntu) Server built: 2021-09-28T16:55:53

At this point, the only thing we need to do is restart apache2 using the following command:

sudo systemctl restart apache2

We have now upgraded our apache2 server from 2.4.41 to 2.4.49. Enjoy!

Источник

How do I update apache2 to the latest version on Debian jessie?

enter image description here

But it doesn’t find any update. What can i do to upgrade to a latest version ?

@wawanopoulos: Jessie is still supported so you should expect security patches or backports to show up even if the version number differs from upstream.

They are fixed in the Debian package. The Tenable report is based purely on version numbers, which unfortunately doesn’t work with many distribution packages.

Which version are you running exactly? ( dpkg -l apache2 , ensure your terminal is wide enough to display the full version number)

Читайте также:  Linux копирование файла sftp

6 Answers 6

Do not manually upgrade Apache.

Manual upgrading for security is unnecessary and probably harmful.

How Debian releases software

To see why this is, you must understand how Debian deals with packaging, versions, and security issues. Because Debian values stability over changes, the policy is to freeze the software versions in the packages of a stable release. This means that for a stable release very little changes, and once things work they should continue working for a long time.

But, what if a serious bug or security issue is discovered after release of a Debian stable version? These are fixed, in the software version provided with Debian stable. So if Debian stable ships with Apache 2.4.10 , a security issue is found and fixed in 2.4.26 , Debian will take this security fix, and apply it to 2.4.10 , and distribute the fixed 2.4.10 to its users. This minimizes disruptions from version upgrades, but it makes version sniffing such as Tenable does meaningless.

Serious bugs are collected and fixed in point releases (the .9 in Debian 8.9 ) every few months. Security fixes are fixed immediately and provided through an update channel.

In general, as long as you run a supported Debian version, stick to stock Debian packages, and stay up to date on their security updates, you should be good.

Your Tenable report

To check if Debian stable is vulnerable for your issues, Tenable’s «2.4.x < 2.4.27 multiple issues" is useless. We need to know exactly which security issues they are talking about. Luckily, every significant vulnerability is assigned a Common Vulnerability and Exposures (CVE) identifier, so we can talk easily about specific vulnerabilities.

For example, on this page for Tenable issue 101788 we can see that that issue is about vulnerabilities CVE-2017-9788 and CVE-2017-9789. We can search for these vulnerabilities on the Debian security tracker. If we do that, we can see that CVE-2017-9788 has the status «fixed» in or before version 2.4.10-10+deb8u11 . Likewise, CVE-2017-9789 is fixed.

So if you’re on version 2.4.10-10+deb8u11 , you should be safe from all these vulnerabilities! You can check this with dpkg -l apache2 (ensure your terminal is wide enough to show the full version number).

Staying up to date

So, how do you ensure you’re up to date with these security updates?

First, you need to have the security repository in your /etc/apt/sources.list or /etc/apt/sources.list.d/* , something like this:

deb http://security.debian.org/ jessie/updates main 

This is a normal part of any installation, you should not have to do anything special.

Next, you must ensure that you install updated packages. This is your responsibility; it is not done automatically. A simple but tedious way is to log in regularly and run

# apt-get update # apt-get upgrade 

Judging from the fact that you report your Debian version as 8.8 (we’re at 8.9) and the . and 48 not upgraded. from your post, you might want to do this soon.

To be notified of security updates, I higly recommend subscribing to the Debian security announcements mailinglist.

Читайте также:  Asus rog linux driver

Another option is ensuring your server can send you emails, and installing a package like apticron, which emails you when packages on your system need updating. Basically, it regularly runs the apt-get update part, and pesters you to do the apt-get upgrade part.

Finally, you could install something like unattended-upgrades, which not only checks for updates, but automatically installs the updates without human intervention. Upgrading the packages automatically without human supervision carries some risk, so you need to decide for yourself if that is a good solution for you. I use it and I’m happy with it, but caveat updator.

Why upgrading yourself is harmful

In my second sentence, I said upgrading to the latest Apache version is probably harmful.

The reason for this is simple: if you follow Debian’s version of Apache, and make a habit of installing the security updates, then you are in a good position, security-wise. Debians security team identifies and fixes security issues, and you can enjoy that work with minimal effort.

If, however, you install Apache 2.4.27+, say by downloading it from the Apache website and compiling it yourself, then the work of keeping up with security issues is fully yours. You need to track security issues, and go through the work of downloading/compiling/etc every time a problem is found.

It turns out this is a fair amount of work, and most people slack off. So they end up running their self-compiled version of Apache that becomes more and more vulnerable as issues are found. And so they end up a lot worse than if they simply had followed Debian’s security updates. So yes, probably harmful.

That’s not to say there’s no place for compiling software yourself (or selectively taking packages from Debian testing or unstable), but in general, I recommend against it.

Duration of security updates

Debian doesn’t maintain its releases forever. As a general rule, a Debian release recieves full security support for one year after it has been obsoleted by a newer release.

The release you’re running, Debian 8 / jessie , is an obsoleted stable release ( oldstable in Debian terms). It will receive full security support until May 2018, and long-term support until April 2020. I’m not entirely sure what the extent of this LTS support is.

The current Debian stable release is Debian 9 / stretch . Consider upgrading to Debian 9, which comes with newer versions of all software, and full security support for several years (likely until mid-2020). I recommend upgrading at a time that is convenient for you, but well before May 2018.

Closing remarks

Earlier, I wrote that Debian backports security fixes. This ended up being untenable for some software due to the high pace of development and high rate of security issues. These packages are the exception, and actually updated to a recent upstream version. Packages I know of this applies to are chromium (the browser), firefox , and nodejs .

Finally, this entire way of dealing with security updates is not unique to Debian; many distributions work like this, especially the ones that favour stability over new software.

Источник

Оцените статью
Adblock
detector