Nmon is a resource
monitoring tools designed for use on Linux which can monitor CPU, Memory,
Disks, Network and File systems. You can easily monitor your system's CPU
usage, memory, network, disks, file systems, NFS, top processes, resources and
power micro-partition information using nmon.
Tuesday, 25 December 2018
Saturday, 22 December 2018
How to configure HAProxy to redirect multiple domains
Follow the below
steps to configure HAproxy to redirect multiple domains.
Thursday, 20 December 2018
How to disable Server Signature using .htaccess
In the default
configuration of Apache, it shows sensitive server information like Apache
version, Operation System version etc. Attackers can use sensitive server
information to their advantage when performing an attack. You can Disable
Server Signature by editing .htaccess file to hide such sensitive information.
Saturday, 15 December 2018
Apache SSL Certificate expiry monitoring With Nagios
Nagios plugin
“check_http” provides SSL Certificate monitoring to check certificates
expiration dates and Nagios generate alerts when SSL certificates near their
expiration date. So the same can renew their certificates before problems
occur.
Thursday, 6 December 2018
Monday, 19 November 2018
How to change password for a MySQL user
Follow the below
MySQL commands to reset the password for a MySQL user. You can change the
password for any other users as well with the below commands.
Sunday, 18 November 2018
How to configure apache mod_status module in CentOS 7
Apache module
mod_status is an open source module that allow to monitoring web server load,
statistics, current state including worker processes and active connections.
How to Block a specific IP Address using Routing Table in CentOS 7
The Linux routing
table can block the incoming connection to prevent the Denial of Service (DoS)
and save resource utilization. The Linux routing tables can used to block such IP
addresses or whole subnet with reject route and null route.
Thursday, 15 November 2018
How to Zip and unZip Files to a specific directory in CentOS 7
Zip is a simple and
commonly used utility for compression and decompression folders that can
compress from level 1 to 9.
How to create Database Dump with routine, triggers and procedures using MySQLDump
Mostly, MySQLDump is used for taking backup of MySQL data backups.
MySQL provide a mysqldump scripts with the multiple options to take dump of
MySQL Databases. MySQLDump will take backup by default of all
the triggers but not the stored procedures and functions.
How to create Database Dump using MySQLDump
Mostly, MySQLDump is used for taking backup of MySQL data backups. MySQL provide a mysqldump
scripts with the multiple options to take dump of MySQL Databases.
Sunday, 11 November 2018
How to copy data from AWS instance using Rsync in Centos 7
Rsync is open
source software that used to synchronize files/folders from local to local
computers and remote computers as well over SSH with compression and encrypted
files.
Saturday, 10 November 2018
How to enable SCL Repository in Cent OS 7
The Software Collections
(SCL) repository is created to provide safely installation on Cent OS and RHEL
and also provide installation of multiple software versions on the same
machine. The SCL is available yum default repository on Cent OS 6.5 and later.
Thursday, 8 November 2018
How to Change Default MTA in CentOS 7
If there is two or more programs (sendmail,
postfix, SSMTP and exim etc) are installed for MTA and required to change
default MTA. CentOS 7 provide alternatives command to select a default MTA.
Change Default MTA: Run the below command and follow instructions to
change default MTA:
[root@linuxcnf ~]# alternatives
--config mta
There is 1 program that provides
'mta'.
Selection Command
-----------------------------------------------
*+
1 /usr/sbin/sendmail.postfix
2 /usr/sbin/sendmail.ssmtp
Enter to keep the current selection[+],
or type selection number: 2
[root@linuxcnf ~]#
|
There are 2 programs which provide 'MTA'. Enter
number 2 and press enter for ssmtp selection as a default MTA. Also stop the
postfix service and disable to start on boot up.
Wednesday, 7 November 2018
How to Install and Configure SSMTP in CentOS 7
SSMTP is a very simple and useful alternative of send mail and postfix. It
provides the functionality to send mails via the standard user/agents and
authentication with valid mail account to send mails. It is used to send mails
on local and external domains.
SSMTP is available in EPEL repository (Extra Packages for
Enterprise Linux) for CentOS 7.
Tuesday, 6 November 2018
How to Encrypt/Decrypt Files in CentOS7/RHEL7 using Ccrypt
Ccrypt is a command
line utility for encryption and decryption of files and streams in Linux
[CentOS 7]. It is a light weighted tool and available in EPEL repository (Extra Packages for Enterprise Linux) for
Cent OS 7 and RHEL.
Monday, 5 November 2018
How to install Ccrypt in CentOS 7 / RHEL 7
Ccrypt is a command
line utility for encryption and decryption of files and streams in Linux
[CentOS 7].
Sunday, 4 November 2018
How to add Linux Host to Nagios Monitoring Server in CentOS 7
Nagios plugins and NRPE are available for
Cent OS 7 and RHEL in EPEL repository (Extra Packages for Enterprise Linux).
How to create separate system user account in AWS EC2 instance
Login to the
instance and switch to the root user:
How to Generate SSH Keys pairs using command line in Centos 7
Ssh-keygen is command line tool for creating authentication key pairs for SSH Key based authentication. Private Key is used for client and the public key need to upload on server.
How to Use Screen command in Centos/RHEL
Screen utility
allows running multi-tasking environment and keeping processes running in the
background. By default, package is not available in CentOS distribution. Follow
the below article to installed.
Sunday, 21 October 2018
How to enable/disable services on boot up in Centos7/RHEL7
In Centos 7 and RHEL 7, the systemctl command added to manage all
services.
Friday, 19 October 2018
How to install lsyncd on CentOS 7 / RHEL 7
lsyncd is an rsync-based tool that is used to sync or replicate files
& directories locally and remotely. It is sync changes or
modification in a file and directory to the remote or local destination in a specific
time interval.
Monday, 15 October 2018
How to install rsync utility in Centos 7
Rsync is open
source software that used to synchronize files/folders from local to local
computers and remote computers as well over SSH with compression and encrypted
files.
How to use rsync utility in Centos 7
Rsync is open
source software that used to synchronize files/folders from local to local computers
and remote computers as well over SSH with compression and encrypted files.
How to analyze memory usage using SAR command
Sar command with option “-r” to generate memory usage
report. %kbmemfree, %kbbuffers and %kbcached are the overall memory used
including RAM & Swap. Its shows values at every interval or required time
interval.
Friday, 12 October 2018
How to change default Kernel in CentOS 7
In Centos and RHEL
7 systems, the GRUB2 is the most common and default boot loader and grub2-mkconfig
utility can use to make any changes in grub configuration.
Tuesday, 2 October 2018
How to configure proxy settings with user authentication in CentOS 7
Set the following
proxy environment variables in CentOS server to use a proxy on the Linux
command-line if the internet connection is behind a proxy:
How to configure proxy settings in CentOS 7
Set the following
proxy environment variables in CentOS server to use a proxy on the Linux
command-line if the internet connection is behind a proxy:
Sunday, 23 September 2018
How to fix Authentication refused: bad ownership or modes for directory
This is common
issue faced while configuring public-key authentication for other users.
Incorrect permission on $HOME/.ssh/ directory and $HOME/.ssh/authorized_keys is
root which cause permission denied.
Saturday, 22 September 2018
How to install Screen utility in CentOS 7
Screen utility
allows running multi-tasking environment and keeping processes running in the
background. By default, package is not available in Centos distribution. Follow
the below article to installed.
How to enable timestamp in command history CentOS 7
By default, time
stamp information is not associated with executed history commands. To enable
the time stamp on every bash command follow the below steps:
Thursday, 20 September 2018
How to enable and disable GitLab services during start up in CentOS 7
Run the following
command to disable GitLab services on startup.
How to enable Multiple PHP versions for websites in CentOS 7
Follow below steps
to enable PHP 7.2 for a particular website:
Saturday, 15 September 2018
How to Install MySQL Server 5.7 on CentOS 6
MySQL Community
Server is an open source free database management system. It uses a relational
database and SQL (Structured Query Language) to manage its data.
How to Start/Stop MySQL Server in CentOS 6
The service and
chkconfig script are used to verify all the services whether it is running or
stopped and enable or disabled at startup.
How to resolve “Too many connections” Error MySQL
The “too many
connections” error occur when maximum number of clients may be connected to the
server has been reached maximum number of connections that are allowed in MySQL
configuration. The default value is 151 for the variable max_connections in
MySQL.
How to Change Password for a User in MySQL 5.6
MySQL provides
UPDATE and other statements which can use to change the password of a MySQL
user. This tutorial will describe how to change password of a MySQL user using
UPDATE statement.
Sunday, 9 September 2018
How to create database user account in MySQL
MySQL provides the
CREATE USER statement that allows creating a new user account.
How to Grant Privileges to a User in MySQL
To grant privileges
to a database user account, the GRANT statement can use to provide requires
access grants to the user.
Revoking Privileges from Users Using MySQL REVOKE
To revoke
privileges from a user account, the MySQL REVOKE statement will use to revoke
the access/grants one or more privileges or all privileges from a user.
How to delete a Samba user in Centos 7
Use the following
commands to delete the samba user. Also need to delete to OS user from the
server:
How to add a samba user in Centos 7
To allow access in
samba share directory, first need to create a local/OS user account (If already
not exist) and then create a samba password for the same account for samba
user.
How to disable the Apache default welcome Page in CentOS 7
Post apache (httpd)
installation, a default Welcome Page created inside apache document root
directory or /etc/httpd/conf.d/ directory.
Saturday, 8 September 2018
How to Redirect HTTP to HTTPS on Apache
Before setting up
an Apache HTTP to HTTPS redirect for a site, make sure a SSL vhost already
created and mod_rewrite module is loaded in Apache.
How to add SSH public key to the Server in Centos 7
In key-based
authentication, we need to generate SSH key pairs and the pair use for
authentication. The private key is used for client machine and public key
uploaded to the remote machine.
Wednesday, 15 August 2018
How to enable SSL Certificate for Apache CentOS 7/ RHEL 7
SSL (Secure Sockets
Layer) is a cryptographic protocol that is used to send secure and encrypted
traffic between server and client.
How to install Apache web Server on CentOS 7/RHEL 7
The Apache web Server
is an open source web server to serve the hosted web pages and contents. It
runs on Unix-like operating systems including Linux and Windows OS. It is available on CentOS 7/ RHEL 7 default
repositories.
How to Set Password Never Expire in CentOS 7
By default, user
accounts take aging details mentioned in /etc/login.def configuration file if
the password policy are already applied then we need to set user account and
password never expire using chage command.
Monday, 6 August 2018
How to upgrade Clam AV with latest version clamav-0.100.1 on Linux
Clam AV is an open source antivirus engine for detecting
Trojans, viruses, malware & other malicious threats. It provides a number
of utilities including a multi-threaded scanner
Friday, 3 August 2018
How to Check Linux System Reboot Date and Time
There is another
command “who” to check last reboot date and time on Linux Systems. The “who”
command is by default installed on most of the Linux distributions. Use the
‘who -b’
Monday, 30 July 2018
How to add rules in Firewall Exception in CentOS7
Firewalld is a
firewall management tool available by default on CentOS 7 servers. It provides
command line and graphical interfaces and is available in the repositories of
most Linux
Saturday, 28 July 2018
Alfresco: Reset the administrator password
Reset the admin
password: In the default alfresco installation, the authentication mechanism
users and passwords are stored locally in the Alfresco PostgreSQL database.
How to compile and install the latest Clam AV antivirus on Linux
Clam AV is an open
source antivirus engine for detecting Trojans, viruses, malware & other
malicious threats. It provides a number of utilities including a multi-threaded
scanner daemon,
Saturday, 7 July 2018
How to find out OS version of Oracle Linux
How to get the
version/distribution/ release information of Linux that is running Oracle Linux
via command line?
Thursday, 5 July 2018
How to install perl-Switch package in RHEL7
perl-Switch
package is not available in RHEL7 default
repository “rhel-7-server-rpms/7Server/x86_64”. Install the
perl-Switch package by enabling RHEL Optional repository
Sunday, 1 July 2018
How to Install Clam AV on RHEL 7/CentOS 7
Clam AV is an open source antivirus tool
for Linux. Clam AV is used widely for detecting Viruses, Trojans, malware and
other malicious threats on Linux.
How to fix df –h command hangs on RHEL7/Centos7
The most
common cause of df -h command hanging while reading related files to return
output and fails without output.
Sunday, 17 June 2018
How to Install Ansible on CentOS 7
Ansible
is a free and open source Configuration and automation tool. We can manage a
large number of client machines from a central machine. It communicates over
SSH and it doesn’t
How to find out top 10 CPU and Memory Consuming Process in Linux
In this
article, we will show how to find out the resource consumption in a Linux box
to figure out the exact issue? “ps” command is a most powerful and popular to
achieve our requirements.
Monday, 14 May 2018
How to resolve wget: command not found
wget
command: It is a command-line utility and used to
downloads files over a network. wget is a free utility to
download files and available most of the Linux distributions.
How to rebuild corrupt RPMDB in Centos 6
While, working with rpm or yum package management tools in
Centos 6 and getting rpmdb database is corrupted. Follow the below steps to
resolve the database issue.
How to change database directory in MySQL server
Sometime, we need to change MySQL data directory due to low
space on the file system, save the actual data on any dedicated partition or
any network drives and enhance MySQL database performance etc. Mostly in
Linux based servers, MySQL uses /var/lib/mysql directory as default data
directory. Before do anything, take a cold backup or use MySQL dump to
take backup for databases. To change database location please follow these
steps:
How to zip and compress a directory/file in Centos7
In this
article, we are using tar utility for zipping directory or files. This utility
is installed by default on most of Linux distributions. The tar utility is
capable to create zip file and compress the same as well.
How to check PHP version in Centos 7
To verify
the installation and version of installed PHP by checking the version of PHP
using command or inbuilt phpinfo() function in php.
How to zip/unzip the directory in Linux with command line
This
article will describe, how to zip and unzip a directory and directory in Linux
using command line. Zip is a compression and file packaging utility which is
available for Linux, UNIX, Windows and various Operating systems.
How to install zip/unzip package in Linux Centos 7
Zip
is a compression and file packaging utility which is available for Linux, UNIX,
Windows and various Operating systems. This article will describe, how to install
zip/unzip packages in Linux Centos 7.
Saturday, 5 May 2018
How to install Nginx web server in Centos 7
Nginx is
a free and open source high-performance web server and also it is use for
reverse proxy. This article will describe installation of Nginx server on a
CentOS 7 using EPEL repository.
How to enable IP masquerading/forwarding on CentOS 7
By default, the IP
masquerading/Forwarding is disabled most of the Linux distributions. The IP
forwarding is required for LVS router to forward network packets properly to
the real servers and it should be enabled on each LVS router node on in the
kernel level.
Friday, 4 May 2018
How to resolve Clam AV Error while updating virus database
Clam AV
fails to start after update to v0.99.4. After the update and getting the below
error:
Thursday, 3 May 2018
How to fix - ‘Ifconfig’ Command Not Found on CentOS 6.x
The
network command line tool ifconfig is not installed by default on CentOS 6
Linux minimal installation. ifconfig command is available for most of the Linux
distributions and can be installed from default repository. Follow the below
steps to get installed the ifconfig command in centos 6.x.
Wednesday, 2 May 2018
How to disable remote SSH login for the root user
By
default the root access is enabled for outside world. For security reason it’s
not a good idea because any cracker can attempt to brute force your root
password and potentially get access to your system if they can figure out your
password.
It’s much
better to disabling the root user and allowing another regular user with root
user’s permissions.
How to add user with sudo privileges in Linux
Add a
user with administrative privileges that can ssh into the server and switch to
on root user using sudo.
Sunday, 29 April 2018
How to Set the Time zone in Centos 7/ RHEL 7
By
default, In the Centos 7 the time zone will be set to UTC time, so need to
change to the time zone according to our setup / site NTP server.
How to configure the Static IP Address on Centos7/RHEL7 Server
To
configure the static IP address, Route and DNS to the Linux box Centos 7, edit
the interface configuration file under /etc/sysconfig/network-scripts/
directory and append the below line in the end the file:
How to rename a network interface on Centos/RHEL 7
In Centos
/ RHEL 7, a new NIC naming scheme is the predictable naming rule is adopted by
default like ens192, enp3s0 and eth0 so on. To disable the predictable naming
rule we can pass "net.ifnames=0" kernel parameter during boot.
Thursday, 26 April 2018
How to restore Database Backup in MySQL
If we
have a saved MySQL database taken using mysqldump script, use the following
command to restore the backup in MySQL database.
How to install Gnome GUI on CentOS 7/RHEL 7
By
default, CentOS 7/ RHEL 7 installed as the minimal and also system
administrators like to work in a terminal. However if we have installed
CentOS7/RHEL7 without the GUI we can always install on the minimal server
installation.
Monday, 23 April 2018
How to Take Backup of a specific Table in MySQL
Sometimes,
there is a requirement to make a backup of a specific table in
MySQL. The complete database backup could take more time to complete.
Instead of backing up the entire database, we can make the backup of a single
table using mysqldump.
Wednesday, 18 April 2018
How to disable Network Manager on Centos7/RHEL7
The
Network Manager Service is enabled by default on Centos7/RHEL7 installations.
Network Manager is not suitable for advanced networking setup, such as
configuring network bridge, aliases, Open Stack networking, forwarding network
traffic, etc.
Tuesday, 17 April 2018
How to Setup Network Bridge with NIC bonding in RHEL7/Centos7
Network
Bridge: A software bridge can be used within a Linux host in order to
emulate a hardware bridge. This network bridge allows virtual machines to have
access to the external network and vice-versa and allow communicating between
different Network VLANs [Trunk VLANs].
Saturday, 7 April 2018
How to reset MySQL root password in Linux
If you
encounter problems when you try to connect to the MySQL server and you don’t
have root password to login in MySQL.
How to configure SFTP Server on Centos7/RHEL7 - One user
SSH File Transfer Protocol (SFTP) is
application protocol designed to allow easily transfer files between computers.
Many users prefer to use SFTP. SFTP provides file access, transfer, and
management tools that resemble FTP through a secure SSH connection. However,
SFTP is not merely FTP over SSH. Instead, it is an entirely
separate protocol.
How to find out version of Amazon Linux AMI
How to
get the version/distribution/ release information of Linux that is running on
the EC2 instance running Linux via command line?
How to find out OS version in Centos7/RHEL7
How to
get the version/distribution/ release information of Linux that is running
Centos7/RHEL7 via command line?
Saturday, 31 March 2018
How to fix SSH vulnerabilities: HMAC algorithms and CBC Ciphers in CentOS 7
SSH
Protocol: Enable protocol version 2: Uncomment Protocol 2
in /etc/ssh/sshd_config as below:
How to fix SSH vulnerabilities: HMAC algorithms and CBC Ciphers in CentOS 6
SSH Protocol: Enable protocol version 2
How to install EPEL repository on Centos7
The EPEL repository
is an additional package repository that provides useful software packages that
are not included in the official Centos or Red Hat repositories and easy access
to install packages for commonly used software.
How to Set Password Policy on CentOS7/RHEL7
Password
Policy for user accounts is one of the most important parts in Server
Administration. The maximum number of days allowed, minimum number of days
allowed, and number of warning days before the password expires refers to
password aging, same as the number of characters needed to have for the
password to be allowed refers to password length. Centos 7, Red Hat 7 and
most of Linux distribution is the ability to manage and implement the password
policies.
How to configure Rsyslog - Client configuration
Install rsyslog package using below
command, if not available on the client:
Friday, 30 March 2018
How to Disabling all SSL/TLS Protocols except TLSv1.2 in CentOS7/RHEL7
Secure
Socket Layer (SSL) and Transport Layer Security (TLS) are both cryptographic
protocols providing encrypted and secure communication between servers, clients,
machines and applications operating over a network.
Wednesday, 21 March 2018
How to join CentOS7/RHEL7 to Active Directory using Winbind
We can integrate a Linux host with Windows Active
Directory domain controller for authentication purpose. To complete the
scenario, we have Centos / RHEL 7 servers and existing Active Directory domain
controller. Also required AD administrator account or user has sufficient
rights to join AD.
How to fix CIFS Error Mount: wrong fs type, bad option, bad superblock while mounting windows share Drive
Not able to mount CIFS share on client getting error "mount:
wrong fs type, bad option, bad superblock"
Monday, 12 March 2018
The client must use SMB client signing for connecting to samba servers using smbclient
Packet
signing can prevent man-in-the-middle attacks which modify SMB packets in
transit. SMB Signing is a feature through which communications using SMB can be
digitally signed at the packet level. Digitally signing the packets enables the
recipient of the packets to confirm their point of origination and their
authenticity.
Thursday, 8 March 2018
How to print Number of Processing Units - nproc
The nproc command just prints out the number of processing units
available. Note that the number of processing units might not always be the
same as number of cores.
How to change the SSH Port in Linux distribution
We
can change the default SSH port in Linux distribution as an added security
concerns.
How to install and use tcpdump command on Centos7/RHEL7
TCPDump
is a command line packet sniffer/ packet analyzer tool which used to capture or
filter TCP/IP packets that received or transferred over a network on a
specific interface.
Wednesday, 31 January 2018
Nagios Plugins: Can’t locate utils.pm in @INC
In
nagios plugins written in perl, you got the following error while trying to use
a nagios.
Error: Table is marked as crashed and should be repaired
If
you are getting the following error message:
Subscribe to:
Posts (Atom)