1. 倉庫伺服器 -> 搜尋unifi -> 「右鍵」下載映像檔,選擇latest

2. 停止容器

3. 選擇「重置」!完成! 控制器變成新版了

PYTHON、UBUNTU、MAC、CMS
export ACCOUNT_EMAIL="OOO@XXX.XXX"
/usr/local/acme.sh/acme.sh --set-default-ca --server zerossl
如果站點沒有順利更換過去,乾脆vhost重建,再重選需要 SSL
server {
listen 80;
server_name yourname.com;
return 301 https://$server_name$request_uri;
# 不好的方法:
rewrite ^/(.*)$ http://example.com/$1 permanent;
# 好的方法:
rewrite ^ http://example.com$request_uri? permanent;
# 更好的方法:
return 301 http://example.com$request_uri;
寫完Python Code後,為了在任何一台windows電腦可以順利執行,可以安裝用PyInstaller 這個Package來達成這項任務,這樣就不會每一台電腦都安裝Python相關程式和套件了!
PyInstaller 可以將 Python 轉成 exe 執行檔,好在windows執行。
套件說明:https://pyinstaller.readthedocs.io/en/stable/
pip install pyinstaller
2. 找到要轉檔的資料夾位置,然後下指令
pyinstaller -F XXX.py
3. 就可以完成打包,會產生幾個資料夾,其中dist
資料夾內會有轉檔後的 exe
檔。
最近acme.sh 會使用zero ssl,如果要改回letsencrypt
acme.sh --set-default-ca --server letsencrypt
附帶:
如果要解除.user.ini
的鎖定
chattr -i xxx/.user.ini
Starting at notebook version 5.0, you can enter and store a password for your notebook server with a single command. jupyter notebook password will prompt you for your password and record the hashed password in your jupyter_notebook_config.json
.
from notebook.auth import passwd passwd()
$ docker exec -it miniconda /bin/bash
可以開第二個終端機,進去進行pip安裝套件等工作 -i:互動模式 -t:終端機 -d:在背景執行
開始設定環境(假如是linux的話,可以輸入以下指令即可:) # 啟動環境 $ conda activate 999 # 關閉環境 $ conda deactivate
docker logs --tail 3 notebook