{
    "componentChunkName": "component---src-templates-blog-post-js",
    "path": "/ko/docs/tips/",
    "result": {"data":{"site":{"siteMetadata":{"title":"Linuxdev Documentation","social":{"disqusShortName":"kennyyeoyounet"}}},"markdownRemark":{"id":"16173aa3-0137-5eaa-93c4-254d42a584b3","excerpt":"팁 유용한 명령  로 VM을 종료합니다  으로 VM을 시작합니다  로 MEMORY, CPUS와 같은 .env 세팅을 적용하고 재부팅 합니다  로 VM을 파기하고 생성전의 상태로 돌아갑니다. 여러가지 이유로 처음부터 시작하고 싶다면,  한 후 다시  명령을 실행하면 됩니다. 도커 VM…","html":"<h1 id=\"팁\" style=\"position:relative;\" class=\"title\"><a href=\"#%ED%8C%81\" aria-label=\"팁 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>팁</h1>\n<h2 id=\"유용한-명령\" style=\"position:relative;\" class=\"subtitle\"><a href=\"#%EC%9C%A0%EC%9A%A9%ED%95%9C-%EB%AA%85%EB%A0%B9\" aria-label=\"유용한 명령 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>유용한 명령</h2>\n<ul>\n<li><code class=\"language-text\">vagrant halt</code> 로 VM을 종료합니다</li>\n<li><code class=\"language-text\">vagrant up</code> 으로 VM을 시작합니다</li>\n<li><code class=\"language-text\">vagrant reload</code> 로 MEMORY, CPUS와 같은 .env 세팅을 적용하고 <strong>재부팅</strong> 합니다</li>\n<li><code class=\"language-text\">./destory.sh</code> 로 VM을 파기하고 생성전의 상태로 돌아갑니다.</li>\n</ul>\n<p>여러가지 이유로 처음부터 시작하고 싶다면, <code class=\"language-text\">./destroy.sh</code> 한 후 다시 <code class=\"language-text\">bootstrap.sh</code> 명령을 실행하면 됩니다.</p>\n<h2 id=\"도커\" style=\"position:relative;\" class=\"subtitle\"><a href=\"#%EB%8F%84%EC%BB%A4\" aria-label=\"도커 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>도커</h2>\n<p>VM안에서 도커가 이용가능하고 VM을 위해 작동중인 samba 컨테이너를 확인할 수 있습니다.</p>\n<p>호스트쪽에서도 도커를 사용할 수 있습니다.</p>\n<p>도커 실행파일이 설치되어있지 않으면 install-docker-clients 스크립트를 이용해 도커 명령어를 설치할 수 있습니다</p>\n<p><a href=\"https://www.vagrantmanager.com/\">Vagrant 매니저</a> 도 사용하시면 좋습니다.</p>\n<h2 id=\"vm으로부터-네트웍-드라이브-매핑\" style=\"position:relative;\" class=\"subtitle\"><a href=\"#vm%EC%9C%BC%EB%A1%9C%EB%B6%80%ED%84%B0-%EB%84%A4%ED%8A%B8%EC%9B%8D-%EB%93%9C%EB%9D%BC%EC%9D%B4%EB%B8%8C-%EB%A7%A4%ED%95%91\" aria-label=\"vm으로부터 네트웍 드라이브 매핑 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>VM으로부터 네트웍 드라이브 매핑</h2>\n<p>Virtualbox 머신은 디폴트로 IP어드레스 192.168.99.123 가 설정됩니다.\n그리고 유저 홈의 Projects 디렉토리를 공유하고 있습니다. 호스트 머신은 VM내의 Projects 디렉토리를 매핑할 수 있습니다.</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">\\\\192.168.99.123\\Projects</code></pre></div>\n<p>** 윈도우쪽에 설치된 git을 사용하는 경우는 global config의 filemode를 off로 설정하여야 합니다.</p>\n<h2 id=\"setup-명령-파라메터\" style=\"position:relative;\" class=\"subtitle\"><a href=\"#setup-%EB%AA%85%EB%A0%B9-%ED%8C%8C%EB%9D%BC%EB%A9%94%ED%84%B0\" aria-label=\"setup 명령 파라메터 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Setup 명령 파라메터</h2>\n<div class=\"gatsby-highlight\" data-language=\"powershell\"><pre class=\"language-powershell\"><code class=\"language-powershell\"><span class=\"token punctuation\">.</span>\\setup<span class=\"token punctuation\">.</span>ps1 <span class=\"token operator\">-</span>nodevtools</code></pre></div>\n<p>또는</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">./setup.sh --no-devtools</code></pre></div>\n<p>는 git(for Mac), vscode, terminal 등의 설치를 건너뜁니다.</p>\n<p><code class=\"language-text\">--no-{vscode,git,vagrant,virtualbox,...}</code> 옵션도 사용 할 수 있습니다</p>\n<p>** 윈도우에서 git은 gitbash 때문에 필수입니다.</p>\n<h3 id=\"basic-os-setting\" style=\"position:relative;\"><a href=\"#basic-os-setting\" aria-label=\"basic os setting permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>basic os setting</h3>\n<p><code class=\"language-text\">-withosconfig</code> 로 다음과 같이 필수 레지스트리를 수정 합니다</p>\n<ul>\n<li>Secure Desktop (UAC Dimming) 비활성</li>\n<li>active hour 설정 (오전 8시 부터 오전 2시)</li>\n<li>숨김파일 및 확장자 표시</li>\n<li>Windows Update 비활성</li>\n</ul>\n<p>You can also run separately by <code class=\"language-text\">scripts/basic-config.ps1</code></p>\n<h2 id=\"도커-저장소\" style=\"position:relative;\" class=\"subtitle\"><a href=\"#%EB%8F%84%EC%BB%A4-%EC%A0%80%EC%9E%A5%EC%86%8C\" aria-label=\"도커 저장소 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>도커 저장소</h2>\n<p>도커는 특히 node.js 프로젝트를 사용하는 경우 많은 작은 파일을 사용하게 됩니다.</p>\n<p>만약 주 디스크 용량이 inode 갯수가 부족한 경우는 도커 명령이 실패할 수 있습니다.\n만약 그러한 상황일 경우 <code class=\"language-text\">df -h</code>명령으로는 공간이 좀 남아있지만, <code class=\"language-text\">df -hi</code>명령으로는 여유가 없는 것을 확인할 수 있을 것입니다.</p>\n<p>그럴 때에 보통 도커 커맨드로 사용하지 않는 파일들을 지워서 공간을 확보할 수 있지만 곳 다시 용량부족으로 문제가 될 수 있습니다.</p>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"language-sh\"><code class=\"language-sh\">docker system prune --volumes</code></pre></div>\n<p>본 Vagrantfile은 <code class=\"language-text\">DOCKER_DISK_SIZE_GB=40</code> 설정으로 40GB용량의 도커만의 고유 디스크 저장소를 확보 할 수 있습니다.</p>\n<h2 id=\"윈도우10-사용자를-위한-추가-설명\" style=\"position:relative;\" class=\"subtitle\"><a href=\"#%EC%9C%88%EB%8F%84%EC%9A%B010-%EC%82%AC%EC%9A%A9%EC%9E%90%EB%A5%BC-%EC%9C%84%ED%95%9C-%EC%B6%94%EA%B0%80-%EC%84%A4%EB%AA%85\" aria-label=\"윈도우10 사용자를 위한 추가 설명 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>윈도우10 사용자를 위한 추가 설명</h2>\n<h3 id=\"setupps1\" style=\"position:relative;\"><a href=\"#setupps1\" aria-label=\"setupps1 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>setup.ps1</h3>\n<blockquote>\n<p>:warning: <strong>본 스크립트는 WSL2(Hyper-V)를 비활성 합니다.</strong></p>\n<p>실행전에 WSL쪽에서 필요한 파일들을 백업하세요. 도커는 VM을 통해서 다시 이용가능합니다.</p>\n</blockquote>\n<p>윈도우 메뉴버튼을 오른클릭 하여 윈도우 파워쉘 (관리자)를 클릭합니다.</p>\n<div class=\"gatsby-highlight\" data-language=\"powershell\"><pre class=\"language-powershell\"><code class=\"language-powershell\"><span class=\"token function\">Set-ExecutionPolicy</span> <span class=\"token operator\">-</span>Scope <span class=\"token keyword\">Process</span> <span class=\"token operator\">-</span>ExecutionPolicy Bypass</code></pre></div>\n<p>본 리포지터리의 폴더 (linuxdev)의 셋업 스크립트를 실행합니다.</p>\n<div class=\"gatsby-highlight\" data-language=\"powershell\"><pre class=\"language-powershell\"><code class=\"language-powershell\">\\Users\\xxx\\linuxdev\\setup<span class=\"token punctuation\">.</span>ps1</code></pre></div>\n<p>** 셋업 스크립트를 다시 실행하게 되면 최신버전을 확인하고 새 버전이 있으면 설치합니다.</p>\n<h3 id=\"bootstrapsh\" style=\"position:relative;\"><a href=\"#bootstrapsh\" aria-label=\"bootstrapsh permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>bootstrap.sh</h3>\n<p>Windows Terminal의 Gitbash를 열거나 Git Bash창을 엽니다.</p>\n<p>linuxdev 디렉토리 (본 리포지터리) 에서</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">./bootstrap.sh</code></pre></div>\n<p>위 명령은 virtualbox 머신을 생성하고 부팅시키고 자동 설정을 수행합니다.</p>","fields":{"slug":"/ko/docs/tips/","language":"ko"},"frontmatter":{"title":"Tips","date":"September 26, 2021","description":null}},"previous":{"fields":{"slug":"/docs/tips/"},"frontmatter":{"title":"Tips"}},"next":{"fields":{"slug":"/docs/configuring-vm/"},"frontmatter":{"title":"Configuring VM"}}},"pageContext":{"id":"16173aa3-0137-5eaa-93c4-254d42a584b3","previousPostId":"26ed2d5f-1b79-5597-ba0f-d359b2796529","nextPostId":"bdeda9f4-e066-5cbb-8d3e-d5bc814c0e13","language":"ko","i18n":{"language":"ko","languages":["en","ko","ja"],"defaultLanguage":"en","generateDefaultLanguagePage":false,"routed":true,"originalPath":"/docs/tips/","path":"/ko/docs/tips/"}}},
    "staticQueryHashes": ["2355076697","3347749741"]}