Skip to content

Instantly share code, notes, and snippets.

@ycku
Last active April 22, 2025 06:48
Show Gist options
  • Select an option

  • Save ycku/fa3110bce427cf2c1f1ca4a680d594e8 to your computer and use it in GitHub Desktop.

Select an option

Save ycku/fa3110bce427cf2c1f1ca4a680d594e8 to your computer and use it in GitHub Desktop.

Revisions

  1. ycku revised this gist Mar 13, 2020. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions apt-offline.md
    Original file line number Diff line number Diff line change
    @@ -35,8 +35,8 @@ offline$ sudo apt-offline install update.zip
    ## apt upgrade

    ```
    offline$ sudo apt-offline set --upgrade update.sig
    online$ apt-offline get upgrade.sig --threads 5 --bundle update.zip
    offline$ sudo apt-offline set --upgrade upgrade.sig
    online$ apt-offline get upgrade.sig --threads 5 --bundle upgrade.zip
    offline$ sudo apt-offline install upgrade.zip
    offline$ sudo apt-get upgrade
    ```
  2. ycku revised this gist Oct 5, 2019. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions apt-offline.md
    Original file line number Diff line number Diff line change
    @@ -52,3 +52,6 @@ online$ apt-offline get install.sig --threads 5 --bundle install.zip
    offline$ sudo apt-offline install install.zip
    offline$ sudo apt-get install apache2 libapache2-mod-php
    ```

    - 檔名可自由取名
    - 不能使用 apt,要用 apt-get
  3. ycku revised this gist Oct 5, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion apt-offline.md
    Original file line number Diff line number Diff line change
    @@ -44,7 +44,7 @@ offline$ sudo apt-get upgrade
    - 檔名可自由取名
    - 不能使用 apt,要用 apt-get

    ### apt install
    ## apt install

    ```
    offline$ sudo apt-offline set install.sig --install-packages apache2 libapache2-mod-php
  4. ycku revised this gist Oct 1, 2019. 1 changed file with 10 additions and 3 deletions.
    13 changes: 10 additions & 3 deletions apt-offline.md
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,17 @@
    ## Advantages
    1. 相容原有的 source list
    2. 只下載需要安裝的套件
    3. 步驟單純

    ## Goals

    基本上就是處理下面三種(apt update, upgrade, install)需要網路的操作
    - online$: 表示在有對外網路的主機操作
    - offline$: 表示在無對外網路的主機操作
    - 如何把檔案存放到你的 offline 主機,因環境各異,請自行處理
    - 會依 offline 主機的 source list 取得更新,與 online 主機的設定無關

    ### Install apt-offline
    ## Install apt-offline
    ```
    online$ sudo apt-get install apt-offline
    ```
    @@ -16,7 +23,7 @@ online$ sudo apt-get install apt-offline
    offline$ sudo dpkg -i apt-offline_1.8.1_all.deb
    ```

    ### apt update
    ## apt update
    ```
    offline$ sudo apt-offline set --update update.sig
    online$ apt-offline get update.sig --threads 5 --bundle update.zip
    @@ -25,7 +32,7 @@ offline$ sudo apt-offline install update.zip

    - 檔名可自由取名

    ### apt upgrade
    ## apt upgrade

    ```
    offline$ sudo apt-offline set --upgrade update.sig
  5. ycku revised this gist Oct 1, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion apt-offline.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    基本上就是處理下面三種需要網路的操作
    基本上就是處理下面三種(apt update, upgrade, install)需要網路的操作
    - online$: 表示在有對外網路的主機操作
    - offline$: 表示在無對外網路的主機操作
    - 如何把檔案存放到你的 offline 主機,因環境各異,請自行處理
  6. ycku created this gist Oct 1, 2019.
    47 changes: 47 additions & 0 deletions apt-offline.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,47 @@
    基本上就是處理下面三種需要網路的操作
    - online$: 表示在有對外網路的主機操作
    - offline$: 表示在無對外網路的主機操作
    - 如何把檔案存放到你的 offline 主機,因環境各異,請自行處理
    - 會依 offline 主機的 source list 取得更新,與 online 主機的設定無關

    ### Install apt-offline
    ```
    online$ sudo apt-get install apt-offline
    ```

    - 到 (https://pkgs.org/download/apt-offline) 取得符合你環境的 deb 檔
    - 需要 python 環境,請勿移除。

    ```
    offline$ sudo dpkg -i apt-offline_1.8.1_all.deb
    ```

    ### apt update
    ```
    offline$ sudo apt-offline set --update update.sig
    online$ apt-offline get update.sig --threads 5 --bundle update.zip
    offline$ sudo apt-offline install update.zip
    ```

    - 檔名可自由取名

    ### apt upgrade

    ```
    offline$ sudo apt-offline set --upgrade update.sig
    online$ apt-offline get upgrade.sig --threads 5 --bundle update.zip
    offline$ sudo apt-offline install upgrade.zip
    offline$ sudo apt-get upgrade
    ```

    - 檔名可自由取名
    - 不能使用 apt,要用 apt-get

    ### apt install

    ```
    offline$ sudo apt-offline set install.sig --install-packages apache2 libapache2-mod-php
    online$ apt-offline get install.sig --threads 5 --bundle install.zip
    offline$ sudo apt-offline install install.zip
    offline$ sudo apt-get install apache2 libapache2-mod-php
    ```