Ubuntu Linux Save / Restore Iptables Rules

To save and restore iptables rules on Ubuntu Linux, you can use the iptables-save and iptables-restore commands. The iptables-save command writes the current iptables rules to a file, while the iptables-restore command reads the rules from a file and applies them to the system. Here are the steps to save and restore iptables rules on … Read more

Configure Linux As Bastion Host

A bastion host is a server or virtual machine that is exposed to the public internet and is designed to act as a gateway to access other servers or resources in a private network. In this section, we will explain how to configure a Linux machine as a bastion host. Here are the steps to … Read more

Solaris UNIX: Display LUNs

To display LUNs on a Solaris UNIX system, you can use the cfgadm command. The cfgadm command is used to display and manage the configuration of various devices on the system, including disks and LUNs. Here are the steps to display LUNs using the cfgadm command: Open a terminal or SSH session to the Solaris … Read more

UNIX / Linux: Send E-mail When sudo Runs

To send an email when the sudo command is executed on a UNIX/Linux system, you can set up an email notification using the sudoers configuration file. Here are the steps to do it: Edit the sudoers configuration file by running the following command: sudo visudo This will open the sudoers file in the system’s default … Read more

CentOS / RHEL: Install MySQL PHP Extension

To install the MySQL PHP extension on CentOS or RHEL, you can follow these steps: Install the MySQL community repository by downloading and installing the RPM package from the official MySQL website. You can download the RPM package by running the following command: wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm Install the downloaded RPM package using the following command: sudo … Read more

HowTo: Find Out MySQL Server Version Number

To find out the version of a MySQL server running on your system, you can use the following command in the MySQL command-line client: SELECT VERSION(); Running this command in the MySQL command-line client will display the version number of the MySQL server that you are currently connected to. For example, running this command might … Read more