{"id":74,"date":"2016-10-04T16:09:24","date_gmt":"2016-10-04T13:09:24","guid":{"rendered":"http:\/\/andre.hwt.ru\/?p=74"},"modified":"2016-10-04T16:16:49","modified_gmt":"2016-10-04T13:16:49","slug":"%d0%b4%d0%be%d0%b1%d0%b0%d0%b2%d0%b8%d1%82%d1%8c-%d1%84%d0%b0%d0%b9%d0%bb-%d0%bf%d0%be%d0%b4%d0%ba%d0%b0%d1%87%d0%ba%d0%b8-swap-%d0%b2-centos-7","status":"publish","type":"post","link":"https:\/\/andre.hwt.ru\/?p=74","title":{"rendered":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u043f\u043e\u0434\u043a\u0430\u0447\u043a\u0438 (swap) \u0432 Centos 7 \u0438\u043b\u0438 Ubuntu 14.04"},"content":{"rendered":"<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0435\u0441\u0442\u044c \u043b\u0438 swap<\/p>\n<p><code>swapon -s<\/code><\/p>\n<p>\u0414\u0440\u0443\u0433\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431<\/p>\n<p><code>free -m<\/code><\/p>\n<p><!--more--><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430<\/p>\n<p><code>df -h<\/code><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u043f\u043e\u0434\u043a\u0430\u0447\u043a\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 1 \u0413\u0438\u0433\u0430\u0431\u0430\u0439\u0442<\/p>\n<p><code>fallocate -l 1G \/swapfile<\/code><\/p>\n<p>\u0416\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0440 swap \u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 (\u0435\u0441\u043b\u0438 \u0435\u0435 \u043c\u0430\u043b\u043e)<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c<\/p>\n<p><code>ls -lh \/swapfile<\/code><\/p>\n<p>\u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u0442\u043e\u043b\u044c\u043a\u043e root<\/p>\n<p><code>chmod 600 \/swapfile<\/code><\/p>\n<p>\u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043f\u043e\u0434\u043a\u0430\u0447\u043a\u0438 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/p>\n<p><code>mkswap \/swapfile<\/code><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435<\/p>\n<p><code>swapon \/swapfile<\/code><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c<\/p>\n<p><code>swapon -s<\/code><\/p>\n<p>\u0438\u043b\u0438<\/p>\n<p><code>free -m<\/code><\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c swap \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u00a0\u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438<\/p>\n<p>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \/etc\/fstab<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0442\u0440\u043e\u043a\u0443<\/p>\n<p><code>\/swapfile \u00a0 swap \u00a0 \u00a0swap \u00a0 \u00a0sw \u00a00 \u00a0 0<\/code><\/p>\n<p>\u0412\u0441\u0435.<\/p>\n<p>\u041f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e\u00a0<a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-add-swap-on-centos-7\">\u0442\u0443\u0442<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0435\u0441\u0442\u044c \u043b\u0438 swap swapon -s \u0414\u0440\u0443\u0433\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 free -m<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[32,38,34],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=\/wp\/v2\/posts\/74"}],"collection":[{"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=74"}],"version-history":[{"count":2,"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=\/wp\/v2\/posts\/74\/revisions"}],"predecessor-version":[{"id":76,"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=\/wp\/v2\/posts\/74\/revisions\/76"}],"wp:attachment":[{"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=74"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=74"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=74"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}