2020年9月15日 星期二

Office 版本並行 設定

 Office 多版本並行時 避免設定錯誤,依據對應版本設定無須重新設定REG登錄檔

點選開始>執行

Win10 開始右鍵>執行


Office2000


reg add HKCU\Software\Microsoft\Office\9.0\Word\Options /v NoReReg /t REG_DWORD /d 1


Office2002


reg add HKCU\Software\Microsoft\Office\10.0\Word\Options /v NoReReg /t REG_DWORD /d 1


Office2003


reg add HKCU\Software\Microsoft\Office\11.0\Word\Options /v NoReReg /t REG_DWORD /d 1


Office2007


reg add HKCU\Software\Microsoft\Office\12.0\Word\Options /v NoReReg /t REG_DWORD /d 1


Office2010


reg add HKCU\Software\Microsoft\Office\14.0\Word\Options /v NoReReg /t REG_DWORD /d 1


Office2013


reg add HKCU\Software\Microsoft\Office\15.0\Word\Options /v NoReReg /t REG_DWORD /d 1



Office2016


reg add HKCU\Software\Microsoft\Office\16.0\Word\Options /v NoReReg /t REG_DWORD /d 1


2020年7月22日 星期三

Outlook 寄信附件 大小增加

這是考古文, 但總會遇到骨董所以筆記放這裡

 E-Mail 最早並沒有支援附件,所以附件要靠編碼加入。

 Base64 固定放大 1.3333 倍
 QP 碼放大 1 ~ 3 倍

 所以當Outlook寄信送往沒有支援的Server時,郵件附件會增加1.3倍 

也就是假使10M會變成13M以上
 用 Windows Live Mail 另存 .eml,是以原始信件 (ANSI) 內容儲存。 
用 Outlook 另存 .msg ,是以 Unicode 儲存,在 Unicode 英數是 ANSI 兩倍。

另外 Outlook 2007 以前可以啟用保存原始郵件功能,會造成郵件內同時有ANSI / Unicode 兩種資訊。

2020年6月15日 星期一

Proxmox 5.X to 6.X

近來測試開源VM
跑得還不錯,以Ubuntu 為基的Proxmox

5.2 運行了一年多
打算正式使用,故順便研究升級與叢集的作法

最後整理筆記如下:

1.升級 Proxmox VE 5.4 到最新的版本。
apt update
apt dist-upgrade
2.利用pve5to6指令查看要升級的狀況。
#pve5to6
3.先升級Corosync 3
停止服務
#systemctl stop pve-ha-lrm
#systemctl stop pve-ha-crm
新增資源庫
#echo “deb http://download.proxmox.com/debian/corosync-3/ stretch main” > /etc/apt/sources.list.d/corosync3.list
更新資源,升級
#apt update
#apt dist-upgrade
啟動
#systemctl start pve-ha-lrm
#systemctl start pve-ha-crm
4.更新升級資料庫由stretch(5.X) 更改為Buster(6.X)
--Update all Debian repository entries to Buster.
用sed 替換字元
sed -i 's/stretch/buster/g' /etc/apt/sources.list
5. 新增資源庫,
Add the Proxmox VE 6 Package Repository
/etc/apt/sources.list
deb http://ftp.debian.org/debian buster main contrib
deb http://ftp.debian.org/debian buster-updates main contrib
#PVE pve-no-subscription repository provided by proxmox.com,
#NOT recommended for production use
deb http://download.proxmox.com/debian/pve buster pve-no-subscription
#security updates
deb http://security.debian.org buster/updates main contrib
/etc/apt/sources.list.d/pve-enterprise.list
deb http://download.proxmox.com/debian buster pve-no-subscription
6.更新
先刪除
#rm /etc/apt/sources.list.d/corosync3.list
更新套件升級
#apt update
#apt dist-upgrade
7. 重開機
事後談,在第五步卡了兩次,原來開源版不需要將原生的註記
可以一併保留

2020年1月1日 星期三

Librenms WebUI password change

LibreNMS 網頁密碼變更

做法:從SQL資料庫下手,由於該資料欄為雜湊值加密過
故需先找一組變更,(設定為空白無法登入)

登入SQL

mysql -u root -p

show databases;

#確認DB,舊版的為librenmsdb

use librenms;

#tables為 users,可以用select確認

select * from users;



底下為 password的雜湊密碼
$2y$10$qwtXWqRQz0xY4SGTEUqDkextPS8DS1axSF1ord2J4juDLPSQBiy6m
更換admin password 密碼語法


 update users set password= '$2y$10$qwtXWqRQz0xY4SGTEUqDkextPS8DS1axSF1ord2J4juDLPSQBiy6m' where username = 'admin';



2019年10月8日 星期二

Linux 實用小指令

Linux主機某個服務的連線數:

netstat -ntu | grep :80 | grep -v LISTEN | awk '{print $5}' | cut -d: -f1 | grep -v 127.0.0.1 | wc -l

指定安裝版本

sudo apt-get install python-pandas=0.20.3

apt-cache policy python-pandas

2019年5月6日 星期一

Ubunt KVM host connect GuestOS

KVM 操作指令

VM預設設定檔位置:/etc/libvirt/qemu/
VM預設印象檔位置:/var/lib/libvirt/images/

KVM 的功能指令如下:

查看運行中 VM主機

virsh list

查看所有 VM主機

virsh list --all

開機
virsh start librenms

關機
virsh shutdown librenms


印象檔快照處理

建立快照
virsh snapshot-create-as 虛擬機名稱 虛擬機快照名稱

virsh snapshot-create-as librenms librenms_org


virsh snapshot-revert --domain 虛擬機名稱 虛擬機快照名稱
virsh snapshot-revert --domain librenms librenms_org

印象檔快照清單
virsh snapshot-list librenms

調整虛擬機設定
記憶體
virsh setmaxmem 虛擬機名稱

CPU
virsh setmaxvcpu 虛擬機名稱

匯入主機設定

virsh define /etc/libvirt/qemu/librenms.xml

命令字元連線
virsh -c qemu+ssh://root@remotehost.com/system

測試


2019年5月5日 星期日

Wifi 測試工具 iperf

https://iperf.fr/iperf-download.php


安裝

Linux

CentOS 用epel安裝2.0 Ubuntu 是3.0

yum install iperf

Server
開啟
iperf -s

確認
netstat

防火牆開啟 5001
firewall-cmd --permanent --zone=public --add-port=5001/tcp
firewall-cmd --reload

Client

iperf -c <host ip>