Table of Contents
Linux Hints, Top Tips, and FAQs
Here are some of the Linux hints and documentation that seems to be woefully lacking or just mis-leading on the greater wider Internet.
Installing latest PHP on Ubuntu
Ubuntu 18.04 ships with php7.2. But software like LibreNMS now specifies a minimum of php7.3 so what do you do?
Easy, install the latest php which, at time of writing, is 7.4.
We need to add Ondre Sury's PPA repository which has the latest php builds. Ondre also recommends installing his PPA of apache2, so we'll add that as well.
philip@host:~$ sudo -s root@host:~# add-apt-repository ppa:ondrej/php root@host:~# add-apt-repository ppa:ondrej/apache2 root@host:~# apt update
This will update the database to the latest packages available. And then we simply do:
root@host:~# apt upgrade
which will update php and apache2 to the latest versions plus do all the needful with enabling modules etc etc.
Once installed check that it is working by running
php -v. You should see output like this:
philip@host:~$ php -v PHP 7.4.12 (cli) (built: Oct 31 2020 17:04:09) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.12, Copyright (c), by Zend Technologies
It is also worth checking that
/etc/php/7.4/cli/php.ini have the settings you expect. Compare with your previous version of php. Most commonly, the timezone value will need to be set different from UTC0/GMT.
Setting iDRAC8 Server info
This applies to Dell servers of course. First off, install
apt-get update; apt-get install ipmitools
To find out the options available in
and there is a manpage available too.
To set the iDRAC8 System Host Name, you want:
ipmitools mc setsysinfo system_name HOSTNAME
To set the iDRAC8 Operating System, you want:
ipmitools mc setsysinfo os_name OSNAME
To set the iDRAC8 Operating System Version, you want:
ipmitools mc setsysinfo delloem_os_version OSVERSION
And that's it - after that, if you refresh the iDRAC8 Server Overview screen you will see the changes you made.
BTW, this is a simplified version of what is written up on Dell's website
Ubuntu LACP with Cisco Catalyst Switches
This will of course depend on the switch model you are using and the IOS version, but I've documented here what works in the installations I've been assisting with.
Ubuntu LACP Configuration
This example shows the
/etc/network/interfaces configuration using two ethernet interfaces on a server to be combined to form a LAG, and using LACP. Here I'm using VLAN 3, 5 and 7 on the server, and they are being passed by the LAG from the switch the server is connected to. VLAN 3 is for server management access, whereas VLAN 5 and 7 are passed on to virtual machines within the server.
source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback auto eno1 iface eno1 inet manual bond-master bond0 auto eno2 iface eno2 inet manual bond-master bond0 auto bond0 iface bond0 inet manual bond-mode 802.3ad bond-miimon 100 bond-lacp-rate 1 bond-slaves eno1 eno2 auto bond0.3 iface bond0.3 inet manual vlan-raw-device bond0 auto bond0.5 iface bond0.5 inet manual vlan-raw-device bond0 auto bond0.7 iface bond0.7 inet manual vlan-raw-device bond0 auto br0 iface br0 inet static address 192.168.1.2 netmask 255.255.255.0 gateway 192.168.1.254 bridge_ports bond0.3 bridge_stp off bridge_fd 0 auto br1 iface br1 inet manual bridge_ports bond0.5 bridge_stp off bridge_fd 0 auto br2 iface br2 inet manual bridge_ports bond0.7 bridge_stp off bridge_fd 0
Cisco Catalyst 2950G-48 Configuration
Configuration snipped for a Catalyst 2950G-48 running '12.1(22)EA13'. Note that the 2950G-48 needs the
flowcontrol send off command - other switches don't seem to need this.
For security reasons, I've made the native VLAN on the trunk to be 999, rather than the default VLAN of 1. I strongly recommend never to use VLAN1 for anything.
interface Port-channel2 description Trunk switchport trunk native vlan 999 switchport mode trunk load-interval 30 flowcontrol send off ! interface FastEthernet0/1 description LAG-PORT1 switchport trunk native vlan 999 switchport mode trunk load-interval 30 channel-group 2 mode active ! interface FastEthernet0/2 description LAG-PORT2 switchport trunk native vlan 999 switchport mode trunk load-interval 30 channel-group 2 mode active !
With this configuration, VLAN 999 is the native VLAN (frames sent untagged), and all other VLANs (including 1) are sent tagged.