Go38Box修改自MoodleBox,而MoodleBox一開始就是設定在Raspberry Pi 3上執行運作,讓使用者可以隨身帶著一個Raspberry Pi 3及行動電源就可以使用Moodle教學平台,MoodleBox官網有做動的img檔可供使用者下載,然後燒錄到Raspberry Pi 3,或者可以透過手動建置的方式,在剛開始官方所提供的是一步一步的指令去修改設定,接著又轉換成使用script自動安裝(github中切換到Branch:https),現在則改用Ansbile自動化組態管理把Moodle安裝到Raspberry Pi 3中,而Go38Box的溫濕度也透過Ansible自動化組態管理來做安裝設定,安裝及設定的方式和Moodlebox一樣,所以以下就依Moodlebox官方的安裝步驟做說明
在官方的Github中有以下10點的安裝步驟
To build a MoodleBox from scratch with this script, you need a Raspberri Pi 3 (Wi-Fi!) and follow these instructions.
Clone Rasbpian Stretch Lite on your microSD card.
Create asshfile on thebootpartition, e.g. usingtouch ssh
Insert the microSD card into your Raspberry
Connect your Raspberry to your Ethernet network and boot it.
Create akeysdirectory in the repository folder and copy your public key into it, under the nameid_rsa.pub.
Get the IP address of your RaspberryPi and change it in thehosts.ymlfile. Do not change anything else, unless you know what you're doing. You're on your own.
Runansible-playbook moodlebox.ymlfrom the repository folder.
Wait 30–50 minutes, depending on your SD card and Internet bandwidth. You're done.
1. Clone Rasbpian Stretch Lite on your microSD card.
8. Get the IP address of your RaspberryPi and change it in thehosts.ymlfile. Do not change anything else, unless you know what you're doing. You're on your own.
allen-mba:~ allen$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/allen/.ssh/id_rsa):
Created directory '/Users/allen/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/allen/.ssh/id_rsa.
Your public key has been saved in /Users/allen/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:nCpzaCPq6waI3KTpm0sq+Yfoxku/ENVcL2gKX2ZLJrE allen@allen-mba.local
The key's randomart image is:
+---[RSA 2048]----+
| . . |
| = o . |
| . E @ . . |
| +.X .... |
|+.=o . S |
|++.. . . |
|+*..* o |
|B*=o.= |
|X@*+. |
+----[SHA256]-----+
allen-mba:~ allen$ ls -al ~/.ssh/
total 16
drwx------ 4 allen staff 128 3 7 15:28 .
drwxr-xr-x+ 53 allen staff 1696 3 7 15:27 ..
-rw------- 1 allen staff 1675 3 7 15:28 id_rsa
-rw-r--r-- 1 allen staff 403 3 7 15:28 id_rsa.pub
allen-mba:~ allen$ cp ~/.ssh/id_rsa.pub ~/temp/allen-mbp:go38box-t-bpi/keys/
allen-mba:~ allen$ ls ~/temp/allen-mbp:go38box-t-bpi/keys/
id_rsa.pub
allen-mba:~ allen$ ssh pi@raspberrypi.local
The authenticity of host 'raspberrypi.local (fe80::5f74:cb72:5324:c40b%en0)' can't be established.
ECDSA key fingerprint is SHA256:rvM07WHr9gcI+KOY1sr7+m3IpvakmgMRnpGt6tP2i8w.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'raspberrypi.local,fe80::5f74:cb72:5324:c40b%en0' (ECDSA) to the list of known hosts.
pi@raspberrypi.local's password:
Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Mar 7 09:23:27 2018
SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.