Created
February 14, 2012 11:37
-
-
Save snickerjp/1826078 to your computer and use it in GitHub Desktop.
FileSWAP on Serversman@VPS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat /proc/swaps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ルートディレクトリ内に1GBのファイル「swap」を作成 | |
dd if=/dev/zero of=/swap bs=1G count=1 | |
↓ 修正!メモリが少ない環境だと作れないから | |
dd if=/dev/zero of=/swap bs=10M count=100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/swap swap swap defaults 0 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkswap /swap | |
swapon /swap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkswap /swap | |
swapon /swap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkswap /swap | |
swapon /swap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# まずは、1GBって1024MBじゃない?って思ったので、countを”102”してみたら、1GB超しちゃった。 | |
dd if=/dev/zero of=/swap bs=10M count=100 | |
# ので、素直に教えてもらった、オプションで | |
dd if=/dev/zero of=/swap bs=10M count=100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkswap /swap | |
# 注意されたから -f 追加 | |
mkswap -f /swap | |
# 有効化 | |
swapon /swap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
top |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment