最輕量安裝的 Debian 加 Gnome
原本手上有台筆電是安裝 ubuntu 的,但是最近一些問題不想繼續使用 預設的應用程式,強制改用 snap 安裝 會看到 ubuntu pro 的廣告 OS 版本更新雖然快,但是不穩定 效能有點差 所以我打算回到 Debian,自己掌握自己的筆電,選擇最小安裝,只安裝有需要的軟體,以最小化需要的硬碟空間跟記憶體 ...
原本手上有台筆電是安裝 ubuntu 的,但是最近一些問題不想繼續使用 預設的應用程式,強制改用 snap 安裝 會看到 ubuntu pro 的廣告 OS 版本更新雖然快,但是不穩定 效能有點差 所以我打算回到 Debian,自己掌握自己的筆電,選擇最小安裝,只安裝有需要的軟體,以最小化需要的硬碟空間跟記憶體 ...
記錄一下在 GCP 上開一台有桌面環境的 VM 的過程 開一台 VM 到 GCP 的 compute engine,建立一台 VM,以下是這次測試選用的設定 e2-medium (2 vCPU, 4 GB) Spot 等待 VM 建立完成 從 VM 列表上點 SSH 連線,會開啟一個 SSH 的 web terminal 登入 VM 安裝 Chrome Remote Desktop 在 SSH 視窗,輸入以下指令,安裝 Chrome Remote Desktop 1 2 3 4 5 6 7 curl https://dl.google.com/linux/linux_signing_key.pub \ | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/chrome-remote-desktop.gpg echo "deb [arch=amd64] https://dl.google.com/linux/chrome-remote-desktop/deb stable main" \ | sudo tee /etc/apt/sources.list.d/chrome-remote-desktop.list sudo apt-get update sudo DEBIAN_FRONTEND=noninteractive \ apt-get install --assume-yes chrome-remote-desktop 安裝 X Window 這次測試選擇安裝 Xfce (輕量級的桌面系統) 1 2 sudo DEBIAN_FRONTEND=noninteractive \ apt install --assume-yes xfce4 desktop-base dbus-x11 xscreensaver 設定 Chrome Remote Desktop 預設使用 Xfce 1 sudo bash -c 'echo "exec /etc/X11/Xsession /usr/bin/xfce4-session" > /etc/chrome-remote-desktop-session' 設定 Chrome Remote Desktop 服務 打開 https://remotedesktop.google.com/headless ,並確定你有登入任一個你要使用的 google 帳號 點開會出現「設定其他電腦」畫面 點擊「開始」,出現「透過下列網址在遠端電腦下載並安裝 Chrome 遠端桌面」畫面 點擊「繼續」,出現「授權 Chrome 遠端桌面設定新電腦。」畫面 點擊「授權」,出現設定指令 複製 Linux 用的指令,貼到 SSH 的視窗執行 1 DISPLAY= /opt/google/chrome-remote-desktop/start-host --code="4/0ATx3LY71DU2nq2CmTa0uorP4VgjKPKqv9oCvMybpDLyaBXAQqGdqVals3lsLjlmfidEpIg" --redirect-url="https://remotedesktop.google.com/_/oauthredirect" --name=$(hostname) 依提示「Enter a PIN of at least six digits」輸入 PIN 碼 檢查 Chrome Remote Desktop 服務是否運作 1 sudo systemctl status chrome-remote-desktop@$USER 有順利運作的話,可以看到 running 的狀態 1 2 3 ● chrome-remote-desktop@user.service - Chrome Remote Desktop instance for user Loaded: loaded (/lib/systemd/system/chrome-remote-desktop@.service; enabled; preset: enabled) Active: active (running) since Fri 2024-06-00 00:00:00 UTC; 1min 10s ago 登入 Desktop 打開 https://remotedesktop.google.com/ 在「遠端存取」的畫面,可以看到 VM 出現了 點擊 VM,輸入 PIN 碼,點擊前進按扭 成功登入 Linux 桌面了 可以開始在桌面環境工作了 Reference https://cloud.google.com/architecture/chrome-desktop-remote-on-compute-engine
Debian 在 2023-06-10 釋出 12 代號 bookworm。 我手邊的 server 安裝的是 Debian 11,剛好就找個時間升級一下,順便寫一下筆記 升級前準備 先將系統升級到 11 (bullseye) 的最新版,並移除不需要的套件 1 2 $ sudo apt update && sudo apt upgrade -y $ sudo apt --purge autoremove 請記得評估要做哪些備份 ...
測試環境: 使用 vagrant 開 vm 來測試 vagrant box debian/bullseye64 安裝 MySQL 更新 APT 這個版本的 apt 沒有 MySQL server,所以我們要先更新 apt 套件庫。下載 mysql 官方提供的 mysql-apt-config 來安裝即可。 1 2 3 4 $ wget https://repo.mysql.com//mysql-apt-config_0.8.23-1_all.deb $ sudo apt update $ sudo apt install gnupg $ sudo dpkg -i mysql-apt-config_0.8.23-1_all.deb 安裝時會跳出一個 MySQL 的配置畫面,預設是 mysql-8.0,我們直接使用預設即可,按 Tab 選 OK,再按下 Enter。 ...
把以前的舊筆電翻了出來,發現還可以正常運作,所以打算重灌來拿當做測試用 Server,這篇簡單的記錄一下這次重灌做了什麼事 筆電:ThinkPad t420s ...
Debian 的套件庫中只有 Firefox-ESR,跟 Firefox 官網的版本有點差距 想要使用最新的 Firefox 就是,直接從官網下載安裝!!! 下載 1 2 $ tar xvf firefox-72.0.2.tar.bz2 $ sudo mv firefox /opt 建立 firefox.desktop 1 $ sudo vi /usr/share/applications/firefox-stable.desktop 1 2 3 4 5 6 7 8 9 10 [Desktop Entry] Name=Firefox Stable Comment=Web Browser Exec=/opt/firefox/firefox %u Terminal=false Type=Application Icon=/opt/firefox/browser/chrome/icons/default/default128.png Categories=Network;WebBrowser; MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https; StartupNotify=true 然後享用 Firefox ...
增加 source list debian testing (buster, 10) 要選擇 bionic 版本, 避免套件相依問題 1 echo "deb https://download.virtualbox.org/virtualbox/debian bionic contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list 增加 apt key 1 2 wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add - 安裝 Virtualbox 1 2 sudo apt update sudo apt install virtualbox-5.2 ps. Virtualbox 6.0 在 2018/12/18 發佈了 ...
SSD 優化的幾個要點 啟用 SSD 的 Trim 功能 減少非必要的寫入動作 掛載暫存資料夾到 Ram 上 啟用排程 Trim 1 2 $ sudo systemctl enable fstrim.timer Created symlink /etc/systemd/system/timers.target.wants/fstrim.timer → /lib/systemd/system/fstrim.timer. ps. 不建議使用 /etc/fstab 的 discard 選項 增加 Mount Options 修改前備份 fstab ...
入手 ThinkPad X1c 來當工作機 在使用了幾天不習慣的 windows 10 確定機器沒有什麼問題之後, 就把 OS 換成 Debian 了 安裝 Debian 之前 更新 BIOS 到目前最新的版本 1.34 調整以下的設定: Security -> Secure Boot - Set to “Disabled” Config -> Power -> Sleep State - Set to “Linux” Config -> Thunderbolt BIOS Assist Mode - Set to “Enabled” 安裝 Debian Linux Distribute: Debian testing ...
安裝好基本款的 debian 是沒有 sudo 指令可以使用的,需要自行安裝設定 安裝 sudo 切換到 root 安裝 1 2 # su - # apt install sudo 設定 sudoer 1 # usermod -aG sudo nyo 設定好之後,登入並用 sudo 隨意打個指令試試 ...