> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dwe.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# dweOS Legacy

<Warning>
  dweOS Legacy は [dweOS 2.0](/ja/dwe-os) への移行に伴い段階的に廃止されました。
</Warning>

## インストール

<Tabs>
  <Tab title="オプション 1: Raspberry Pi イメージを書き込む(推奨)">
    <Steps>
      <Step title="ステップ 1">
        最新のイメージを[こちら](https://github.com/DeepwaterExploration/dweOS/releases/)からダウンロードします。
      </Step>

      <Step title="ステップ 2">
        [Raspberry Pi Imager](https://www.raspberrypi.com/software/) をダウンロードして、イメージを SD カードに書き込みます。
      </Step>

      <Step title="デバイスを選択する">
        <video controls={true} autoPlay loop height="300px" className="w-full aspect-video" src="https://cdn.shopify.com/videos/c/o/v/ce746d70d36443e4b5dcbab6a2e89a87.webm" />
      </Step>

      <Step title="dweOS イメージを選択する">
        <video controls={true} autoPlay loop height="300px" className="w-full aspect-video" src="https://cdn.shopify.com/videos/c/o/v/7cc23a4b35724451886fb1eea783edf8.webm" />
      </Step>

      <Step title="SD カードを選択する">
        <video controls={true} autoPlay loop height="300px" className="w-full aspect-video" src="https://cdn.shopify.com/videos/c/o/v/70b76e866efd4757ac16f1d1cf577395.webm" />
      </Step>

      <Step title="完了!">
        ![dweOS 成功](https://cdn.shopify.com/s/files/1/0575/8785/9626/files/dwe_os_1_step_4.png)
      </Step>
    </Steps>
  </Tab>

  <Tab title="オプション 2: SSH してインストール">
    ## 接続する

    <Card title="SSH 手順" icon="link" href="/ja/dwe-os/guides/ssh-rpi">
      まず Raspberry Pi に SSH 接続します。
    </Card>

    <Steps>
      <Step title="インストールスクリプト">
        Raspberry Pi にインストールするには、次のコマンドを実行します:

        ```sh theme={null}
        sudo apt update

        sudo apt upgrade

        curl -fsSL https://raw.githubusercontent.com/DeepwaterExploration/dweOS/main/scripts/install.sh | sudo -E bash -
        ```
      </Step>

      <Step title="完了">
        インストールが完了すると、スクリプトは次のメッセージで終了します:

        ```
        Installation of dweOS was successful.
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="オプション 3: 手動インストール">
    <Warning> このガイドは熟練ユーザーのみが従ってください。 </Warning>

    以下のインストールスクリプト内の個別の手順に従うことで、手動で(`Raspberry Pi` やその他の `ARM`/`x86` システムに)インストールできます。

    ### NodeJS 20 と NPM をインストールする

    ```sh theme={null}
    sudo apt update
    sudo apt upgrade
    curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
    sudo apt install nodejs
    curl -L https://npmjs.org/install.sh | sudo sh
    ```

    ### その他の依存関係をインストールする:

    ```sh theme={null}
    sudo apt install libudev-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev gstreamer1.0-plugins-good gstreamer1.0-plugins-bad
    ```

    ### dweOS をインストールする:

    ```sh theme={null}
    sudo npm install -g @dwe.ai/dwe-os-1
    ```

    ### dweOS を手動で実行する:

    シェルに次を入力します:

    ```sh theme={null}
    dwe-os-1
    ```

    次に `Enter` を押します。末尾に `--help` を付けると、その他のオプションを確認できます。

    ### 自動起動(RPi)

    自動起動を有効にする(Raspberry Pi で推奨):

    1. [pm2](https://www.npmjs.com/package/pm2) をインストールします:

    ```sh theme={null}
    sudo npm install -g pm2
    ```

    2. pm2 から dwe-os-1 を起動します:

    ```sh theme={null}
    pm2 start dwe-os-1
    ```

    3. プロセスリストを保存します:

    ```sh theme={null}
    pm2 save
    ```

    4. Raspberry Pi で pm2 のスタートアップを有効にします:
       Raspberry Pi:

       ```sh theme={null}
       sudo pm2 startup systemd -u pi --hp /home/pi
       ```

       カスタムシステム:

       ```sh theme={null}
       sudo pm2 startup systemd -u <your username> --hp /home/<your username>
       ```
  </Tab>
</Tabs>
