How to see time stamps in bash history?

Is there any way I can see at what time the commands were executed from the bash history? We can see the order but is there any way I can get the time also?

Bottom-Line: Execution time in the Bash history:

HISTTIMEFORMAT="%d/%m/%y %T " # for e.g. “29/02/99 23:59:59”
HISTTIMEFORMAT="%F %T " # for e.g. “1999-02-29 23:59:59”

To make the change permanent for the current user run:

echo 'HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bashrc # or respectively
echo 'HISTTIMEFORMAT="%F %T "' >> ~/.bashrc
source ~/.bashrc

To test the effects run:

history
Share

Softether on VPS Using Local Bridge

Problem on SecureNAT

SecureNAT is a fairly simple way to setup Softether. You don’t need a lot of sysadmin skill and network understanding in order to get Softether up and running.

The problem is SecureNAT is a bit SLOW. I will show a comparison at the end of this article.

We can boost the performance using a local bridge.

Softether using local bridge

To start with you need Softether installed and setup. You can follow the guide on Softether on VPS

Just skip the last step “Enable the Virtual NAT”

Local bridge Setup

Network setup

  • VPN Server IP: 192.168.7.1
  • VPN Client IP Range: 192.168.7.50-192.168.7.60
  • Tap Device name: tap_soft

From here we go to the “Local Bridge Setting”

Read more

Share

Customizing Jitsi Meet

Edit Logo Image:

In your jitsi-meet deployment, probably in /usr/share/jitsi-meet/images the image file will exist that you can override with your own.

Update Link on Logo:

You can edit:
Path: /usr/share/jitsi-meet
File: interface_config.js
Parameter: JITSI_WATERMARK_LINK:
or SHOW_WATERMARK_FOR_GUESTS: false

Change texts of Welcome/Home Page:

Read more

Share

Build a Public NTP Server

Install NTPd and Configure NTP server for time adjustment.

[root@dlp ~]# yum -y install ntp
[root@dlp ~]# vi /etc/ntp.conf
# line 18: add the network range you allow to receive requests publicly
restrict 0.0.0.0 mask 128.0.0.0 nomodify notrap

# change servers for synchronization

#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
server bsti1.time.gov.bd iburst
server bsti2.time.gov.bd iburst
[root@dlp ~]# systemctl start ntpd
[root@dlp ~]# systemctl enable ntpd

If Firewalld is running, allow NTP service. NTP uses 123/UDP.

Read more

Share

Large Database Import Progress Using PV

PV can report progress for large data imports. In this example I will use a large (7 G) install on Ubuntu. First, download PV (http://linux.die.net/man/1/pv)

sudo apt-get install pv

A traditional mysql import may be formatted as:

mysql -u USER -p DATABASE_NAME < DUMP.mysql

but to leverage PV, pass the dump file ,then pipe the mysql command specifying the database with -D flag:

pv DUMP.mysql | mysql -u USER -p -D DATABASE_NAME

Your import will report progress and an ETA 🙂

Share

Installing Manageengine Opmanager 12 standar/pro edition on Linux Centos 7

Lately for a project needed to install opmanager for a specific client. The installation is quite straight forward on a fresh installation of Centos 7 Box. Assuming you already have a linux installaiton file (ended with .bin) file. So here it goes-

Installing OpManager on Linux using Console mode / Silent mode
This is a quick walk-through of the console mode installation of OpManager on a Linux box – an easy thing to do if you are working on a Windows box and want to install on a remote Linux system.

Prerequisites

To begin with, make sure you have downloaded the binary for Linux. (https://www.manageengine.com/network-monitoring/download.html)

Steps to install

Step 1: Execute the binary with administrator privileges (sudo) and -i console option.

Read more

Share

Let’s Encrypt for cPanel Installation

Option-1

Let’s Encrypt for cPanel Installation using Installing the cPanel Plugin

Log into your SSH client at root level, then add the Let’s Encrypt repository with the following command:

cd /etc/yum.repos.d/ && wget https://letsencrypt-for-cpanel.com/static/letsencrypt.repo

Next, install the plugin for cPanel with line below and yum:

yum -y install letsencrypt-cpanel

The installation process usually takes about a minute. If all goes well and the installation was successful, a test should run automatically. If it renders similar messages as the example below, you’re good to go:

le-cp self-test
[SELF-TEST] Can read config ............ SUCCESS.
[SELF-TEST] Can connect to daemon and check licence ............ SUCCESS.
[SELF-TEST] Can connect to Lets Encrypt ............ SUCCESS.
[SELF-TEST] Can talk to WHM API ............ SUCCESS.
[SELF-TEST] Can talk to plugin RPC ............ SUCCESS.

You can log in to your cPanel account and install your first SSL certificate.

Installing a Certificate
Once you’re logged into cPanel, you should see a Let’s Encrypt for cPanel button under Security. Click on it to access your active domains list to install a certificate.

Read more

Share