5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Intel Compute Stick をサーバ化

Last updated at Posted at 2018-10-05

Intel Compute Stick を Ubuntu Server に

x86_64 で,ある程度の処理をこなせる安価な小型 PC が欲しくて Intel Compute Stick を購入.
しかしデフォルトで入っている Ubuntu 14.04 LTS は GUI しか無くて,
8GB しかないストレージを圧迫しているし,Wi-Fi のレイテンシがやたら高くて不安定.
そこで Ubuntu 18 を導入し,サーバとして動かすまでの初期設定をメモ.

Intel Compute Stick の Wi-Fi 問題

Ubuntu 18 はデフォルトでは Wi-Fi モジュールの RTL8723BS を認識しない.
しかしインターネット無しでインストールを進めるのは色々と困難があるので,
有線 LAN ポートの付いた USB ハブを使って有線ネットワーク接続を行い,
Ubuntu 18 を USB メモリからブートしてインストール.

RTX8723BS 用のドライバをインストール

Intel Compute StickでUbuntu16.04 を使うを参考に,以下のコマンドを実行.
これもインターネット接続があればこそできることなので,
有線 LAN ポート付きの USB ハブは偉大.

$ sudo apt update
$ sudo apt install build-essential linux-headers-generic git
$ git clone https://github.com/hadess/rtl8723as.git
$ cd rtl8723as
$ make
$ sudo make install
$ sudo depmod -a
$ sudo modprobe r8723bs

Wi-Fi の設定

Ubuntu 17 からはネットワーク管理に netplan が採用されたので,せっかくなので使ってみた.
複数の SSID (hoge, piyo) にそれぞれのパスワード(fuga, hogera)を設定しておけば,
自動でつなぎ変えてくれるようになる.
昔は wpa-roam でやっていたなぁ.
optional: true とすることで,ブート時にネットワーク構成に失敗しても待たない設定になる.

$ sudo vim /etc/netplan/interfaces.yaml

+ network:
+     version: 2
+     renderer: networkd
+     ethernets:
+         eth0:
+             addresses: []
+             dhcp4: true
+             optional: true
+     wifis:
+         wlan0:
+             addresses: []
+             dhcp4: true
+             optional: true
+             access-points:
+                 "hoge":
+                     password: "fuga"
+                 "piyo":
+                     password: "hogera"

$ sudo netplan apply

HDMI モニタ無しでの起動

GRUB の設定などで対応する方法もあるようなのだが,試したが上手く行かず.
HDMI のモニタとして認識されるデバイスを挿すことで対応.
しかし一般的にこのデバイスは HDMI のオス端子なので,HDMI のメスメスコネクタで接続.

apt のゴミを削除

ストレージを圧迫しがちな不要なパッケージは適宜削除する.

$ df
$ sudo apt autoremove

できあがり

あとは ssh や systemd あたりの設定をしておけば,USB mini type C で電源を与えればどこでもサーバとして起動する PC のできあがり.
ラズパイとの比較は以下.

Item ComputeStick Raspberry Pi 3B
CPU Intel Atom Z3735F ARM Cortex-A53
Core 4 4
Clock 1.33~1.83GHz 1.2~1.5GHz
RAM 1GB 1GB
Storage 8GB N/A
USB 2.0x1 2.0x4
Size 10.3 x 3.8 x 1.3 cm 8.5 x 5.6 x 1.7 cm
Weight 54.5g 45.4g
w/ Fan, MicroSD, Cover Ethernet, φ3.5cmOutput,...
w/o Audio Storage, A/C Adapter, Cover
Custom Difficult Easy
Price 5,740 JPY 5,220 JPY

見た目の性能,価格はほとんど変わらないが,処理は Intel Compute Stick の方が速い気がした.
BogoMips で比較するのも恥ずかしいが,Intel Compute Stick は 2665.60,Raspberry Pi 3 は 38.40 なので速度に影響が出る程度の差はある.
そこは Intel x86 と ARM Cortex やら CPU キャッシュ・ストレージ速度の違いか.
特にハードのカスタマイズをしない用途ならば,Intel Compute Stick も悪くないと思う.

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?