LoginSignup
0
3

More than 5 years have passed since last update.

【Linux】一時的にSwap領域を増やす

Last updated at Posted at 2018-08-30
# swap領域用にファイルをつくる(下記は1GB)
# bs=バッファサイズ(1024 * 1048576 = 1073741824byte = 1GB)
dd if=/dev/zero of=/var/swapfile1 bs=1024 count=1048576
chmod 600 /var/swapfile1

# swap領域作成
mkswap /var/swapfile1 1048576

# swap領域有効化
swapon /var/swapfile1
# 確認
swapon -s

# swap領域を外す
swapoff /var/swapfile1

AWSとか開発サーバとかでたまに
メモリ少ないけどインストール時とかだけなのでとりあえず補ったり。
(PHPとかLaravelとか入れたときの関連で…)

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