How to find Harddisk UUID (Universally Unique Identifier) on linux?

What is UUID? UUID stand for universally unique identifier which is an identifier standard used in software construction, standardized by the Open Software Foundation (OSF) as part of the Distributed Computing Environment (DCE). UUIDs can be used to identify DVD drives, removable media (USB flashsticks) and each partition on any of your hard drives.

UUID is unique and never changes even if you switch the harddisk ordering. It is recommended to use UUID instead of traditional block name (/dev/hda1, /dev/hda5, /dev/sdb) to uniquely identify harddisk or other storage medium such as SAN, iSCSI, DAS, scsi disks volumes.

Continue reading

How to Backup and Restore MySQL Database Using mysqldump

Nowadays we store our web applications data in databases. Do you backup your databases? t is very important to make regular backups of your data to protect it from loss. I store all my web application data in to MySQL database, so i going t show how to backup and restore the data in your MySQL database.

There are 2 way to perform backup and restore MySQL database. The easier way to perform backup and restore MySQL databases is use phpMyAdmin. phpMyAdmin is open source GUI tool to manage MySQL databases. phpMyAdmin allows users to save database dump as file and import it. But it probably won’t be a good idea if your database size too huge.

Another method to perform backup and restore MySQL database is using mysqldump command. I prefer use mysqldump command to perform backup and restore MySQL database cause it easy to use it. I can done the backup and restore by just enter 2 command.

Using mysqldump, you can backup a local database and restore it on a remote database at the same time, using a single command.

How to backup MySQL database Continue reading

How to limit SSH access by IP Address

To Secure your Linux server and prevent attacks, you can limit SSHd to certain IP addresses by modify the /etc/hosts.allow and /etc/host.deny files

Below are the few steps :-

1) Open /etc/hosts.allow

Use the following command to open the hosts.allow file:

vi /etc/hosts.allow

Once this file is open, add the following line:

SSHD : ipaddress : ALLOW

2) Open /etc/hosts.deny

Use the following command to open the hosts.deny file:

vi /etc/hosts.deny

Once it opens, add the following line to the file:

SSHD : ALL : DENY

Save and exit, and you have successfully limited SSH access by IP address.