Create Swap File in Redhat Enterprise Linux (Step By Step Procedure)

Опубликовано: 01 Январь 1970
на канале: Nehra Classes
3,882
69

Creating a Swap File in RHEL:

To add a swap file:
Determine the size of the new swap file in megabytes and multiply by 1024 to determine the
number of blocks. For example, the block size of a 64 MB swap file is 65536.

1. At a shell prompt as root, type the following command with count being equal to the desired
block size:
dd if=/dev/zero of=/swapfile bs=1024 count=65536

2. Change the persmissions of the newly created file:
chmod 0600 /swapfile

3. Setup the swap file with the command:
mkswap /swapfile

4. To enable the swap file immediately but not automatically at boot time:
swapon /swapfile

5. To enable it at boot time, edit /etc/fstab to include the following entry:
vim /etc/fstab
/swapfile swap swap defaults 0 0

6. The next time the system boots, it enables the new swap file.

7. After adding the new swap file and enabling it, verify it is enabled by viewing the output of
the commands:
cat /proc/swaps
or
free.

You have successfully created swap file in RHEL7/8.

Thanks for watching.
==========================================================

LVM:
   • Logical Volume Management (LVM) in Re...  

DNF/YUM:
   • Configure Local DNF / YUM Repository ...  

VNC:
   • Configure VNC (Virtual Network Comput...  


Смотрите видео Create Swap File in Redhat Enterprise Linux (Step By Step Procedure) онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Nehra Classes 01 Январь 1970. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 3,882 раз и оно понравилось 69 посетителям.