0
0

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 3 years have passed since last update.

AWS Owncloudサーバを別のEC2に移転

Last updated at Posted at 2019-12-30

大きすぎるEC2インスタンスを縮小し適正なインスタンスのEC2にしてOwncloudを立ち上げた時のメモ

①EC2インスタンス(nano)を立ち上げてSWAPの設定をした

下記のようにした

$ sudo dd if=/dev/zero of=/swapfile bs=1M count=1024

$ ls -la /
-rw-r--r-- 1 root root 1073741824 Dec 30 08:53 swapfile

$ sudo chmod 600 /swapfile

$ sudo mkswap /swapfile
Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)
no label, UUID=c78aad23-0a53-45f7-93f1-de12c5e354fc

$ sudo swapon /swapfile

$ sudo swapon -s

Filename Type Size Used Priority
/swapfile file 1048572 0 -2

下記を/etc/fstab に追記

$ sudo vi /etc/fstab
/swapfile swap swap defaults 0 0

AWSサイトだと下記だが、

$ sudo dd if=/dev/zero of=/swapfile bs=1G count=1
dd: memory exhausted by input buffer of size 1073741824 bytes (1.0 GiB)

と出てうまくいかなかった

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?