と、思うも「App Center」にないので困った。Python3 はあるのに。筆者の QNAP マシンがショボい(TS-110P+, ARMv5
, メモリ 512MB)ため QNAP 用のコンテナ環境「Container Station」も入れられない仕様で、どうしよう。(棒読み)
Docker は諦めるにしても、gcc
make
も入ってないし。git
くらいは簡単にインストールできる apt
yum
brew
のような CLI 版のパッケージマネージャーはないものか。
- 検証機器:OS: QTS 4.3.3, TS119P+, 1ベイ, Marvell ARMv5(ARMADA 300/Feroceon 88F6282, 2010年11月発売モデル)
TL; DR(概要)
opkg
コマンドで、git
のipk
パッケージをインストールしてどうか。2018年版 Entware(Entware-std) の
QPKG
アプリをインストールすると使えるようになります。
ffmpeg
は v4.3.1、php-cli
は v7.4.12、go(golang)
は v1.15.5 が入っちゃいますよ。(2021/01/27 現在)
-
準備
- 「アプリジポジトリ」にリポジトリ XML ファイルを追加する。
- 更新後、「
Entware-std
」を「App Center」からインストールする。 - QNAP 本体に SSH 経由で接続する。
-
opkg
コマンドの利用方法(git
を入れたい場合)-
$ opkg update
で最新のパッケージ情報を取得する。 -
$ opkg upgrade
でインストール済みパッケージを更新する。 -
$ opkg list git
でgit
パッケージがあるか検索する。 -
$ opkg info git
でgit
パッケージの情報を表示する。(出どころ、バージョンや依存など) -
$ opkg install git
でgit
をインストールする。 -
$ opkg install git-http
も入れてhttp
によるclone
をできるようにする
(これを入れないとgit: 'remote-https' is not a git command. See 'git --help'.
)エラーが出る。 -
$ opkg list-installed
でインストール済みパッケージを確認する。 -
$ opkg remove git
でgit
をアン・インストールする。 -
$ opkg status
でパッケージの状態を確認する。 - アプデしてもバージョンが変わらない場合は再接続してみる。(パス変更の問題)
-
_ ∩
( ゚∀゚)彡 Opkg!Opkg!
⊂彡
TS; DR(詳細)
インフォ
-
Entware-3x-std
とEntware-ng
はEntware-std
に統合されたことが 2018/03/07 にアナウンスされました。ちなみにng
はno-good
ではなくnext-generation
の略です。- QNAP Forum: https://forum.qnap.com/viewtopic.php?f=351&t=139781 (要ログイン)
- GitHub: https://github.com/Entware/Entware
- 対応プラットフォーム:
x86
,x64
,ARM5
,ARM7
andMIPS forks
-
Entware-3x
の QPKG アプリをすでにインストール済みの場合- ARMv7 版 QNAP の場合
-
opkg update
opkg upgrade
を2回実行すると、Entware
にアップグレードできます。 - 「AppCenter」からアンインストール後、本記の手順ででも可。(推奨)
-
- ARMv5 版 QNAP の場合
- 「AppCenter」からアンインストール後、本記の手順で行います。
- ARMv7 版 QNAP の場合
-
opkg
コマンドでインストールされたパッケージ(バイナリ)の設置先/opt/bin
-
opkg
コマンドでインストールできるipk
パッケージ一覧- https://bin.entware.net/armv5sf-k3.2/Packages.html (ARMv5)
- http://bin.entware.net/armv7sf-k3.2/Packages.html (ARMv7)
- https://bin.entware.net/ (その他)
- インストール可能な有名どころの
ipk
パッケージ例-
asterisk
bind
boost.python
busybox
cmake
coreutils
django
erlang
gcc
ghostscript
go(golang)
libc
lua
lynx
make
mariadb
nginx
perl
PHP7
python3
redis
ruby
pgsql
mariadb
transmission
tree
zsh
youtube-dl
vim
tor
softethervpn
- 詳しくは
opkg list
を試してみよう。
-
-
Differences between Entware standard installation and Entware-ng/Entware-3x
Current armv7 architecture users running Entware-ng, or any user currently running Entware-3x, can switch to Entware by running
opkg update; opkg upgrade
twice. Qnap owners using Entware-ng (armv5, x64) can upgrade to the new Entware using unofficial instructions published in this topic. This will not change package name in AppCenter.Entware standard installation is similar to Entware-ng. It does not install Entware version of busybox and adds /opt/bin and /opt/sbin to the end of PATH variable. There is also alternative installer in Entware that is similar to Entware-3x installer.
It installs Entware version of busybox. For this installation Entware users are independent from firmware users. Entware has root user with 12345 password. Other users can be added permanently to Entware in this case to run services that require such users.- Entware の BusyBox 環境内の
root
ユーザーのデフォルト・パスワードは "12345" らしい。
opkg
コマンドのインストール手順-
コミュニティ版リポジトリを追加する。
「App Center」の「アプリジポジトリ」設定に、EU 圏の QNAP Club が提供している XML ファイルを追加します。これによりコミュニティ版の QPKG アプリがインストールできるようになります。(互換性のあるものに限る) -
で更新後、「
Entware-std
」を検索してインストールする- これにより Entware のコミュニティが動作確認した ipk 形式のパッケージを
opkg
コマンドでインストールできるようになります。 -
Entware-3x-std
Entware-ng-std
でも動きますが、今後はアップデートされないので注意。Entware-std
のインストールをおすすめします。
- これにより Entware のコミュニティが動作確認した ipk 形式のパッケージを
-
QNAP に SSH 接続する
$ ssh admin@192.168.xx.xx [~] # whoami admin [~] # ## CPU やカーネルのバージョンを確認する(ARMv5が確認できた) [~] # uname -a Linux NASxxxxxx 3.4.6 #1 Mon Oct 29 10:28:40 CST 2018 armv5tel GNU/Linux [~] # ## QNAP のファームウェア/QTSのバージョン確認コマンド [~] # getcfg system version 4.3.3
- 「
QNAP
ssh接続
公開鍵認証
」の Qiita 記事検索 @ Google
- 「
-
opkg
コマンドの確認とアップデートこの
opkg
がパッケージマネージャーのコマンドになります。[~] # opkg --version opkg version 0.1.8 [~] # ## 大事なことなので2回実行します(以降は1回でOK) [~] # opkg update; opkg upgrade [~] # opkg update; opkg upgrade
-
例として
git
コマンドのパッケージ確認とインストールをしてみる[~] # ## 既存の Git がないか確認 [~] # git --version -sh: git: command not found [~] # ## Entware のリポジトリに Git があるか検索 [~] # opkg list git git - 2.19.2-2 - Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency. [~] # ## Git のインストール [~] # opkg install git Installing git (2.19.2-2) to root... Downloading http://bin.entware.net/armv5sf-k3.2/git_2.19.2-2_armv5-3.2.ipk Installing libopenssl (1.0.2p-1a) to root... Downloading http://bin.entware.net/armv5sf-k3.2/libopenssl_1.0.2p-1a_armv5-3.2.ipk Installing zlib (1.2.11-2) to root... Downloading http://bin.entware.net/armv5sf-k3.2/zlib_1.2.11-2_armv5-3.2.ipk Configuring zlib. Configuring libopenssl. Configuring git. [~] # ## インストールされた Git のバージョン確認 [~] # git --version git version 2.19.2 [~] # ## インストールされた Git の場所を確認 [~] # which git /opt/bin/git
参考文献
- 「Entware-ng & Entware-3x merge!!!」| Forum @ QNAP.com
- 「[QPKG] Entware-ng - Optware & Qnapware replacement (all platforms)」| Forum @ QNAP.com
- 「QNAPのパッケージマネージャ」@ Qiita
- 「QNAP にパッケージマネージャを入れる」@ Qiita
- 「QNAP firmware 4.1.4以降にgccを入れる」@ Qiita
- Entware の BusyBox 環境内の