Category: Linux

virt-what: Check if your remote server runs in virtual environment

virt-what - detect if we are running in a virtual machine
Have you ever wondered if the server you bought at the hosting provider is in fact a dedicated server or just a VPS and what is the underlying virtualization environment your server runs on?
virt-what provides us the ability to detect if we are running in a virtual machine or on bare-metal (real hrdware). virt-what detects common types of virtualization: hyperv, kvm, openvz, qemu, virtualbox, vmware, xen, etc…
Read More

Scan Remote Host for Open Ports using nmap Port Scanner

Extend LVM Volume Group
nmap (Network Mapper) is an open source tool for network exploration and security auditing and a powerfull port scanner. It can be used locally on localhost as netstat alternative, but it’s main use case is to scan remote hosts for open ports, system type, running services, etc…
Read More

Linux cp mv overwrite without prompt (disable interactive mode)

Linux cp mv disable prompt
Some Linux distributions (for example: RedHat) have aliases configured in the system, especially for root user, which modify basic command line operations like: cp, mv by adding “-i” parameter to prevent user from accidental overwriting or deleting files (interactive mode). This can be disturbing, especially when we are dealing with many files at a time. To get rid of this issue we can modify aliases in the system to disable interactive mode.
Read More

Encrypt Linux Partition using LUKS cryptsetup

encrypt linux volume using luks cryptsetup
LUKS (Linux Unified Key Setup) is encryption standard designed for Linux to encrypt Linux volumes or partitions. The implementation of LUKS is based on cryptsetup script as a basic disk encryption backend tool.

In this tutorial we will create Linux partition on KVM based CentOS 7, encrypt partition using LUKS cryptsetup and mount it permanently in particular mount point.
Read More

Extend LVM Volume Group with the new Hard Disk

Extend LVM Volume Group
One of the benefits of LVM (Logical Volume Manager) is the possibility to extend LVM based storage by adding new Physical Volumes which together form LVM Volume Group. Adding new Physical Volume increases the capacity of the whole Volume Group by the capacity of that particular Physical Volume and can be performed online without any outages in LVM activity.
Read More

Backup and Restore Logical Volume using LVM Snapshot

Backup Restore LVM using Snapshot
LVM (Logical Volume Manager) gives us the ability to create Snapshots. LVM Snapshot is a logical volume that temporarily preserves the original data of changing logical volume, so it’s data can be backed up preserving consistency. Snapshot must be created prior to any critical modifications on the Logical Volume in order to fulfill it’s role.

Note: Snapshot Volume needs to be large enough to store the data that will change while it exists. If more data changes than the Snapshot can hold, the Snapshot will become unusable. That means we have to “predict” how much data will be changed on the original Volume while the Snapshot exists to let the Snapshot hold all those data changes.
Read More

Install Nagios Core from RPM on CentOS 7 / RHEL 7

nagios_logo
Nagios is a free software, which offers monitoring and alerting services for servers, switches, applications and services.

This tutorial describes simple Nagios Core and Nagios Plugins installation from rpm packages on CentOS 7 / RedHat 7. There is no need to configure and compile Nagios Core tar.gz based source files unless you really need the newest version.
Read More

Register Red Hat 7 using Subscription Manager via Proxy

Register Red Hat 7 using Subscription Manager via Proxy
Once our Red Hat 7 system is installed, it should be registered at RHN using Subscription Manager in order to be able to get newest updates. If the server is placed in network behind firewall and outgoing traffic is blocked by firewall, the only reliable way of keeping our Red Hat 7 up-to-date is through proxy (if any exists).
Below we will show you in 2 simple steps, how to configure HTTP Proxy for Red Hat Subscription Manager and register Red Hat 7 with RHN in command line using HTTP Proxy:
Read More

nethogs – Display Network Utilization per Process

ethernet_card
Have you ever wondered how to check network utilization by PID in Linux? Now it’s easy with nethogs application, which unlike other network utilization monitoring applications (nload, iftop) works like Linux top command, but displays network utilization per PID along with the network device used.

nethogs
Read More