First, thanks to Major Hayden for his blog post which pointed out the use of systemd-resolved:

So, now we have the possibility to use systemd-networkd under ubuntu 18.04, I’d like to use it also under CentOS 7.
And yes, we can.

Install systemd-networkd:

yum -y install systemd-networkd

Disable network manager and enable networkd and resolved:

systemctl disable network NetworkManager
systemctl enable systemd-networkd systemd-resolved

Save the following contents to /etc/systemd/network/



(On my server the interface was no longer called ens3 but now eth0, hence the eth*)

Now create a symlink to the systemd-resolved resolv.conf:

rm -f /etc/resolv.conf
ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf

And just to be sure, reboot 🙂

Now we have it up and running:

[root@el7 ~]# networkctl
IDX LINK             TYPE               OPERATIONAL SETUP     
  1 lo               loopback           carrier     unmanaged 
  2 eth0             ether              routable    configured

2 links listed.
[root@el7 ~]# networkctl status eth0
● 2: eth0
   Link File: n/a
Network File: /etc/systemd/network/
        Type: ether
       State: routable (configured)
        Path: pci-0000:00:03.0
      Driver: virtio_net
      Vendor: Red Hat, Inc.
       Model: Virtio network device
  HW Address: 1e:00:85:00:1b:5a
         MTU: 1500
     Gateway: (ICANN, IANA Department)
              fe80::d6ca:6dff:fe74:870d (

I use my smartphone regularly to login on servers of mine with SSH. This works really well, but obviously you have less width than with a normal computer screen.

Some tools, like w, will not work with this limited width and give you a message like 

w: 60 column window is too narrow

Being a sysadmin, I don’t like to be told something just can’t work. So, a little trick to make it work:

 w | cat

This will have w output it’s text through stdout to cat and cat just outputs the text to the console, no questions asked.

Here’s how I managed to install the memcached module for php 7.0 running on a server running CentOS with DirectAdmin.

Install the remi repo and install the latest version of memcached and libmemcached

yum -y install$(awk -F 'release ' '{print $2}' /etc/system-release| head -c 1).rpm
yum --enablerepo remi install memcached libmemcached-last libmemcached-last-devel git

Now configure and install the memcached extension:

cd ~
git clone
cd php-memcached
git checkout php7
./configure --disable-memcached-sasl --with-php-config=/usr/local/php70/bin/php-config
sudo make install

Add the extension to the php config:

echo "" | sudo tee /usr/local/php70/lib/php.conf.d/60-memcached.ini

And finally, restart php-fpm:

service php-fpm70 restart

Or if you run mod_php:

service httpd restart