{"id":3974,"date":"2023-11-01T23:17:13","date_gmt":"2023-11-01T15:17:13","guid":{"rendered":"https:\/\/wordpress.cine.idv.tw\/?p=3974"},"modified":"2023-11-30T11:18:55","modified_gmt":"2023-11-30T03:18:55","slug":"how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space","status":"publish","type":"post","link":"https:\/\/wordpress.cine.idv.tw\/index.php\/2023\/11\/01\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\/","title":{"rendered":"Amazon EC2 Ubuntu Linux \u9810\u8a2d\u7121 swap \u914d\u7f6e\uff0c\u8a72\u600e\u9ebc\u65b0\u589e?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Amazon EC2 \u4e2d\uff0c\u4f7f\u7528\u9810\u8a2d\u8a2d\u5b9a\u5efa\u7acb Ubuntu Linux instance \u4e4b\u5f8c\uff0c\u624d\u767c\u73fe\u8a72 instance \u7f3a\u5c11 swap \u8a2d\u5b9a\uff0c\u96d6\u7136\u4e0d\u898b\u5f97\u6703\u78b0\u5230\u554f\u984c\uff0c\u4f46\u662f\u5728\u8a31\u591a\u76e3\u63a7\u7684\u7cfb\u7d71\u4e2d\uff0c\u90fd\u6703\u5c0d\u65bc\u7f3a\u5c11 swap \u914d\u7f6e\u7684 Linux instance \u7522\u751f\u544a\u8b66\uff0c\u70ba\u4e86\u8b93\u81ea\u5df1\u4e0d\u8981\u88ab\u9019\u4e9b\u544a\u8b66\u5e72\u64fe\uff0c\u6240\u4ee5\u9084\u662f\u5e6b\u5b83\u5011\u5efa\u7acb swap \u7a7a\u9593\uff0c\u8b93\u76e3\u63a7\u7cfb\u7d71\u4e0d\u8981\u7522\u751f\u544a\u8b66\u7684\u8a0a\u606f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8981\u57f7\u884c\u4e0b\u5217 swap \u7a7a\u9593\u914d\u7f6e\u7684\u6307\u4ee4\uff0c\u5efa\u8b70\u5148\u6aa2\u67e5\u7cfb\u7d71\u4e2d\u662f\u5426\u5df2\u7d93\u5b58\u5728 swap \u7a7a\u9593\uff0c\u6aa2\u67e5\u7684\u65b9\u5f0f\u4e5f\u5f88\u7c21\u55ae\uff0c\u53ea\u8981\u57f7\u884c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ free -m<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u53ea\u8981\u770b\u5230\u4e0a\u8ff0\u6307\u4ee4\u7684\u8f38\u51fa\u4e2d\uff0c\u6709\u51fa\u73fe Swap: \u7684\u8cc7\u8a0a\uff0c\u90a3\u5c31\u4e0d\u9700\u8981\u518d\u9032\u884c\u4efb\u4f55\u7684\u914d\u7f6e\u5de5\u4f5c\u4e86\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u521d\u59cb\u914d\u7f6e\u65b9\u5f0f<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo fallocate -l 2G \/swapfile<br>$ sudo dd if=\/dev\/zero of=\/swapfile bs=1024 count=2097152<br>$ sudo chmod 600 \/swapfile<br>$ sudo mkswap \/swapfile<br>$ sudo swapon \/swapfile<br>$ sudo echo \"\/swapfile swap swap defaults 0 0\" >> \/etc\/fstab<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0a\u7684\u6307\u4ee4\u7bc4\u4f8b\u4e2d\uff0c\u7b2c\u4e8c\u500b\u6307\u4ee4 dd \u7684 count \u53c3\u6578\u8a08\u7b97\u65b9\u5f0f\uff0c\u7531\u65bc\u662f 2GB \u6240\u4ee5\u5c31\u662f 2 * 1024 * 1024 \u5c31\u53ef\u4ee5\u6c42\u5f97\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5f8c\u7e8c\u8abf\u6574\u65b9\u5f0f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u7531\u65bc\u9032\u884c\u4e0a\u8ff0\u7684\u521d\u59cb\u914d\u7f6e\u4e4b\u5f8c\uff0c\u6709\u518d\u53bb\u8abf\u6574\u4e86 EC2 \u7684\u898f\u683c\uff0c\u8a18\u61b6\u9ad4\u7531 1GB \u5347\u7d1a\u81f3 2GB\uff0c\u6240\u4ee5 swap \u7a7a\u9593\u9084\u8981\u518d\u8abf\u6574\u4e00\u6b21\uff0c\u6211\u4e5f\u628a\u8abf\u6574\u7684\u904e\u7a0b\u5beb\u5728\u4e0b\u65b9\uff0c dd \u7684 count \u53c3\u6578\u8a08\u7b97\u65b9\u5f0f\uff0c\u7531\u65bc\u662f 4GB \u6240\u4ee5\u5c31\u662f 4 * 1024 * 1024 \u9019\u6a23\u6c42\u5f97\uff0c\u53e6\u5916\u4e5f\u8981\u8a18\u5f97\u53bb\u8abf\u6574 \/etc\/fstab \u4e2d\u7684\u6a94\u6848\u540d\u7a31\uff0c\u5229\u7528\u6587\u5b57\u7de8\u8f2f\u5668\u628a \/swapfile \u8b8a\u66f4\u70ba \/swapfile4G \uff0c\u9019\u6a23\u91cd\u65b0\u958b\u6a5f\u7684\u6642\u5019\u624d\u4e0d\u6703\u78b0\u5230\u9ebb\u7169\uff0c\u5207\u8a18\uff01<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo fallocate -l 4G \/swapfile4G<br>$ sudo dd if=\/dev\/zero of=\/swapfile4G bs=1024 count=4194304<br>$ sudo chmod 600 \/swapfile4G<br>$ sudo mkswap \/swapfile4G<br>$ sudo swapon \/swapfile4G<br>$ sudo swapoff \/swapfile<br>$ sudo rm \/swapfile<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u53c3\u8003\u8cc7\u6599<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/tecadmin.net\/add-swap-partition-on-ec2-linux-instance\/\">How to create a Swap partition on your EC2 Instance<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Amazon EC2 \u4e2d\uff0c\u4f7f\u7528\u9810\u8a2d\u8a2d\u5b9a\u5efa\u7acb Ubuntu Linux instance \u4e4b\u5f8c\uff0c\u624d\u767c\u73fe\u8a72 instance \u7f3a\u5c11 swap \u8a2d\u5b9a\uff0c\u96d6\u7136\u4e0d\u898b\u5f97\u6703\u78b0\u5230\u554f\u984c\uff0c\u4f46\u662f\u5728\u8a31\u591a\u76e3\u63a7\u7684\u7cfb\u7d71\u4e2d\uff0c\u90fd\u6703\u5c0d\u65bc\u7f3a\u5c11 swap \u914d\u7f6e\u7684 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[13],"tags":[264,48,37,36],"class_list":["post-3974","post","type-post","status-publish","format-standard","hentry","category-it","tag-amazon-ec2","tag-aws","tag-linux","tag-ubuntu"],"featured_image_src":null,"author_info":{"display_name":"shortie","author_link":"https:\/\/wordpress.cine.idv.tw\/index.php\/author\/shortie\/"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Amazon EC2 Ubuntu Linux \u9810\u8a2d\u7121 swap \u914d\u7f6e\uff0c\u8a72\u600e\u9ebc\u65b0\u589e? - \u56db\u7dad\u4e8c\u6728\u4e4b\u5bb6<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wordpress.cine.idv.tw\/index.php\/2023\/11\/01\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\/\" \/>\n<meta property=\"og:locale\" content=\"zh_TW\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Amazon EC2 Ubuntu Linux \u9810\u8a2d\u7121 swap \u914d\u7f6e\uff0c\u8a72\u600e\u9ebc\u65b0\u589e? - \u56db\u7dad\u4e8c\u6728\u4e4b\u5bb6\" \/>\n<meta property=\"og:description\" content=\"Amazon EC2 \u4e2d\uff0c\u4f7f\u7528\u9810\u8a2d\u8a2d\u5b9a\u5efa\u7acb Ubuntu Linux instance \u4e4b\u5f8c\uff0c\u624d\u767c\u73fe\u8a72 instance \u7f3a\u5c11 swap \u8a2d\u5b9a\uff0c\u96d6\u7136\u4e0d\u898b\u5f97\u6703\u78b0\u5230\u554f\u984c\uff0c\u4f46\u662f\u5728\u8a31\u591a\u76e3\u63a7\u7684\u7cfb\u7d71\u4e2d\uff0c\u90fd\u6703\u5c0d\u65bc\u7f3a\u5c11 swap \u914d\u7f6e\u7684 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wordpress.cine.idv.tw\/index.php\/2023\/11\/01\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\/\" \/>\n<meta property=\"og:site_name\" content=\"\u56db\u7dad\u4e8c\u6728\u4e4b\u5bb6\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-01T15:17:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-30T03:18:55+00:00\" \/>\n<meta name=\"author\" content=\"shortie\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005:\" \/>\n\t<meta name=\"twitter:data1\" content=\"shortie\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9810\u4f30\u95b1\u8b80\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\u9418\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wordpress.cine.idv.tw\\\/index.php\\\/2023\\\/11\\\/01\\\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wordpress.cine.idv.tw\\\/index.php\\\/2023\\\/11\\\/01\\\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\\\/\"},\"author\":{\"name\":\"shortie\",\"@id\":\"https:\\\/\\\/wordpress.cine.idv.tw\\\/#\\\/schema\\\/person\\\/2f7c8d7d06c31412a22aeeeb557c791f\"},\"headline\":\"Amazon EC2 Ubuntu Linux \u9810\u8a2d\u7121 swap \u914d\u7f6e\uff0c\u8a72\u600e\u9ebc\u65b0\u589e?\",\"datePublished\":\"2023-11-01T15:17:13+00:00\",\"dateModified\":\"2023-11-30T03:18:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wordpress.cine.idv.tw\\\/index.php\\\/2023\\\/11\\\/01\\\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\\\/\"},\"wordCount\":44,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/wordpress.cine.idv.tw\\\/#\\\/schema\\\/person\\\/2f7c8d7d06c31412a22aeeeb557c791f\"},\"keywords\":[\"Amazon EC2\",\"AWS\",\"Linux\",\"Ubuntu\"],\"articleSection\":[\"\u8cc7\u8a0a\u79d1\u6280\"],\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/wordpress.cine.idv.tw\\\/index.php\\\/2023\\\/11\\\/01\\\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wordpress.cine.idv.tw\\\/index.php\\\/2023\\\/11\\\/01\\\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\\\/\",\"url\":\"https:\\\/\\\/wordpress.cine.idv.tw\\\/index.php\\\/2023\\\/11\\\/01\\\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\\\/\",\"name\":\"Amazon EC2 Ubuntu Linux \u9810\u8a2d\u7121 swap \u914d\u7f6e\uff0c\u8a72\u600e\u9ebc\u65b0\u589e? - \u56db\u7dad\u4e8c\u6728\u4e4b\u5bb6\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wordpress.cine.idv.tw\\\/#website\"},\"datePublished\":\"2023-11-01T15:17:13+00:00\",\"dateModified\":\"2023-11-30T03:18:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wordpress.cine.idv.tw\\\/index.php\\\/2023\\\/11\\\/01\\\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\\\/#breadcrumb\"},\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wordpress.cine.idv.tw\\\/index.php\\\/2023\\\/11\\\/01\\\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wordpress.cine.idv.tw\\\/index.php\\\/2023\\\/11\\\/01\\\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9801\",\"item\":\"https:\\\/\\\/wordpress.cine.idv.tw\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Amazon EC2 Ubuntu Linux \u9810\u8a2d\u7121 swap \u914d\u7f6e\uff0c\u8a72\u600e\u9ebc\u65b0\u589e?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wordpress.cine.idv.tw\\\/#website\",\"url\":\"https:\\\/\\\/wordpress.cine.idv.tw\\\/\",\"name\":\"\u56db\u7dad\u4e8c\u6728\u4e4b\u5bb6\",\"description\":\"\u656c\u754f\u8036\u548c\u83ef\u662f\u667a\u6167\u7684\u958b\u7aef\uff0c \u8a8d\u8b58\u81f3\u8056\u8005\u4fbf\u662f\u8070\u660e\u3002\u7bb4\u8a00\u4e5d:10\",\"publisher\":{\"@id\":\"https:\\\/\\\/wordpress.cine.idv.tw\\\/#\\\/schema\\\/person\\\/2f7c8d7d06c31412a22aeeeb557c791f\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wordpress.cine.idv.tw\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-TW\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/wordpress.cine.idv.tw\\\/#\\\/schema\\\/person\\\/2f7c8d7d06c31412a22aeeeb557c791f\",\"name\":\"shortie\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\\\/\\\/i2.wp.com\\\/wordpress.cine.idv.tw\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/111945_400x400.jpg?fit=400%2C400&ssl=1\",\"url\":\"https:\\\/\\\/i2.wp.com\\\/wordpress.cine.idv.tw\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/111945_400x400.jpg?fit=400%2C400&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i2.wp.com\\\/wordpress.cine.idv.tw\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/111945_400x400.jpg?fit=400%2C400&ssl=1\",\"width\":400,\"height\":400,\"caption\":\"shortie\"},\"logo\":{\"@id\":\"https:\\\/\\\/i2.wp.com\\\/wordpress.cine.idv.tw\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/111945_400x400.jpg?fit=400%2C400&ssl=1\"},\"sameAs\":[\"https:\\\/\\\/wordpress.cine.idv.tw\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Amazon EC2 Ubuntu Linux \u9810\u8a2d\u7121 swap \u914d\u7f6e\uff0c\u8a72\u600e\u9ebc\u65b0\u589e? - \u56db\u7dad\u4e8c\u6728\u4e4b\u5bb6","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wordpress.cine.idv.tw\/index.php\/2023\/11\/01\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\/","og_locale":"zh_TW","og_type":"article","og_title":"Amazon EC2 Ubuntu Linux \u9810\u8a2d\u7121 swap \u914d\u7f6e\uff0c\u8a72\u600e\u9ebc\u65b0\u589e? - \u56db\u7dad\u4e8c\u6728\u4e4b\u5bb6","og_description":"Amazon EC2 \u4e2d\uff0c\u4f7f\u7528\u9810\u8a2d\u8a2d\u5b9a\u5efa\u7acb Ubuntu Linux instance \u4e4b\u5f8c\uff0c\u624d\u767c\u73fe\u8a72 instance \u7f3a\u5c11 swap \u8a2d\u5b9a\uff0c\u96d6\u7136\u4e0d\u898b\u5f97\u6703\u78b0\u5230\u554f\u984c\uff0c\u4f46\u662f\u5728\u8a31\u591a\u76e3\u63a7\u7684\u7cfb\u7d71\u4e2d\uff0c\u90fd\u6703\u5c0d\u65bc\u7f3a\u5c11 swap \u914d\u7f6e\u7684 [&hellip;]","og_url":"https:\/\/wordpress.cine.idv.tw\/index.php\/2023\/11\/01\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\/","og_site_name":"\u56db\u7dad\u4e8c\u6728\u4e4b\u5bb6","article_published_time":"2023-11-01T15:17:13+00:00","article_modified_time":"2023-11-30T03:18:55+00:00","author":"shortie","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005:":"shortie","\u9810\u4f30\u95b1\u8b80\u6642\u9593":"1 \u5206\u9418"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wordpress.cine.idv.tw\/index.php\/2023\/11\/01\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\/#article","isPartOf":{"@id":"https:\/\/wordpress.cine.idv.tw\/index.php\/2023\/11\/01\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\/"},"author":{"name":"shortie","@id":"https:\/\/wordpress.cine.idv.tw\/#\/schema\/person\/2f7c8d7d06c31412a22aeeeb557c791f"},"headline":"Amazon EC2 Ubuntu Linux \u9810\u8a2d\u7121 swap \u914d\u7f6e\uff0c\u8a72\u600e\u9ebc\u65b0\u589e?","datePublished":"2023-11-01T15:17:13+00:00","dateModified":"2023-11-30T03:18:55+00:00","mainEntityOfPage":{"@id":"https:\/\/wordpress.cine.idv.tw\/index.php\/2023\/11\/01\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\/"},"wordCount":44,"commentCount":1,"publisher":{"@id":"https:\/\/wordpress.cine.idv.tw\/#\/schema\/person\/2f7c8d7d06c31412a22aeeeb557c791f"},"keywords":["Amazon EC2","AWS","Linux","Ubuntu"],"articleSection":["\u8cc7\u8a0a\u79d1\u6280"],"inLanguage":"zh-TW","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wordpress.cine.idv.tw\/index.php\/2023\/11\/01\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wordpress.cine.idv.tw\/index.php\/2023\/11\/01\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\/","url":"https:\/\/wordpress.cine.idv.tw\/index.php\/2023\/11\/01\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\/","name":"Amazon EC2 Ubuntu Linux \u9810\u8a2d\u7121 swap \u914d\u7f6e\uff0c\u8a72\u600e\u9ebc\u65b0\u589e? - \u56db\u7dad\u4e8c\u6728\u4e4b\u5bb6","isPartOf":{"@id":"https:\/\/wordpress.cine.idv.tw\/#website"},"datePublished":"2023-11-01T15:17:13+00:00","dateModified":"2023-11-30T03:18:55+00:00","breadcrumb":{"@id":"https:\/\/wordpress.cine.idv.tw\/index.php\/2023\/11\/01\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\/#breadcrumb"},"inLanguage":"zh-TW","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wordpress.cine.idv.tw\/index.php\/2023\/11\/01\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wordpress.cine.idv.tw\/index.php\/2023\/11\/01\/how-to-create-a-swap-space-for-amazon-ec2-ubuntu-linux-default-with-no-swap-space\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9801","item":"https:\/\/wordpress.cine.idv.tw\/"},{"@type":"ListItem","position":2,"name":"Amazon EC2 Ubuntu Linux \u9810\u8a2d\u7121 swap \u914d\u7f6e\uff0c\u8a72\u600e\u9ebc\u65b0\u589e?"}]},{"@type":"WebSite","@id":"https:\/\/wordpress.cine.idv.tw\/#website","url":"https:\/\/wordpress.cine.idv.tw\/","name":"\u56db\u7dad\u4e8c\u6728\u4e4b\u5bb6","description":"\u656c\u754f\u8036\u548c\u83ef\u662f\u667a\u6167\u7684\u958b\u7aef\uff0c \u8a8d\u8b58\u81f3\u8056\u8005\u4fbf\u662f\u8070\u660e\u3002\u7bb4\u8a00\u4e5d:10","publisher":{"@id":"https:\/\/wordpress.cine.idv.tw\/#\/schema\/person\/2f7c8d7d06c31412a22aeeeb557c791f"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wordpress.cine.idv.tw\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-TW"},{"@type":["Person","Organization"],"@id":"https:\/\/wordpress.cine.idv.tw\/#\/schema\/person\/2f7c8d7d06c31412a22aeeeb557c791f","name":"shortie","image":{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/i2.wp.com\/wordpress.cine.idv.tw\/wp-content\/uploads\/2021\/11\/111945_400x400.jpg?fit=400%2C400&ssl=1","url":"https:\/\/i2.wp.com\/wordpress.cine.idv.tw\/wp-content\/uploads\/2021\/11\/111945_400x400.jpg?fit=400%2C400&ssl=1","contentUrl":"https:\/\/i2.wp.com\/wordpress.cine.idv.tw\/wp-content\/uploads\/2021\/11\/111945_400x400.jpg?fit=400%2C400&ssl=1","width":400,"height":400,"caption":"shortie"},"logo":{"@id":"https:\/\/i2.wp.com\/wordpress.cine.idv.tw\/wp-content\/uploads\/2021\/11\/111945_400x400.jpg?fit=400%2C400&ssl=1"},"sameAs":["https:\/\/wordpress.cine.idv.tw"]}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2GqAF-126","jetpack-related-posts":[{"id":5176,"url":"https:\/\/wordpress.cine.idv.tw\/index.php\/2024\/05\/05\/ssm-agent-worker-is-using-100-of-cpu\/","url_meta":{"origin":3974,"position":0},"title":"AWS EC2 \u88ab amazon-ssm-agent \u5403\u6389\u5168\u90e8\u7684 CPU \u8cc7\u6e90\u8a72\u600e\u9ebc\u8fa6","author":"shortie","date":"2024-05-05","format":false,"excerpt":"\u81ea\u5df1\u5e38\u5e38\u88ab\u554f\u5230\uff0c\u5728 AWS \u4e2d\u525b\u525b\u5efa\u7acb\u597d\u7684 EC2 \u5be6\u4f8b\uff0c\u90fd\u9084\u6c92\u6709\u958b\u59cb\u9032\u884c\u61c9\u7528\u7a0b\u5f0f\u958b\u767c\u8207\u90e8\u7f72\u7684\u5de5\u4f5c\uff0c\u2026","rel":"","context":"\u5728\u300c\u8cc7\u8a0a\u79d1\u6280\u300d\u4e2d","block_context":{"text":"\u8cc7\u8a0a\u79d1\u6280","link":"https:\/\/wordpress.cine.idv.tw\/index.php\/category\/it\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1039,"url":"https:\/\/wordpress.cine.idv.tw\/index.php\/2020\/08\/17\/aws-ec2-instance-dev-xvda1-should-be-checked-for-errors\/","url_meta":{"origin":3974,"position":1},"title":"AWS EC2 Linux filesystem should be checked for errors","author":"shortie","date":"2020-08-17","format":false,"excerpt":"\u5728 AWS EC2 \u7684 Ubuntu instance \u4e2d\u770b\u5230 \/dev\/xvda1 filesys\u2026","rel":"","context":"\u5728\u300c\u8cc7\u8a0a\u79d1\u6280\u300d\u4e2d","block_context":{"text":"\u8cc7\u8a0a\u79d1\u6280","link":"https:\/\/wordpress.cine.idv.tw\/index.php\/category\/it\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/wordpress.cine.idv.tw\/wp-content\/uploads\/2020\/08\/aws-console-ec2-reboot-2020-08-18_16-04-02.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/wordpress.cine.idv.tw\/wp-content\/uploads\/2020\/08\/aws-console-ec2-reboot-2020-08-18_16-04-02.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/wordpress.cine.idv.tw\/wp-content\/uploads\/2020\/08\/aws-console-ec2-reboot-2020-08-18_16-04-02.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/wordpress.cine.idv.tw\/wp-content\/uploads\/2020\/08\/aws-console-ec2-reboot-2020-08-18_16-04-02.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":3998,"url":"https:\/\/wordpress.cine.idv.tw\/index.php\/2023\/12\/05\/how-to-find-the-location-in-file-system-for-java_home\/","url_meta":{"origin":3974,"position":2},"title":"\u8a72\u600e\u9ebc\u6aa2\u67e5 JAVA_HOME \u5230\u5e95\u4f4d\u65bc\u6a94\u6848\u7cfb\u7d71\u4e2d\u7684\u54ea\u500b\u76ee\u9304\u5462?","author":"shortie","date":"2023-12-05","format":false,"excerpt":"\u6700\u8fd1\u5de5\u4f5c\u4e0a\u78b0\u5230\u8207 Java \u6709\u95dc\u7684\u4e8b\u9805\uff0c\u6709\u4eba\u5c0d java \u547d\u4ee4\u6240\u4f7f\u7528\u7684 JAVA_HOME \u5230\u5e95\u4f4d\u65bc\u2026","rel":"","context":"\u5728\u300c\u8cc7\u8a0a\u79d1\u6280\u300d\u4e2d","block_context":{"text":"\u8cc7\u8a0a\u79d1\u6280","link":"https:\/\/wordpress.cine.idv.tw\/index.php\/category\/it\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":452,"url":"https:\/\/wordpress.cine.idv.tw\/index.php\/2018\/09\/16\/vmware-workstation-ubuntu-virtual-machine-shrink-disk\/","url_meta":{"origin":3974,"position":3},"title":"\u7e2e\u5c0f Ubuntu VMware \u865b\u64ec\u6a5f\u5668\u5360\u7528\u7684\u5be6\u9ad4\u786c\u789f\u7a7a\u9593","author":"shortie","date":"2018-09-16","format":false,"excerpt":"VMware Workstation (\u4ee5\u4e0b\u7c21\u7a31 VMware) \u865b\u64ec\u6a5f\u5668\u4f7f\u7528\u4e00\u6bb5\u6642\u9593\u4e4b\u5f8c\uff0c\u4e0d\u53ef\u907f\u514d\u2026","rel":"","context":"\u5728\u300c\u8cc7\u8a0a\u79d1\u6280\u300d\u4e2d","block_context":{"text":"\u8cc7\u8a0a\u79d1\u6280","link":"https:\/\/wordpress.cine.idv.tw\/index.php\/category\/it\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3502,"url":"https:\/\/wordpress.cine.idv.tw\/index.php\/2023\/09\/09\/mysqldump-couldnt-execute-flush-tables-with-read-lock-access-denied-for-user-user-using-password-yes-1045\/","url_meta":{"origin":3974,"position":4},"title":"mysqldump \u9023\u7dda\u81f3 Amazon RDS for MySQL \u6642\u51fa\u73fe 1045 \u7684\u932f\u8aa4\u8a72\u9019\u9ebc\u8fa6!","author":"shortie","date":"2023-09-09","format":false,"excerpt":"\u7a81\u7136\u4e4b\u9593\uff0c AWS \u4e0a\u7684 Ubuntu Linux EC2 \u5be6\u4f8b\u57f7\u884c\u7528\u4f86\u5b9a\u671f\u5099\u4efd Amazon RD\u2026","rel":"","context":"\u5728\u300c\u8cc7\u8a0a\u79d1\u6280\u300d\u4e2d","block_context":{"text":"\u8cc7\u8a0a\u79d1\u6280","link":"https:\/\/wordpress.cine.idv.tw\/index.php\/category\/it\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1358,"url":"https:\/\/wordpress.cine.idv.tw\/index.php\/2021\/03\/05\/ubuntu-macos-install-python-2-virtualenv\/","url_meta":{"origin":3974,"position":5},"title":"\u8a2d\u5b9a Python 2\/3 \u4f7f\u7528\u4e4b virtualenv \u74b0\u5883\u53ef\u4ee5\u9019\u9ebc\u505a","author":"shortie","date":"2021-03-05","format":false,"excerpt":"\u5118\u7ba1 Python 2 \u65e9\u5df2\u5728 2020.1.1 \u505c\u6b62\u652f\u63f4, \u5de5\u4f5c\u4e0a\u6216\u670b\u53cb\u5708\u4e2d, \u5c1a\u5728\u4f7f\u7528 Ubun\u2026","rel":"","context":"\u5728\u300c\u8cc7\u8a0a\u79d1\u6280\u300d\u4e2d","block_context":{"text":"\u8cc7\u8a0a\u79d1\u6280","link":"https:\/\/wordpress.cine.idv.tw\/index.php\/category\/it\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/wordpress.cine.idv.tw\/index.php\/wp-json\/wp\/v2\/posts\/3974","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.cine.idv.tw\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.cine.idv.tw\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.cine.idv.tw\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.cine.idv.tw\/index.php\/wp-json\/wp\/v2\/comments?post=3974"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.cine.idv.tw\/index.php\/wp-json\/wp\/v2\/posts\/3974\/revisions"}],"predecessor-version":[{"id":3975,"href":"https:\/\/wordpress.cine.idv.tw\/index.php\/wp-json\/wp\/v2\/posts\/3974\/revisions\/3975"}],"wp:attachment":[{"href":"https:\/\/wordpress.cine.idv.tw\/index.php\/wp-json\/wp\/v2\/media?parent=3974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.cine.idv.tw\/index.php\/wp-json\/wp\/v2\/categories?post=3974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.cine.idv.tw\/index.php\/wp-json\/wp\/v2\/tags?post=3974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}