{"id":1355,"date":"2021-07-31T14:00:11","date_gmt":"2021-07-31T05:00:11","guid":{"rendered":"https:\/\/ito-u-oti.com\/?p=1355"},"modified":"2021-07-31T14:00:18","modified_gmt":"2021-07-31T05:00:18","slug":"debian-offline-install","status":"publish","type":"post","link":"https:\/\/ito-u-oti.com\/?p=1355","title":{"rendered":"Debian\u7cfb\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30aa\u30d5\u30e9\u30a4\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3092\u4f5c\u308b"},"content":{"rendered":"\n<p>\u30d7\u30ed\u30ad\u30b7\u74b0\u5883\u4e0b\u306a\u3069\u3067\u5916\u90e8\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u7e4b\u3050\u3053\u3068\u304c\u3067\u304d\u306a\u3044\u6642\u306a\u3069\u306b\u3001\u4f7f\u3044\u305f\u3044\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30aa\u30d5\u30e9\u30a4\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u304c\u5fc5\u8981\u3067\u3059\u3002<br>apt-get\u30b3\u30de\u30f3\u30c9\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30aa\u30d5\u30e9\u30a4\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>logrotate\u3092\u4f8b\u3068\u3057\u3066\u9032\u3081\u307e\u3059\u3002<\/p>\n\n\n\n<h2 id=\"outline__1\" class=\"wp-block-heading\">Docker\u3067\u30af\u30ea\u30fc\u30f3\u306aDebian\u74b0\u5883\u3092\u7528\u610f\u3059\u308b<\/h2>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u8cc7\u6750\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u7528\u306b\u3001Dockerfile\u3092\u7528\u610f\u3057\u3066Debian\u74b0\u5883\u3092\u4f5c\u308a\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nFROM debian:stable-slim\n\n# If you need proxy, add proxy settings\n#ENV http_proxy http:\/\/host:port\/\n#ENV https_proxy http:\/\/host:port\/\n#ENV HTTP_PROXY http:\/\/host:port\/\n#ENV HTTPS_PROXY http:\/\/host:port\/\n<\/pre><\/div>\n\n\n<p>proxy\u5468\u308a\u306e\u8a2d\u5b9a\u304c\u3044\u308b\u5834\u5408\u306f\u30b3\u30e1\u30f3\u30c8\u3092\u5916\u3057\u3066\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u6b21\u306bDocker\u30a4\u30e1\u30fc\u30b8\u3092\u30d3\u30eb\u30c9\u3057\u3066\u30b3\u30f3\u30c6\u30ca\u3092\u7acb\u3061\u4e0a\u3052\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ndocker build -t debian-sandbox .\ndocker run -e TZ=Asia\/Tokyo -u root --name debian-sandbox -d --restart always  -it debian-sandbox\n<\/pre><\/div>\n\n\n<p>proxy\u8a2d\u5b9a\u304c\u3044\u3089\u306a\u3044\u5834\u5408\u306fDockerfile\u3092\u4f5c\u3089\u305a\u3001\u30ef\u30f3\u30e9\u30a4\u30ca\u30fc\u3067\u7acb\u3061\u4e0a\u3052\u3066\u3082OK\u3067\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ndocker run -e TZ=Asia\/Tokyo -u root --name debian-sandbox -d --restart always  -it debian:stable-slim\n<\/pre><\/div>\n\n\n<h2 id=\"outline__2\" class=\"wp-block-heading\">\u30b3\u30f3\u30c6\u30ca\u306e\u4e2d\u306b\u5165\u3063\u3066\u30aa\u30d5\u30e9\u30a4\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3092\u4f5c\u6210\u3059\u308b<\/h2>\n\n\n\n<p>\u30b3\u30f3\u30c6\u30ca\u306e\u4e2d\u306b\u5165\u308a\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ndocker exec -it bash\n<\/pre><\/div>\n\n\n<p>\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3044\u307e\u3059\u3002<br>\u3053\u306e\u6642\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u306e\u307f\u3092\u884c\u3046\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u3046\u306e\u304c\u30dd\u30a4\u30f3\u30c8\u3067\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\napt-get update\napt-get --download-only install logrotate -y\n<\/pre><\/div>\n\n\n<p>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u306f <code>\/var\/cache\/apt\/archives<\/code> \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u683c\u7d0d\u3055\u308c\u307e\u3059\u3002<br>archives\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4e38\u3054\u3068\u5727\u7e2e\u3057\u3066\u30aa\u30d5\u30e9\u30a4\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3068\u3057\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncd \/var\/cache\/apt\/\ncp -r .\/archives .\/logrotate\ntar -zcvf logrotate_install.tar.gz logrotate\nexit\n<\/pre><\/div>\n\n\n<p>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d\u3092\u5909\u3048\u305f\u306e\u306f\u5f8c\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u6642\u306b\u4f55\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u304b\u5206\u304b\u308a\u3084\u3059\u304f\u3059\u308b\u305f\u3081\u3067\u3059\u3002<br><code>logrotate_install.tar.gz<\/code> \u3068\u3044\u3046\u5727\u7e2e\u30d5\u30a1\u30a4\u30eb\u304c\u751f\u6210\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<h2 id=\"outline__3\" class=\"wp-block-heading\">\u4f5c\u6210\u3057\u305f\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3092\u30ed\u30fc\u30ab\u30eb\u306b\u6301\u3063\u3066\u304f\u308b<\/h2>\n\n\n\n<p>docker\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ndocker cp debian-sandbox:\/var\/cache\/apt\/logrotate_install.tar.gz .\/\n<\/pre><\/div>\n\n\n<p>\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4e0a\u306btar\u30d5\u30a1\u30a4\u30eb\u304c\u30b3\u30d4\u30fc\u3067\u304d\u305f\u3068\u601d\u3044\u307e\u3059\u3002<br>\u3053\u308c\u3067\u3001\u30aa\u30d5\u30e9\u30a4\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u306e\u4f5c\u6210\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<h2 id=\"outline__4\" class=\"wp-block-heading\">\u30aa\u30d5\u30e9\u30a4\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3092\u4f7f\u7528\u3059\u308b<\/h2>\n\n\n\n<p>tar\u30d5\u30a1\u30a4\u30eb\u3092\u5c55\u958b\u3057\u3066\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u6307\u5b9a\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\ntar -xvf logrotate_install.tar.gz\napt -y install \/logrotate\/*.deb\n<\/pre><\/div>\n\n\n<p>tar\u306e\u4e2d\u306b\u306f\u76ee\u7684\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3060\u3051\u3067\u306a\u304f\u3001\u95a2\u9023\u3059\u308b\u4f9d\u5b58\u30d1\u30c3\u30b1\u30fc\u30b8\u3082\u5165\u3063\u3066\u3044\u308b\u306e\u3067\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e2d\u306e\u3082\u306e\u3092\u5168\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 id=\"outline__5\" class=\"wp-block-heading\">github<\/h2>\n\n\n\n<p><a href=\"https:\/\/github.com\/itouoti12\/gen-offline-apt-package\">https:\/\/github.com\/itouoti12\/gen-offline-apt-package<\/a><\/p>\n\n\n\n<h2 id=\"outline__6\" class=\"wp-block-heading\">\u53c2\u8003<\/h2>\n\n\n\n<p><a href=\"https:\/\/noexciting.exblog.jp\/20893841\/\">\u30aa\u30d5\u30e9\u30a4\u30f3\u306eUbuntu\u30de\u30b7\u30f3\u306b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u5c0e\u5165\u3059\u308b\u65b9\u6cd5<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/askubuntu.com\/questions\/15211\/saving-deb-files-from-repositories-to-a-custom-location-for-installing-offline\">Saving deb files from repositories to a custom location for installing offline<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30d7\u30ed\u30ad\u30b7\u74b0\u5883\u4e0b\u306a\u3069\u3067\u5916\u90e8\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u7e4b\u3050\u3053\u3068\u304c\u3067\u304d\u306a\u3044\u6642\u306a\u3069\u306b\u3001\u4f7f\u3044\u305f\u3044\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30aa\u30d5\u30e9\u30a4\u30f3\u30a4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":214,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[71],"tags":[305,306,235,74],"class_list":["post-1355","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-apt","tag-offline","tag-package","tag-ubuntu"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=\/wp\/v2\/posts\/1355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1355"}],"version-history":[{"count":3,"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=\/wp\/v2\/posts\/1355\/revisions"}],"predecessor-version":[{"id":1358,"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=\/wp\/v2\/posts\/1355\/revisions\/1358"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=\/wp\/v2\/media\/214"}],"wp:attachment":[{"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}