4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

スワップ領域の作成

4
Last updated at Posted at 2015-01-09

ここでは1GBのスワップ領域を作成する。

作成前

# free -m
             total       used       free     shared    buffers     cached
Mem:           992        274        717         12          0         78
-/+ buffers/cache:        195        797
Swap:            0          0          0

スワップ領域の作成

# dd if=/dev/zero of=/swapfile bs=1M count=1024
# mkswap /swapfile 
# swapon /swapfile 

作成後

# free -m
             total       used       free     shared    buffers     cached
Mem:           992        268        724         12          0         77
-/+ buffers/cache:        189        803
Swap:         1023          0       1023

OS起動時に有効になるようにしておく。

# echo '/swapfile swap swap defaults 0 0' >> /etc/fstab
4
4
1

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
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?