Updating a minor version of CentOS - CentOS 7, Cent OS 8

To upgrade a minor version of CentOS, use "yum update".

sudo yum update

CentOS will be updated to the latest minor version.

All dependent packages of CentOS, including the kernel, will be up to date.

Try updating the production environment in the development environment first

If you update your production environment out of the blue, it will break your environment and cause a lot of trouble.

First of all, update your environment in the development environment to make sure it works for your critical applications.

# Restart Apache
sudo systemctl reload httpd

# Check that Apache is restarted
sudo systemctl status httpd

# Restart Mariadb
sudo systemctl restart mariadb

# Check if Mariadb is restarted
sudo systemctl status mariadb

# Restart Postfix
systemctl restart postfix

# Check Postfix
systemctl status postfix

# Restart a web application
hypnotoad myapp.pl

After confirming that it works correctly in the development environment, run it in the production environment.

Apache failed to start

It is possible that the Apache version has been upgraded and the incompatible part of the configuration file is causing the error.

Let's check the status of Apache.

systemctl status httpd

Here is a sample of the error

 systemctl status httpd
Feb 04 08:13:28 tk2-261-xxxxx.vs.sakura.ne.jp systemd[1]: Starting The Apache HTTP Server...
Feb 04 08:13:28 tk2-261-xxxxx.vs.sakura.ne.jp httpd[21879]: AH00526: Syntax error on line 16 of /etc/httpd/conf.d/autoindex.conf:
Feb 04 08:13:28 tk2-261-xxxxx.vs.sakura.ne.jp httpd[21879]: Invalid command 'IndexOptions', perhaps misspelled or defined by a module not included in the server configuration
Feb 04 08:13:28 tk2-261-xxxxx.vs.sakura.ne.jp systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Feb 04 08:13:28 tk2-261-xxxxx.vs.sakura.ne.jp kill[21881]: kill: cannot find process ""
Feb 04 08:13:28 tk2-261-xxxxx.vs.sakura.ne.jp systemd[1]: httpd.service: control process exited, code=exited status=1
Feb 04 08:13:28 tk2-261-xxxxx.vs.sakura.ne.jp systemd[1]: Failed to start The Apache HTTP Server.
Feb 04 08:13:28 tk2-261-xxxxx.vs.sakura.ne.jp systemd[1]: Unit httpd.service entered failed state.
Feb 04 08:13:28 tk2-261-xxxxx.vs.sakura.ne.jp systemd[1]: httpd.service failed.

I wonder what's going on with "/etc/httpd/conf.d/autoindex.conf", maybe Aapche was upgraded and a different configuration file was loaded without my permission?

I also got this error

Feb 04 08:42:55 vs01 systemd[1]: Starting The Apache HTTP Server...
Feb 04 08:42:55 vs01 httpd[26387]: [Tue Feb 04 08:42:55.096137 2020] [so:warn] [pid 26387] AH01574: module systemd_module is already loaded, skipping
Feb 04 08:42:55 vs01 httpd[26387]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:443
Feb 04 08:42:55 vs01 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Feb 04 08:42:55 vs01 kill[26388]: kill: cannot find process ""
Feb 04 08:42:55 vs01 systemd[1]: httpd.service: control process exited, code=exited status=1
Feb 04 08:42:55 vs01 systemd[1]: Failed to start The Apache HTTP Server.
Feb 04 08:42:55 vs01 systemd[1]: Unit httpd.service entered failed state.
Feb 04 08:42:55 vs01 systemd[1]: httpd.service failed.

Oh, port 443 is already bound? What if the default ssl.conf has been loaded by itself?

This can happen, so try it in the development environment first, and then update the production environment.

Checking the version of CentOS

Use the following command to check if you have updated to the latest version.

cat /etc/redhat-release

You are now on the latest version.

 cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)

Associated Information