Hero Image

Manually adding swap and activating on linux

Create swapfile

sudo install -o root -g root -m 0600 /dev/null /swapfile

Write out a 4GB file named ‘swapfile’

dd if=/dev/zero of=/swapfile bs=1k count=4096k

Let linux know about swap file

mkswap /swapfile

Activate swap

swapon /swapfile

activate swap also after boot. Add to the file system table

echo "/swapfile       swap    swap    auto      0       0" | sudo tee -a /etc/fstab

Other Related Posts:

Kubernetes setup on ubuntu 16.04

Master: Install dependencies

apt update && apt upgrade -y
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -

cat < /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF

apt-get update
apt install linux-image-extra-virtual c...

Read more

6th Mar 2019

Install RabbitMQ on Almalinux 8

Install RabbitMQ on CentOS 7

sudo dnf install epel-release
sudo dnf update

Install Erlang

Add repository

sudo dnf install https://packages.erlang-solutions.com/erlang-solutions-2.0-1.noarch.rpm

Install erlang and dependencies

sudo dnf install erlang socat logrotate

Install RabbitMQ

A...

Read more

29th Dec 2022