Monday, February 15, 2021

How to Clear RAM Memory, Cache, Buffer and Swap Memory in RHEL7 / CentOS7

 


1 => To check Memory utilization run below command and check .

#top 

or 

#htop 

or

#free -h


2 => To clear memory cache you can run below command .

# sync; echo 1 > /proc/sys/vm/drop_caches

: verify again 

#free -h 


3 => To clear buffers you can run below command.


# sync; echo 2 > /proc/sys/vm/drop_caches

check: 

#free -h 


4 => To clear memory, buffers and swap  in one command run.

# sync; echo 3 > /proc/sys/vm/drop_caches 

check :

#free -h 



Thanks 

Enjoy 

Saturday, February 6, 2021

My way to Install MySQL 5.7 on CentOS/RHEL 7/6 | Easy way to Install Mysql 5.7 on Centos 7

 

Step 1 – You have to enable MySQL Repository



-- To enable on CentOS and RHEL 7 -- 


# yum localinstall https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm


-- To enable on CentOS and RHEL 6 -- 


# yum localinstall https://dev.mysql.com/get/mysql57-community-release-el6-9.noarch.rpm



Step 2 – You have to Install MySQL 5.7 Server 

Use below command to install mysql server and all it's dependency 

# yum install mysql-community-server



After installing MySQL 5.7 Server default root password will be set to see detault pass you have to run below command .


# grep 'A temporary password' /var/log/mysqld.log |tail -1



Default password  you will get is Nm(!pKkkjo68e


Step 3- You have to  Start MySQL Service

To start mysql service you can use below command 

# systemctl status mysqld 

# systemctl start mysqld 
or 

# systemctl restart mysqld 


Step 4- You have to Enable MySQL Service


This command will make entry to enable mysql service on boot 


#systemctl enable mysqld 

Step 5- You have to do Initial MySQL Configuration


# /usr/bin/mysql_secure_installation


Step  6– Now you can Login to MySQL

# mysql -h localhost -u root -p 



Step 7 – Check MySQL Version


# mysql -V




For Mysql Management Click Here



Enjoy 

Mastering Cron Jobs in Linux: A Comprehensive Guide with Examples

Introduction: Cron jobs are an indispensable tool in the world of system administration and automation. They allow users to schedule tasks t...