Posts

Linux 上密碼相關設定

Password Policy 密碼品質檢查,這個功能是透過 pam 時做,避免 user 弱密碼導致 ssh 或其他服務被破解 (man pam_pwquality) 修改方法 Debian 系統預設沒有 pwquality,需要先安裝: sudo apt-get install libpam-pwquality 可以直接修改 /etc/pam.d/ 檔案,直接接在 pam_unix.so 當行最後用空白隔開 修改 /etc/security/pwquality.conf 檔案 [rpm_pam] 或用 authconfig 指令 (Red Hat 系列,自己 man ㄅ),可以寫在 /etc/pam.

Linux 上的 NVIDIA 驅動

Nvidia driver on Ubuntu find here 到 這裡 查看最新版本 nvidia release 34x: 傳統架構版本 387: 新版短期 384: 新版長期 刪除舊版 sudo apt-get purge nvidia* 安裝新版 sudo add-apt-repository ppa:graphics-drivers sudo apt-get update sudo apt-get install nvidia-387 sudo reboot # 重開機 檢查 lsmod | grep nvidia nvidia-smi cuda sudo apt install cuda-9 sudo apt install cuda-nvcc-9-1 手動安裝 到 這裡 下載 runfile(local) sudo sh cuda_9.

Linux 小指令

Change default editor For global sudo update-alternatives --config editor # 然後選擇數字 For one user select-editor or in .bashrc export EDITOR='vim' export VISUAL='vim' Add groups Change main group sudo groupadd mynewgroup # Add a new group usermod -g groupname username groups username Add secondary group sudo usermod -aG groupname username password policy find here find here find here vim /etc/pam.

MariaDB (MySQL)

安裝 sudo apt install mariadb-server sudo mysql # 第一次進入 使用者 change password find here SET PASSWORD = PASSWORD('new_password'); 新增使用者 find here GRANT ALL PRIVILEGES ON *.

Mastering in Bitcoin 讀書筆記

Mastering Bitcoin 精通比特幣 Ch1 / Ch2 Master in Bitcoin CH1,2 投影片 Ch3 比特幣客戶端 以 bitcoin core 為主 也可以到 這裡 直接選擇 binary file 執行 下載並切換版本

MikroTik RouterBoard 設定

Wiki Reset 斷電時 按(插)住 reset 鍵,接電,等到燈光閃爍後,放開 /system reset-configuration 連接 下載官網給的 WinBox 點開後,在 connect to 的地方打入 MAC address,按 Connect To RoMON,等他自己找到 routerboard Login 打 admin,Password 留白 Connect WAN 設定 Static IP /ip route add gateway={getway} dst-address=0.

Nagious

介紹 Document <- 點我 Main Config : 控制Nagios Deamon的行為,這份config會被Deamon和CGIs讀 Resource File: 儲存user-defined macro,權限660 Object Definition File : 定義host, service, hostgroup, command, etc,決定要監控的項目和要如何監控 CGI Config File : 讓Nagios知道main config位置以及你怎麼設定Nagios和object define的位置 Config 內容 主要config檔在 /usr/local/nagios/etc Nagios額外套件在 /usr/local/nagios/libexec Debug /etc/init.

NetApp

背板資訊 兩個 SAS (LNK 0a, 0b) 兩個 console (一個 RJ45, 一個 USB) 一個 mgmt (e0M) 一個 硬體資訊交換 四個 data 網孔 (e0a, e0b, e0c, e0d) 安裝 可以從 http / tftp 裝 OS 安裝 (無法使用 USB) Ctrl-C 進入 loader

NGINX 好用設定

Certbot (let’s encrypt 簽 https) Install find here Ubuntu $ sudo apt-get update $ sudo apt-get install software-properties-common $ sudo add-apt-repository ppa:certbot/certbot $ sudo apt-get update $ sudo apt-get install python-certbot-nginx Fedora sudo dnf install certbot-nginx 簽署 自動幫改 nginx 設定檔 sudo certbot --nginx 手動改 nginx 設定檔 sudo certbot --nginx certonly 自動更新憑證 sudo certbot renew --dry-run 手動更新憑證 certbot renew Redirect to https 301 server { listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/notebook.

Package Manager

Ubuntu ppa Sourse List find here find here /etc/apt/sources.list.d/ deb basic find here sudo apt update sudo apt upgrade sudo apt remove sudo apt-get --purge remove [name]: 連設定檔一起移除 sudo apt-get clean: 清除 /var/cache/apt/archives/ 下的所有 DEB 套件檔 (白話文:清除已經下載的套件) sudo apt-get autoclean: 清除 /var/cache/apt/archives/ 下已經過期的 DEB 套件檔 未滿足相依關係 系統處理 sudo apt --fix-broken install 尋找那個套件是那一套件需要用的,把套件刪掉 `sudo apt remove xxx