In this post, we will the tool split to break the larger file in smaller ones based on size, lines. Syntax:#split [options] filename prefix You can use the following options while splitting the file. -a –suffix-length=N use suffixes of length N (default 2) -b –bytes=SIZE put SIZE bytes per output file -C –line-bytes=SIZE put at…
Author: Naranthiran D
How to Setup Central Logging Server with Rsyslog
Rsyslog is user to aggregate the logs from n number of Linux servers and store it at one place. In Linux operating systems Rsyslog package is available by default. In order to check whether the package is installed run the following command. #rpm -qa | grep rsyslogrsyslog-8.24.0-34.el7.x86_64 Steps to Configure rsyslog server: The main rsyslog…
SAR tool to monitor/review Linux server performance.
What is sar? sar(system activity report) is a command which comes along with the sysstat tool. sar is one of the very useful commands for a system administrator to monitor the server statistics link CPU load average, memory usage, I/O wait, etc. Install and Configure Installing sysstat is pretty simple and is in the repositories…
How to Create and Manage Cron Jobs on Linux
Cron is one of the useful tools in Linux to automate commands/scripts. Cond Jobs can be scheduled on minutes,hours,days,months.days of the week. Cron jobs run in the background and constantly check the /etc/crontab file, and the /etc/cron.*/ and /var/spool/cron/ directories. [root@linux24x7 ~]# cat /etc/crontab SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root For details see man 4 crontabs Example of job definition: .—————-…
How to Setup NFS (Network File System) on RHEL/CentOS
NFS file systems are used to share the files/folders between Linux to Linux systems. Port 111 (TCP and UDP) and 2049 (TCP and UDP) for the NFS server. Installing and configuring NFS on Linux server and client. To set up an NFS share mount we will require a minimum two systems one as a server and another as a client….
How to auto mount LUKS encrypted partition using fstab at boot in Linux
In the previous post I have explained how to encrypt and mount a volume in Linux.In this post I will explain how to mount the encrypted volume automatically at boot. By doing this it will help us to reduce the down time while the server reboots. In this post I will mount the partition /dev/xvdb…
How to change a hostname on Redhat/CentOS 6&7 Linux
Hostname is the unique name assigned to the computer to identify over the network easily. To view the computer name in Redhat and CentOS 6/7 use the command hostname. #hostname linux24x7 In order to change the hostname in Linux, you should logged in as root user and follow the below steps. On CentOS/Redhat 6 #cd…
How to compress and rotate logs using logrotate tool
Log files are a set of records located in /var/log in Linux servers which help the administrators to keep track of important events. They contain messages about the server, including the kernel, services, audit, and applications running on it. The log file can grow rapidly based on the application you are using and which may consume more…
How to encrypt the volume in Linux
In this post we are going to encrypt a volume in Linux system.To encrypt the volume we will use LUKS(Linux Unified Key Setup) to encrypt the volumes. What is the use of Encryption? In order to secure the data stored in the HDD from physical HDD theft. For example if your laptop is stolen, and…
How to Create Partition in Linux using fdisk Tool
Fdisk command is used to create partition in Linux with the partition size less than or equal to 2TB. Fdisk command does not support partition greater than 2TB. If your partition size is greater than 2TB you need to parted command . fdisk -l Command is used to list all the existing partition in Linux system….