{"id":29289,"date":"2016-12-27T21:23:15","date_gmt":"2016-12-27T21:23:15","guid":{"rendered":"http:\/\/antonini.psc.br\/blogmed\/?p=29289"},"modified":"2021-05-24T01:26:44","modified_gmt":"2021-05-24T01:26:44","slug":"arquivos-como-swap","status":"publish","type":"post","link":"https:\/\/antonini.ddns.net\/?p=29289","title":{"rendered":"Arquivos como Swap"},"content":{"rendered":"<p style=\"text-align: center;\"><video controls=\"controls\" width=\"560\" height=\"\"><source src=\"\/mp4\/1360.mp4\" type=\"video\/mp4\" \/><\/video><\/p>\n<p style=\"text-align: justify;\"><b>Arquivo como swap<\/b><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Primeriamente criando o arquivo usando o comando <\/span><b>dd:<\/b><\/p>\n<p style=\"text-align: justify;\"><strong>dd if=\/dev\/zero of=\/swap bs=1024 count=2226144<\/strong><\/p>\n<p style=\"text-align: justify;\">&nbsp;<span style=\"font-weight: 400;\">depois, dar permiss\u00e3o de leitura e escrita, mas n\u00e3o de execu\u00e7\u00e3o:<br \/>\n<\/span><\/p>\n<p style=\"text-align: justify;\"><strong>chmod 600 swap<\/strong>&nbsp;<\/p>\n<p style=\"text-align: justify;\">&nbsp;<span style=\"font-weight: 400;\">Para transformar esse arquivo em swap utiliz\u00e1ve:<\/span><\/p>\n<p style=\"text-align: justify;\"><strong>mkswap swap<\/strong><\/p>\n<p style=\"text-align: justify;\">&nbsp;<span style=\"font-weight: 400;\">verificar a quantidade de RAM em uso:<\/span><\/p>\n<p style=\"text-align: justify;\"><strong>free -m<\/strong><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Ativar&nbsp;a swap:<\/span><\/p>\n<p style=\"text-align: justify;\"><strong>swapon swap<\/strong><\/p>\n<p style=\"text-align: justify;\">&nbsp;<span style=\"font-weight: 400;\">Adicionar no no final do arquivo <\/span><b>fstab &lt;nano \/etc\/fstab&gt;:<\/b><\/p>\n<p style=\"text-align: justify;\"><strong>\/swap swap swap defaults 0 0<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>reboot<\/strong><\/p>\n<p style=\"text-align: justify;\">&nbsp;<span style=\"font-weight: 400;\">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/span><\/p>\n<p style=\"text-align: center;\">[<a href=\"javascript:history.go(-1)\">Voltar<\/a>]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Arquivo como swap Primeriamente criando o arquivo usando o comando dd: dd if=\/dev\/zero of=\/swap bs=1024 count=2226144 &nbsp;depois, dar permiss\u00e3o de leitura e escrita, mas n\u00e3o de execu\u00e7\u00e3o: chmod 600 swap&nbsp; &nbsp;Para transformar esse arquivo em swap utiliz\u00e1ve: mkswap swap &nbsp;verificar a quantidade de RAM em uso: free -m Ativar&nbsp;a swap: swapon swap &nbsp;Adicionar no no [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-29289","post","type-post","status-publish","format-standard","hentry","category-informatica"],"_links":{"self":[{"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=\/wp\/v2\/posts\/29289","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=29289"}],"version-history":[{"count":16,"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=\/wp\/v2\/posts\/29289\/revisions"}],"predecessor-version":[{"id":47513,"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=\/wp\/v2\/posts\/29289\/revisions\/47513"}],"wp:attachment":[{"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=29289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=29289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=29289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}