使用 Android 手機來遙控 Kodi 實在是太累了,畫面及按鍵都很小,常常會按錯,而且很傷眼,所以改用 iPad,畫面及按鍵都比 Android 大多了!
1. 首先在 Apple App Store 搜尋 Official Kodi Remote,按 取得
[@more@]2. 選擇 安裝
還有很多的功能,值得深入好好使用!
全新的繁體中文 WordPress 網站《宜蘭部落格教育平台 網站》
因為 Kodi 安裝完成後,就不接上鍵盤或是滑鼠了,改用手機來遙控會比較方便一些,而且 Kodi 雖然可以顯示中文,但卻無法輸入中文,這時候可以在手機中輸入後,再傳送到 Kodi。
在 Kodi 上要安裝 Web Server 功能
1. 選擇 系統 / 系統設定
[@more@]2. 選擇 服務
4. 依序設定,允許 HTTP 遠端遙控,連接埠預設是 8080,這裡我更改成 80,
帳號預設是 kodi 不做更改,設定密碼
在 Android 手機上設定
6. 開啟 Google Play 商店,搜尋 official xbmc remote,並安裝
原本在家中的電視旁邊有放置一台小的 HTPC 電腦,當做影片播放器,但用的次數不是很多,覺得有些浪費,所以想改用 Banana Pi M2+ 來取代,但因為 M2+ 上擷圖比較麻煩,所以改用 Windows 平台來處理,之後實際運作的平台就會改在 Banana Pi M2+。
關於 Kodi 的介紹可以參考 Kodi – 維基百科,自由的百科全書。
Kodi 下載網站:https://kodi.tv/download/
支援的平台,這裡可以下載所須的版本
Current release: Kodi v16.1
Development builds: Kodi v17.0[@more@]1. 執行下載下來的檔案
# /DietPi/dietpi/dietpi-autostart
# /DietPi/dietpi/dietpi-banner
———————————————————————–
DietPi | 15:17 | Sat 07/01/17
———————————————————————–
V141 | OrangePi PC (armv7l)
———————————————————————–
IP Address | 192.168.1.19
———————————————————————–[@more@]
# /DietPi/dietpi/dietpi-cleaner
# /DietPi/dietpi/dietpi-cpu_set
DietPi-Cpu_Set
———————————————————————–
Mode: Applying CPU gov
Please wait…
[Ok] CPU gov applied: interactive
# /DietPi/dietpi/dietpi-cpuinfo
———————————————————————————————-
DietPi CPU Info
Use dietpi-config to change CPU / performance options
———————————————————————————————-
Architecture | armv7l
Temp | 61’c | Running hot, not recommended.
Governor | interactive
Current Freq Min Freq Max Freq
CPU0 | 480 Mhz 480 Mhz 1800 Mhz
CPU1 | 480 Mhz 480 Mhz 1800 Mhz
CPU2 | 480 Mhz 480 Mhz 1800 Mhz
CPU3 | 480 Mhz 480 Mhz 1800 Mhz
CPU4 | 480 Mhz 480 Mhz 1800 Mhz
CPU5 | 480 Mhz 480 Mhz 1800 Mhz
CPU6 | 480 Mhz 480 Mhz 1800 Mhz
CPU7 | 480 Mhz 480 Mhz 1800 Mhz
# /DietPi/dietpi/dietpi-drive_manager
# /DietPi/dietpi/dietpi-update
# /DietPi/dietpi/dietpi-logclear
DietPi-Logclear
———————————————————————————————-
Mode: Welcome
Please wait…
Available commands:
dietpi-logclear 0
Backup contents of all log files from /var/log to /root/logfile_storage/*.
Also clears the contents of all logs files in /var/log.
dietpi-logclear 1
Clear contents of all logs files in /var/log.
dietpi-logclear 2
Physically delete all files in /var/log and backups in /root/logfile_storage/*.
May prevent log files from being updated, restart services or reboot.
# /DietPi/dietpi/dietpi-process_tool
# /DietPi/dietpi/dietpi-survey
[Info] Testing connection to dietpi.com
[Info] Max duration of 20 seconds, please wait…
[Ok] Connection test | Completed
# /DietPi/dietpi/dietpi-services
DietPi-Services
———————————————————————————————-
Mode:
Please wait…
DietPi-Services
Available commands: start / stop / restart / enable / disable
# /DietPi/dietpi/dietpi-services mysql stop
DietPi-Services
———————————————————————————————-
Mode: mysql
Please wait…
DietPi-Services
Available commands: start / stop / restart / enable / disable
# /DietPi/dietpi/dietpi-update
DietPi-Update
————————————————————————–
Mode: Checking for DietPi updates
Please wait…
[Info] Checking Mirror : http://dietpi.com/downloads/dietpi-update_mirror/master/server_version
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5 100 5 0 0 4 0 0:00:01 0:00:01 –:–:– 4
[Ok] Using update server: http://dietpi.com/downloads/dietpi-update_mirror/master/server_version
[Ok] No updates required, your DietPi installation is up to date.
[Info] Current Version : 141
[Info] Server Version : 141
DietPi 本身是 base on Debian,所以除了可以使用 apt / dpkg 來安裝及移除軟體外,也可以利用 dietpi-software 來安裝套件。
1. 執行
# /DietPi/dietpi/dietpi-software
GPLv2 授權
[@more@]
這裡安裝的是 LLAP ( Linux + Lighttpd + MariaDB + PHP )
安裝完成後,系統會自動重新開機
檢查系統是否有正常安裝完成並啟動相關服務
# netstat -antulp | grep LISTEN
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1225/mysqld
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1036/lighttpd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 447/dropbear
tcp6 0 0 :::80 :::* LISTEN 1036/lighttpd
tcp6 0 0 :::22 :::* LISTEN 447/dropbear
dietpi-config 是 DietPi 的設定工具。
1. 執行
# /DietPi/dietpi/dietpi-config
[@more@]1 Display Options(顯示選項)
Change Resolution (改變解析度)
GPU/RAM Memory Split (GPU / 記憶體分割)
LCD Panel addon: none (增加 LCD Panel: 無)
Change CPU Governor : interactive ( 改變 CPU 調速器 : 互動式)
CPU Throttle Up : 50% ( CPU 運作頻率閥值)
有效的設定範圍:30 ~ 95,建議設定值:Desktop = 50%,Server = 85%
CPU Max Freq Limit : Disabled (CPU 最大工作頻率限制:無)
Swapfile size : 100 MB ( 設定 Swapfile 大小 )
Time sync mode : Boot + Daily ( 時間同步的方式:開機 + 每天)
Bluetooth : Enabled ( 藍芽 : 開啟 )
Serial console : Disabled ( 串行控制台 : 取消 )
5 Language/Regional Options ( 語言/地區 選項 )
Locale Change Language and Regional Settings ( Locale 設定 )
Timezone Change Timezone Location Setting ( 時區設定 )
Keyboard Change Keyboard Language Setting ( 鍵盤設定 )
Change Root Password ( 改變 root 密碼 )
7 Network Options: Adapters ( 網路選項: 介面)
手上舊的 Banana Pi 大概有四、五片,其中有一片目前因為原本負責的工作,被整併而空閒下來,上了原 Banana Pi 官網,發現它的 Image OS 版本,大多不再更新了,有些新的系統都沒有了,連 Ubuntu Server 系統也沒有![@more@]後來找到了 armbian,它支援多種單晶片的板子,有些連聽過都沒有聽過。
選擇 Download
預設登入的帳號及密碼:root / 1234,登入系統會要求更改密碼
(current) UNIX password: 1234
Enter new UNIX password:輸入您要使用的密碼
Retype new UNIX password:再一次確認
原本是安裝 dnsmasq 來當做 DHCP Server,在沒有設定防火牆時,Windows Client 都可以正常取得 IP,但加上防火牆之後,Client 端變成無法自動取得 IP,試了很久都無法解決,確定防火牆設定檔是沒有問題的,所以乾脆就改用 isc-dhcp DHCP Server 了。
1. 安裝 isc-dhcp DHCP Server
# apt-get update
# apt-get install isc-dhcp-server
etting up isc-dhcp-server (4.3.1-6+deb8u2) …
Generating /etc/default/isc-dhcp-server…
[FAIL] Starting ISC DHCP server: dhcpd[….] check syslog for diagnostics. … f
failed!
invoke-rc.d: initscript isc-dhcp-server, action “start” failed.
安裝完成會出現 failed 的訊息,是因為還沒有設定的關係![@more@]2. 停止原本的 dnsmasq
# /etc/init.d/dnsmasq stop
3. 設定 dnsmasq 開機不執行
# update-rc.d dnsmasq remove
4. 設定 isc-dhcp Server 派送 IP 的網路卡
# vim /etc/default/isc-dhcp-server
INTERFACES=”br0″
5. 修改 /etc/dhcp/dhcpd.conf 設定檔
# cp /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.$(date +%F)
# grep -vE ‘^$|^#’ /etc/dhcp/dhcpd.conf
ddns-update-style none;
option domain-name “lwrt.org”;
option domain-name-servers 168.95.1.1,140.111.66.1;
default-lease-time 7200;
max-lease-time 10800;
log-facility local7;
subnet 192.168.84.0 netmask 255.255.255.0 {
range 192.168.84.101 192.168.84.120;
option routers 192.168.84.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.84.0;
}
host passacaglia {
hardware ethernet 61:62:63:64:d7:cc;
fixed-address 192.168.84.101;
}
6. 測試一下試定檔是否正常
# /usr/sbin/dhcpd -t
Internet Systems Consortium DHCP Server 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Config file: /etc/dhcp/dhcpd.conf
Database file: /var/lib/dhcp/dhcpd.leases
PID file: /var/run/dhcpd.pid
7. 啟動 isc-dhcp DHCP Server
# /etc/init.d/isc-dhcp-server start
8. 設定開機時啟動 isc-dhcp DHCP Server
# update-rc.d isc-dhcp-server defaults
Banana Pi M3 上的 DietPi 開機之後,預設會直接以 root 身份登入,雖然很方便,但可能會有資安上的問題。
參考網頁:
linux – Automatic root login in Debian 8.0 (console only) – Super User
1. 先備份原檔
# cp /etc/systemd/system/getty@tty1.service.d/autologin.conf /etc/systemd/system/getty@tty1.service.d/autologin.conf[@more@]
2. 進行修改
# sed -i ‘/–autologin root / s///’ /etc/systemd/system/getty@tty1.service.d/autologin.conf
3. 如果後悔
# sed -i ‘s/agetty/agetty –autologin root/’ /etc/systemd/system/getty@tty1.service.d/autologin.conf