Author: Rahul

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

MySQL is a Relational Database Management System, widely used as a database system for Linux systems. This article will help you to calculate the size of tables and database in MySQL or MariaDB servers though SQL queries. MySQL stored all the information related to tables in a database in the information_schema database. We will use the information_schema table to find tables and databases size. Check Single Database Size in MySQL This query will calculate the size of the single database in MySQL server. Please change ‘mydb’ with your actual database name. SELECT table_schema “Database Name”, SUM( data_length + index_length)/1024/1024 “Database…

Read More

In the world of Linux, efficient system performance is a key objective for administrators and users alike. A critical aspect of maintaining this performance is managing the system’s cached memory and buffer cache. These components are designed to store frequently accessed data and instructions, reducing the time it takes to access them from disk. However, over time, the cache can accumulate data that is no longer needed, potentially leading to reduced system efficiency and performance issues. This guide provides instructions on how to clear the RAM memory cache on Linux/Unix systems using command-line methods. How to Clear RAM Cache in…

Read More
PHP

The PHP Composer is a package management tool for PHP similar to NPM for Nodejs and bundle for Ruby. Using the composer tool we can define required libraries for our project and install it with the composer in the single command. We don’t need to search for each library to install. This tutorial helps you to install and configure PHP composer on Ubuntu 19.10, Ubuntu 18.04 LTS, and Ubuntu 16.04 LTS systems. 1. Prerequisites Shell access to a running Ubuntu system with sudo privilege. PHP must be installed and configured, version 5.3 or higher. 2. Install Composer on Ubuntu To…

Read More

When a system runs out of memory, the operating system will begin to swap or page out memory pages to persistent storage such as a disk drive. This is because virtual memory is faster than physical memory and itโ€™s cheaper to store data on disk rather than RAM. When you have more free disk space, you can add additional swap space so your OS has an additional location to store temporary data when necessary. If your server does not have enough physical memory for all the processes that need it, some of them may be forced to use virtual memory…

Read More

Swap is very useful for that system which required more RAM that physical available. If memory is full and system required more RAM to run applications properly it check for swap space and transfer files there. In general terms, swap is a part of the hard disk used as RAM on the system. I have a virtual machine running which don’t have swap on it. Many times services got crashed due to insufficient memory. In this situation creation of Swap file is better to keep them up. This article will help you to create a swap file on Linux system…

Read More

Binary log files contains data about modification’s make by MySQL server. You can see there are multiple binary files will be available on your MySQL server and there will be one .index file which contains names of all binary files to keep track of them. Step 1. List Binary Files First list binary log files in your system and find out how old binary log files you want to delete. These files generally located under /var/lib/mysql directory. # ls -a /var/lib/mysql … -rw-rw—- 1 mysql mysql 3800220 Jul 21 15:15 mysql-bin.000733 -rw-rw—- 1 mysql mysql 1076727 Jul 21 15:40 mysql-bin.000734…

Read More
Resizing Root Volume on Ec2 Linux Instance AWS

In the fast-paced world of cloud computing, the ability to dynamically adjust resources to meet the evolving needs of applications is crucial. “Expanding Your Horizons: How to Resize the Root Partition on AWS Linux Instances” serves as an indispensable guide for AWS users seeking to harness the power of flexibility and scalability. This comprehensive tutorial delves into the innovative capabilities of AWS Elastic Volumes, a game-changing feature that allows for the modification of volume attributes in real time, without impacting application performance. Designed for developers, system administrators, and IT professionals, this guide illuminates the path towards seamless storage management. Whether…

Read More

For security purposes many times we required to restrict or allow for SSH access for specific Users or Groups. To make any changes edit OpenSSH configuration file /etc/ssh/sshd_config and do required changes for allowing or denying any user or group. Allow/Deny Users and Groups: To allow or deny any user or group on OpenSSH, first edit configuration file /etc/ssh/sshd_config in your favorite editor and do changes as following examples. 1. Deny Users: To restrict for block specific user for SSH on server add the following rules. For example to restrict users raj, tyler and sarah. DenyUsers raj tyler sarah 2.…

Read More

Rsync (Remote Sync) is a command-line tool for synchronizing files between two Unix-based systems. Rsync can also be used on the same system to synchronize files between two directories. Rsync uses a smart algorithm to send only the differences between source files and existing files to the destination. This means it uses less data on the network to save bandwidth. Rsync is usually used for backing up large amounts of data or transferring data between two computers. It supports syncing files from local to local, local to remote, and remote to local. However, it does not support remote to remote…

Read More

Rake provides an efficient way for managing database changes. We can easily migrate database changes to servers using command line utility. In this article you will find some quickly uses of rake commands for database migrations. rake db:create This command will take all database configuration from config/database.yml file and create appropriate database of current environment’s database. $ rake db:create RAILS_ENV=development rake db:migrate The creates tables in database. It takes all files under db/migrate/ directory and execute one by one from older to newer files. $ rake db:migrate RAILS_ENV=development rake db:drop This drops the database for the current environment. $ rake…

Read More