{"id":255269,"date":"2015-07-22T14:44:07","date_gmt":"2015-07-22T06:44:07","guid":{"rendered":"http:\/\/blog.zhenglei.net\/?p=255269"},"modified":"2015-07-22T14:44:07","modified_gmt":"2015-07-22T06:44:07","slug":"setup-mirror-of-openwrt-package-repository","status":"publish","type":"post","link":"https:\/\/blog.zhenglei.net\/?p=255269","title":{"rendered":"Setup mirror of Openwrt package repository"},"content":{"rendered":"<p>Suppose we need a local package repository, 15.05-rc3 branch of\u00a0 newif<\/p>\n<p>&nbsp;<\/p>\n<p># Create local repository directory<\/p>\n<p>mkdir -p \/mirror\/openwrt<\/p>\n<p>&nbsp;<\/p>\n<p># Goto repository directory<\/p>\n<p>cd \/mirror\/openwrt<\/p>\n<p>&nbsp;<\/p>\n<p># download packages with wget<\/p>\n<p>wget -m &#8211;no-parent -e robots=off\u00a0 http:\/\/downloads.openwrt.org\/chaos_calmer\/15.05-rc3\/ramips\/mt7620\/packages\/<\/p>\n<p>&nbsp;<\/p>\n<p># config http server, here lighttpd<\/p>\n<p># add alias in configure:\u00a0 alias.url = (&#8220;download.openwrt.org&#8221;=&gt;&#8221;\/mirror\/openwrt\/downloads.openwrt.org\/&#8221;)<\/p>\n<p># restart http server<\/p>\n<p>\/etc\/init.d\/lighttpd restart<\/p>\n<p>&nbsp;<\/p>\n<p># Modify OPKG-Configuration in luci web site<\/p>\n<p># src\/gz chaos_calmer_base http:\/\/localip\/downloads.openwrt.org\/&#8230;&#8221;<\/p>\n<p>#&#8230;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Suppose we need a local package reposito &hellip; <a href=\"https:\/\/blog.zhenglei.net\/?p=255269\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[233],"tags":[],"class_list":["post-255269","post","type-post","status-publish","format-standard","hentry","category-openwrt"],"_links":{"self":[{"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/posts\/255269","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=255269"}],"version-history":[{"count":1,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/posts\/255269\/revisions"}],"predecessor-version":[{"id":255270,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/posts\/255269\/revisions\/255270"}],"wp:attachment":[{"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=255269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=255269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=255269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}