據說最近出了10.0版大更新,若有使用新版去運行舊版資料會出現"強制建議備份與更新資料"通知,這部分我暫時沒繼續使用縮在3.16,待之後有機會再來摸tutor。
主要會需要安裝的有docker
還有docker-compose
部分
一開始若有舊版 移除後重新安裝:
$ sudo apt-get remove docker docker-engine docker.io containerd runc
若有需要利用SSL來進行連線(HTTPS)可以安裝:
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
新增Docker的官方GPG密鑰:
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
接著來開始裝docker,輸入下面指令:
# 直接安裝最新版本
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
# 要指定安裝的版本
$ sudo apt-get install docker-ce=<VERSION_STRING> docker-ce-cli=<VERSION_STRING> containerd.io
測試安裝是否成功,給他跑看看hello world
$ sudo docker run hello-world
出現下面結果就是穩了:
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete
Digest: sha256:f9dfddf63636d84ef479d645ab5885156ae030f611a56f3a7ac7f2fdd86d7e4e
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
輸入面指令來用curl
安裝,要注意的是若安裝上有要決定其他版本需要到Github上確定版本號再輸入到指令裡面的1.25.4
裡面。
$ sudo curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
再給資料夾權限
$ sudo chmod +x /usr/local/bin/docker-compose
確認安裝是否成功可以利用檢查版本確認:
$ docker-compose --version
一樣用curl安裝,需要最新版本可以利用這邊來確認編號:
$ sudo curl -L "https://github.com/overhangio/tutor/releases/download/v3.11.6/tutor-$(uname -s)_$(uname -m)" -o /usr/local/bin/tutor
提供資料夾權限
$ sudo chmod 0755 /usr/local/bin/tutor
接著確認是否有安裝python3
、python3-pip
和libyaml-dev
沒有輸入以下:
$ sudo apt install python3 libyaml-dev python3-pip
安裝tutor-openedx
$ pip install tutor-openedx
加入tutor指令進到bash裡
$ _TUTOR_COMPLETE=source tutor >> ~/.bashrc
# 若是使用zsh
> _TUTOR_COMPLETE=source_zsh tutor >> ~/.zshrc
確認是否安裝成功可以輸入下面指令確認。
$ tutor
Learn More →
輸入
$ tutor local quickstart
接著會出現下面問答
==================================================
Interactive platform configuration
==================================================
Your website domain name for students (LMS) [lms.com] #有網域直接在這邊輸入/lms網站
Your website domain name for teachers (CMS) [studio.lms.com] #有網域直接在這邊輸入/lms工作站網站
Your platform name/title [My open edx] #這個平台/專案名稱
Your public contact email address [] #設定的email
The default language code for the platform [en] #預設平台語言
Activate SSL/TLS certificates for HTTPS access? Important note: this will NOT work in a development environment. [y/N] #有需要SSL/TLS權證給HTTPS進行嗎(不支援dev環境)
在出現這個訊息後可以測試是否成功
Learn More →
# 1) Install the plugin
$ pip install tutor-myapp
# 2) Enable the plugin
$ tutor plugins enable myapp
# 3) Reconfigure and restart the platform
$ tutor local quickstart
確認模組清單以及目前啟動狀態:
$ tutor plugins list
若要啟動或關閉模組:
$ tutor plugins enable myplugin
$ tutor plugins disable myplugin
若有更動plugins,都應該儲存config來儲存新環境:
$ tutor config save
先把套件的git放在xblock的requirement文件夾中,位置應該會在$(tutor config printroot)/env/build/openedx/requirements/private.txt
這邊。
再來進去private.txt
,編輯套件git URL,格式是:
git+<https的git URL網址>
結果大概長這樣
完成之後對檔案進行儲存,然後重新建立他
$ tutor images build openedx
在tutor/config.yml當中新增一行
CERTIFICATES_HTML_VIEW: true
之後儲存config,你可以到cms.env.json
和lms.env.json
(在env/apps/openedx/config裡面)看到:
確認沒問題後再次進行image建立,重新啟動後,這時候回到studio選擇 設定 > 證書 一定還是空的
那是因為我們還沒有設定課程模式,到django設定頁面選擇course modes
設定下面欄位
再回來看studio的 設定 > 證書 就會有新增按鈕了
主要是在這些地方確認一下設定值
# cms/envs/common.py
FEATURE["ENABLE_MAX_FAILED_LOGIN_ATTEMPTS"] = True
# 登入錯誤限制,開啟為True
MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED = 10
# 設定最多嘗試錯誤次數
MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS = 60 * 60
# 設定鎖定時間,以秒為單位。
若有出現以下類似的錯誤
ERROR: Couldn’t connect to Docker daemon at http+docker://localunixsocket - is it running?
If it’s at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
要將目前user放入docker的群組裡,再重新登出/登入:
$ sudo gpasswd -a ${USER} docker
$ su
$ su <username>
通常使用的位置指令是$(tutor config printroot)
,可以用cd移動到位置過去:
那是因為沒有設定certificate html view configuration
,請到admin裡找到這個然後把active
打勾。
可以直接重啟docker功能,利用下方指令重啟
$ sudo systemctl restart docker
利用
Dec 9, 2023真的是要謝中華電信給了一堆神一般的限制,在與朋友的研究、以及中華電信SSL憑證部門的技術員(5p 2k7ul4ej/ d9 1ul3u;6s84ej/ t/6g qo6xk7ji3cl3ru3wu0 u06ru.45k4ek7)的努力之下,終於把這鬼東西研究好了,寫下這份筆記也是想留給在目前有使用到中華電信發現DNS跳轉無法順利設定的朋友們。
Oct 23, 2023久違復活的Gary說個Hi,鑑於最近主力的筆電開始無法負荷了所以就有了這次計畫,順手做了筆記來放個。當然要先說個,每個電腦與設備環境,產生出來的化學效果(咦?)都不一樣,這邊就給大家做個參考,那就開始囉。 前因 本來要出差可以出國好開心 順勢就準備一筆錢做stand by 然而並沒有,不要瞎掰好嗎 公司加上自己的東西,256GB真的不夠用
Jun 13, 2021機台規格 因為版本有四種,這邊直接附上GITHUB REPO連結 有線連接方法 前置準備 查看sensor版本 在文件中他有說到: T-Wristband has two types of sensors, LSM9DS1 and MPU9250 sensors. How to distinguish the version you bought, please see the upper right part of the board below to distinguish
May 14, 2021or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up