LoginSignup
0
3

More than 5 years have passed since last update.

linuxサーバにスワップ領域を追加

Last updated at Posted at 2017-10-24

EC2の検証環境に(rails)アプリケーションデプロイ時、メモリが足らなくなってbundle installでコケることがある(Cannot allocate memory)。
そのためスワップ領域を追加する。
ec2再起動時などにやる。
ec2にsshして行う。

# dd if=/dev/zero of=/swapfile1 bs=1M count=512
# chmod 600 /swapfile1
# mkswap /swapfile1
# swapon /swapfile1

確認

$ swapon -s

参考)

0
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
3