ENGroup 網站

  • Home
    • SMap
    • reveal
    • blog
  • About
    • Reveal
    • MISC
    • GW
    • Webots
    • FossilSCM
    • Reeborg
    • NX2312
    • Brython
    • RL
      • Rocket1
      • PGP
  • Linux
    • HP server
    • Lubuntu
    • Windows
  • Bind
  • Squid
    • VM1
  • Rocket
  • cmsimde
  • VM
    • Virtualbox
    • Proxmox VE
      • Intro_PVE
PGP << Previous Next >> HP server

Linux

舊電腦替換 Windows 10 操作系統,Linuxmint 是其中ㄧ個不錯的選項。

Netplan 網路設定:

先利用 ifconfig 查詢網卡代號後,選擇已經連線的網卡進行設定:

YAML 最上層為 network, 第二層為 ethernets 與 version, 第三層為網卡代號,第四層則為 addresses, routes 以及 nameservers。

/etc/netplan 中的 yaml 設定檔:

network:
  ethernets:
    yourNICname:
      addresses:
        - 2001:yourIPv6 Address/64
      routes:
        - to: default 
          via: 2001:yourIPv6 gateway
      nameservers:
        addresses:
          - 2001:yourDNServer
  version: 2

設定完成後,利用 sudo netplan apply 讓設定生效。

Remote Desktop 遠端連線:

原生的 Linuxmint 希望利用 remote desktop client 連線,必須安裝 xrdp 以及 xorgxrdp:

sudo apt update

sudo apt install xrdp xorgxrdp

但是若電腦僅使用 IPv6 網路協定, 必須先針對 apt 設定代理主機,以便連結至只支援 IPv4 的 Linuxmint 套件網站。

sudo vi /etc/apt/apt.conf.d/95proxies

然後加入:

Acquire::http::Proxy "http://proxy-server:port";
Acquire::https::Proxy "http://proxy-server:port";

假如 proxy server 的使用需要帳號密碼:

Acquire::http::Proxy "http://username:password@proxy-server:port";
Acquire::https::Proxy "http://username:password@proxy-server:port";

Python 使用:

在 Linuxmint 中使用 Python3, 一定要使用 venv 避免改變操作系統中 Python3 所安裝的模組版本。

先安裝對應版本的 venv:

sudo apt install python3.12-venv

接著利用 venv 建立 cmsimde 虛擬環境:

python3 -m venv cmsimde

然後切換到 cmsimde 虛擬環境:

source cmsimde/bin/activate

當命令列回應已經進入 cmsimde 虛擬環境後, 著手安裝所需的模組:

pip install flask flask_cors bs4 lxml pelican markdown

若要利用 git 指令, 必須先安裝 git:

sudo apt install git

然後 clone forupme.github.io 倉儲,並選擇用 token 或 SSH 的方式管理網站:

git clone --recurse-submodules https://github.com/forupme/forupme.github.io eng

設定 token 後, cd 至 eng 目錄, 將倉儲中的 cms 設定為可以執行:

chmod u+x cms

最後再以 ./cms 開啟動態編輯環境進行改版。

注音系統:

sudo apt install ibus ibus-chewing

ibus-setup

ibus restart

文字編輯器:

sudo apt install scite


PGP << Previous Next >> HP server

Copyright © All rights reserved | This template is made with by Colorlib