Addition of amazon linux swap

  1. Create a file for swap sudo /bin/dd if=/dev/zero of=/var/swapfile bs=1M count=1024

  2. Set the swap file in the swap area sudo chmod 0600 /var/swapfile sudo /sbin/mkswap /var/swapfile

  3. Enable swap space sudo /sbin/swapon /var/swapfile

  4. Activate the swap area when the OS boots sudo vim /etc/fstab

Add the following

/etc/fstab


/var/swapfile swap swap defaults 0 0

Recommended Posts

Addition of amazon linux swap
Put Python3 in Docker container of Amazon Linux2
Meaning of Linux permissions
[Linux] Installation of nvm
OpenVPN Summary + Amazon Linux2
Announcing the availability of Java 11 LTS on Amazon Linux 2
Incremental backup of Linux (restore)
Summary of Linux distribution types
Put jenv on Amazon Linux
Install tomcat 5.5 on Amazon Linux.
Make Amazon Linux 2 (CentOS) GUI
Use sshpass on Amazon linux2
Install Homebrew on Amazon Linux 2
Japanese translation of Linux manual
A brief summary of Linux
Install strongSwan 5.9.1 on Amazon Linux 2
Run Amazon Linux 2 in VirtualBox
Meaning of Linux directory permissions
I tried to create an environment of MkDocs on Amazon Linux
Summary of installing PHP7.2 on EC2 (Amazon Linux 2) and setting php.ini
Prepare pipenv environment with amazon Linux 2
Install Python Pillow on Amazon Linux
Basic knowledge of Linux and basic commands
Confirm commit of Linux 5.7 Thermal Pressure ⁠
Installation of OMC Cloud Agent --Linux-
Install oracle java8 on amazon linux2
Try installing OpenAM on Amazon Linux
[linux] Swap Caps Lock and Ctrl
Completion of docker command on Linux
How to install wkhtmltopdf (Amazon Linux2)
Put only kubectl in Amazon Linux 2
Install pyenv on EC2 (Amazon Linux)
[Must-see for beginners] Basics of Linux
Introducing Amplify to Amazon Linux 2 AMI
List of frequently used Linux commands
[Note] Install Imagick on Amazon Linux2
Efficient use of Linux file system
[Note] Run Django on Amazon Linux 2
Replacement of strings containing Linux spaces
Run docker-compose on Amazon Linux2 on ARM64
Introduce Python 3.5.2 environment on Amazon Linux
[Excel] Addition of character strings (combination)
Run cron on Amazon Linux (set on Linux)
[Python/Django] Summary of frequently used commands (4) -Part 2- <Production operation: Amazon EC2 (Amazon Linux 2)>
[Python/Django] Summary of frequently used commands (4) -Part 1- <Production operation: Amazon EC2 (Amazon Linux 2)>
Run a batch of Python 2.7 with nohup on Amazon Linux AMI on EC2
The story of running the asp.net core 3.1 app on arm64 version Amazon Linux 2