Sun ILOM – Enable HTTP or HTTPS Web Access Using the CLI

ILOM supports both HTTP or HTTPS connections. ILOM enables you to automatically redirect HTTP access to HTTPS. ILOM also enables you to set the HTTP and HTTPS ports.

1. Log in to the ILOM CLI as a an Administrator.

2. At the command prompt, type:

-> set /SP/services/http

The properties are located in /SP/services/http and /SP/services/https.

Targets, Properties, and Values

The following shows the valid targets, properties, and values for HTTP andHTTP

Read more

Share

Remove Proxmox Subscription Notice

Copy and paste following command to the terminal

(6.1 and up)

sed -i.backup "s/data.status !== 'Active'/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service

(6.2-11 and up)

sed -i.backup -z "s/res === null || res === undefined || \!res || res\n\t\t\t.false/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service

(6.2-12 and up)

Read more

Share

Install Multipath on Debian Server

Note: 
This installation is tested on Debian 10 (Buster) edition. It might work for other versions of Debian as well.

DMM Setup Overview

DM-Multipath includes compiled-in default settings that are suitable for common multipath configurations. Setting up DM-multipath is often a simple procedure. The basic procedure for configuring your system with DM-Multipath is as follows:

  1. Install the multipath-tools and multipath-tools-boot packages
  2. Copy an existing config file
  3. If necessary, edit the multipath.conf configuration file to modify default values and save the updated file.
  4. Start the multipath daemon

Installation of multipath:

apt update
apt install multipath-tools multipath-tools-boot
systemctl restart multipathd

On CentOS/Redhat distribution, the default configuration path is: 

Read more

Share

Email Alert for Host down using fping

A simplified bash script for host status alert:

#!/bin/bash

email=h.t.emdad@gmail.com
NBR_DOWN=0
LOGFILE=/tmp/pinglog.txt

echo "Server Down Status" > $LOGFILE
for i in $(cat ping.txt); do
fping $i >/dev/null
if [ $? -ne 0 ]; then
echo "$i is down" >> $LOGFILE
NBR_DOWN=$((NBR_DOWN+1))
fi
done

if [ $NBR_DOWN -gt 0 ]; then
mailx -s "Server Down Alert" $email < $LOGFILE
fi

The contents on ping.txt is like (entries are with new line entry:

core-router
host1
bc
host2
host3
host4
cpanel

If you do not have ‘mailx’ installed, install it using

yum install mailx.
Share

Install PHP 7.4 / 7.3 / 7.2 / 7.1 on Debian 10 / Debian 9

Add PHP Repository

SURY, a third-party repository which offers PHP 7.4 / 7.3 / 7.2 / 7.1 for Debian operating system.

By default, Debian 10 ships PHP v7.3. So, you can either install PHP v7.3 from Debian repository or SURY repository. Skip this section if you want to install PHP 7.3 from the Debian repository. However, if you want to install PHP 7.4 / 7.2 / 7.1 on Debian 10, you must set up SURY repository.

Update the repository cache.

sudo apt update
sudo apt install -y curl wget gnupg2 ca-certificates lsb-release apt-transport-https

Import the public using the below commands.

wget https://packages.sury.org/php/apt.gpg
sudo apt-key add apt.gpg

Add the SURY repository to your system.

echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php7.list

Update the repository index.

Read more

Share

Multiple or Two Default Gateways on One System

Problem Description

You have built two or more network cards into one Linux system and each of these cards has its own default gateway. By default, you can only have one default gateway on a system. The case described would lead to asynchronous routing, whereby the router would reject the packets as appropriate.

Solution

The iproute2 program, which is included in all current Linux distributions and already installed even, as a rule, can be used for the solution of this problem. Normally, a Linux system only has one routing table, in which only one default gateway can make entries. With iproute2, you have the ability to setup an additional routing table, for one thing, and allow this table to be used by the system based on rules, for another.

Read more

Share

How to find out the connected interface using linux command

Method 1

To find out the connected state of a network cable in Linux, just run:

$ cat /sys/class/net/enp5s0/carrier

Sample output:

1

If you got output as “1” (Number one), It means that the network cable is connected with the network card. Also, you can do this with the following command too:

$ cat /sys/class/net/enp5s0/operstate

Sample output:

Read more

Share

Install LAMP on CentOS 7 with PHP 5.4/7.0/7.1/7.2/7.3/7.4

Preliminary Note

In this tutorial, I use the hostname server1.example.com with the IP p 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate.

I will add the EPEL repo here to install latest phpMyAdmin as follows:

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
yum -y install epel-release

To edit files on the shell, I’ll install the nano editor. If you prefer vi for file editing, then skip this step.

yum -y install nano

Installing MySQL / MariaDB

MariaDB is a MySQL fork of the original MySQL developer Monty Widenius. MariaDB is compatible with MySQL and I’ve chosen to use MariaDB here instead of MySQL. Run this command to install MariaDB with yum:

yum -y install mariadb-server mariadb

Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server:

Read more

Share

Enable mod_rewrite for Apache on CentOS 7

The mod_rewrite module is enabled by default on CentOS 7. If you find it is not enabled on your server, you can enable it by editing 00-base.conf file located in /etc/httpd/conf.modules.d/ directory.

sudo nano /etc/httpd/conf.modules.d/00-base.conf

Add or uncomment the following line:

LoadModule rewrite_module modules/mod_rewrite.so

Save and close the file, then restart the httpd service:

sudo systemctl restart httpd

Enable .htaccess File

Once the mod_rewrite module has been activated, you can set up your URL rewrites by creating an .htaccess file in your default document root directory. A .htaccess file allows us to modify our rewrite rules without accessing server configuration files. For this reason, .htaccess is critical to your web server. Before we begin, we need to allow Apache to read .htaccess files located under the /var/www/html directory.

Read more

Share