Upgrade/Install PHP 7.4 in CentOS 8

The good news is this whole process is relatively painless, so here we go.

As always, all the commands assume you have root permissions.

Install the EPEL and remi repositories.

dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm

List the PHP versions you have available

dnf module list php

This should list versions of PHP both in the main repositorys as well as the remi repository. We want to enable remi-7.4.

Reset the php module (if you already have an existing PHP version installed)

dnf module reset php

Install PHP 7.4

dnf module enable php:remi-7.4

Update using dnf

dnf update

PHP 7.4 should now be installed.

Verify PHP version

php -v

· 2020/07/31 14:54 · 2021/03/01 05:13

Set up unattended-upgrades on Ubuntu 20.04

Package upgrades can be set up to install updates on Ubuntu without user intervention.

Install unattended-upgrades

apt install unattended-upgrades

Install mailx & Postfix

apt install bsd-mailx

If this does not install Postfix, install it now.

apt install postfix

This will install also install Postfix. mailx is what unattended upgrades uses to send external mail.

Configure unattended-upgrades

Edit /etc/apt/apt.conf.d/50unattended-upgrades. This file is mostly self explanatory. The options can be enabled by deleting un-commenting the line. At the very least, configure the following:

  • Unattended-Upgrade::Mail “your@email.com”; to allow sending notifications to your e-mail address.
  • Unattended-Upgrade::Automatic-Reboot “true”; to enable auto-reboots
  • Unattended-Upgrade::Remove-Unused-Kernel-Packages “true”; to remove kernel-related packages. This is usually done using apt autoremove.
  • Unattended-Upgrade::Remove-New-Unused-Dependencies “true”; - remove unneeded dependancies. Also manually done with apt autoremove.
  • Unattended-Upgrade::Remove-Unused-Dependencies “false”; - remove unused packages, also, apt autoremove.

Restart unattended-upgrades

systemctl restart unattended-upgrades

Configure Postfix

Edit /etc/postfix/main.cf. Configuration of postfix is outside the scope of this article. For my purposes, I use a relay, so I edit and uncomment relayhost = to point to my relay.

Test mail

mailx -vvv -s "Subject" your@e-mail.com

Press CTRL D to send the email.

Test your set up

unattended-upgrades --dry-run -–debug
· 2020/07/29 16:38 · 2021/07/28 14:40

Quick time server set up on HP/Aruba switches

This is a quick configuration of setting a time server on Aruba/HP switches.

Enable sntp

timesync sntp

Specify how to get to your time server

sntp unicast

If your DHCP server specifies an SNTP server in it's leases, then you didn't really have to go through this.

Specify the time server

sntp server priority 1 IP.IP.IP.IP

Replace IP.IP.IP.IP with your server IP.

Set timezone

time timezone -360

Set this to for your location.

Set daylight-savings time rule

time daylight-time-rule continental-us-and-canada

Set this to for your location.

Verify your changes

show sntp
· 2020/07/29 10:51 · 2021/04/29 15:04

Fix software updates in Cockpit in Ubuntu 20.04

Software updates on the Ubuntu system will fail because Cockpit on Ubuntu doesn't detect a network connection. To fix this, you must use NetworkManager instead of the default networkd.

You need to be root or sudo root for all these commands. Edit your netplan file in /etc/netplan and add the following two lines under network:.

version: 2
renderer: NetworkManager

Remember that spaces matter in YAML files.

You will then need install network-manager.

apt install network-manager

Disable networkd.

systemctl disable systemd-networkd

Enable NetworkManager

systemctl enable network-manager

Apply your new settings

netplan apply


· 2020/07/17 14:15 · 2020/07/17 14:23

Allow rrdcached, memcache, and MariaDB/MySQL through the firewall in CentOS 8

Open ports 42217 (rrdcached) and 11211 (memcached) in the firewall and reload the firewall.

firewall-cmd --zone=public --permanent --add-port 42217/tcp
firewall-cmd --zone=public --permanent --add-port 11211/tcp
firewall-cmd --zone=public --permanent --add-port 3306/tcp
firewall-cmd --reload

Verify that the ports are open using firewall-cmd –-list-all.

[root@nms nms]# firewall-cmd –list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: ens32
services: cockpit dhcpv6-client http https ssh
ports: 42217/tcp 11211/tcp 3306/tcp
masquerade: no
rich rules:

<< Newer entries | Older entries >>