Windows 印表機移除後依然存在
原因是列印佇列 有檔案留存
故需刪除無法列印的佇列
一、執行 cmd (系統管理員)
二、net stop spooler
三、del %systemroot%\System32\spool\printers\*.* /Q
四、net start spooler
五、關掉 cmd
Windows 印表機移除後依然存在
原因是列印佇列 有檔案留存
故需刪除無法列印的佇列
一、執行 cmd (系統管理員)
apt update
apt upgrade
apt install vim
vim /etc/apt/sources.list
deb http://download.proxmox.com/debian/pve stretch pve-no-subscription
/etc/apt/sources.list.d/pve-enterprise.list,將它註解。
取消 Enterprise Repository 更新來源
# deb https://enterprise.proxmox.com/debian/pve stretch pve-enterprise
vim /etc/apt/sources.list.d/pve-enterprise.list
pve5to6
apt update && apt dist-upgrade -y
vim /etc/apt/sources.list.d/pve-enterprise.list
reboot
apt update && apt dist-upgrade -y
apt list --upgradable
pve5to6
systemctl stop pve-ha-lrm
echo "deb http://download.proxmox.com/debian/corosync-3/ stretch main" > /etc/apt/sources.list.d/corosync3.list
systemctl start pve-ha-lrm && systemctl start pve-ha-crm
pveversion --verbose
pveversion -v
vim /etc/apt/sources.list.d/corosync3.list
apt list --upgradable
systemctl stop pve-ha-lrm
systemctl stop pve-ha-crm
apt list --upgradable
apt update
apt dist-upgrade
systemctl start pve-ha-lrm
systemctl start pve-ha-crm
sed -i 's/stretch/buster/g' /etc/apt/sources.list
解決辦法容易,您可以將 PVE 的更新來源切換為 No-Subscription Repository 或 Test Repository,即可順利更新。
請以文字編輯器開啟 /etc/apt/sources.list,並加入以下這行。
切換更新來源為 No-Subscription Repository
deb http://download.proxmox.com/debian/pve stretch pve-no-subscription
再將原本的 Enterprise Repository 給取消,請以文字編輯器開啟 /etc/apt/sources.list.d/pve-enterprise.list,將它註解。
取消 Enterprise Repository 更新來源
# deb https://enterprise.proxmox.com/debian/pve stretch pve-enterprise
ovftool.exe C:\VM_1018\win2003-apsrv-15x C:\VM_1018\win2003-apsrv-15x.ova
[2019/12/15 補充]
記得搭配版本號調整,Proxmox VE 5/Debian 9 請依上方輸入 stretch,Proxmox VE 6/Debian 10 請輸入為 buster。
VMDK 轉為 QCOW2
qemu-img convert -f vmdk disk.vmdk -O qcow2 disk.qcow2
QCOW2 轉為 VMDK
qemu-img convert -f qcow2 disk.qcow2 -O vmdk disk.vmdk
RAW 轉為 QCOW2
qemu-img convert -f raw -O qcow2 disk.img disk.qcow2
qemu-img convert -f raw -O qcow2 vm-9913-disk-0.img vm-9913-disk-0.qcow2
vm-9913-disk-0.raw
VMDK 轉為 RAW
qemu-img convert -f vmdk disk.vmdk -O raw disk.raw
RAW 轉為 VMDK
qemu-img convert -f raw disk.raw -O vmdk disk.vmdk
VDI 轉為 VMDK
qemu-img convert -f vdi disk.vdi -O vmdk disk.vmdk
VHD 轉為 VMDK
qemu-img convert -f vpc disk.vpc -O vmdk disk.vmdk
PVE確認硬碟故障
下zdb紀錄損壞硬碟的 GUID
第四顆
5301043890793831644
===
children[4]:
type: 'disk'
id: 4
guid: 5301043890793831644
path: '/dev/disk/by-id/scsi-35000c5006c26dfb7-part1'
devid: 'scsi-35000c5006c26dfb7-part1'
phys_path: 'pci-0000:af:00.0-scsi-0:0:4:0'
whole_disk: 1
DTL: 13186
create_txg: 4
com.delphix:vdev_zap_leaf: 134
removed: 1
===
2.修復
zpool replace pool名稱 故障硬碟的序號 正常新硬碟的序號
zpool replace RAIDZ2 5301043890793831644 scsi-35000c500c1d24f47
==
如果無法修復,將壞硬碟踢出zpool
zpool detach pool名稱 故障硬碟的序號
zpool detach RAIDZ2 5301043890793831644
==
查看序號方式
ls -1 /dev/disk/by-id/
==
zpool status
ubuntu port forwarding
vim /etc/default/ufw
==
DEFAULT_FORWARD_POLICY="ACCEPT"
==
設定開啟
vim /etc/ufw/sysctl.conf
vim /etc/sysctl.conf
把 net.ipv4.ip_forward=1 都 uncomment
==
# Uncomment this to allow this host to route packets between interfaces
net/ipv4/ip_forward=1
#net/ipv6/conf/default/forwarding=1
#net/ipv6/conf/all/forwarding=1
==
編輯規則
vim /etc/ufw/before.rules
===
-A PREROUTING -p tcp -m tcp -d 主機IP --dport 1433 -j DNAT --to-destination 目標IP:port
舉例如下:也就是連到192.168.50.1:80,會轉發到61.168.0.212:80
==
*nat
:PREROUTING ACCEPT [0:0]
-A PREROUTING -p tcp -m tcp -d 192.168.50.1 --dport 80 -j DNAT --to-destination 61.168.0.212:80
-A POSTROUTING -j MASQUERADE
COMMIT
===
sudo sysctl -p
==
sudo ufw allow 80/tcp
或
sudo ufw allow from any to any port 80
==
sudo systemctl restart ufw
==
察看與驗證
sudo ufw status
sudo iptables -t nat -L -n -v
監聽封包
tcpdump -i ens3 -c 200 port 80
網卡代號 ens3
2022.10.1起 Excahnge 365 停用
TLS 1.1 及1.0
https://learn.microsoft.com/zh-tw/troubleshoot/azure/active-directory/enable-support-tls-environment?WT.mc_id=Portal-Microsoft_AAD_IAM&tabs=azure-monitor
故相對 Outlook 2010以下皆無法連線,2013可以改用OAuth處理
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Exchange]
"AlwaysUseMSOAuthForAutoDiscover"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common]
[HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common\Identity]
"EnableADAL"=dword:00000001
"Version"=dword:00000001
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\16.0\Lync]
"AllowAdalForNonLyncIndependentOfLync"=dword:00000001
使用Powershell遠端連線 改採Exchange Online PowerShell V3
EXO v3
連線方法如下:
1.以管理者模式開啟PS
2.檢查可使用模組
Get-Module -ListAvailable -Name ExchangeOnlineManagement |
1 | Install-Module -Name ExchangeOnlineManagement -Force |
或是升級
1 | Update-Module ExchangeOnlineManagement |
確認安裝後則可以連線
1 2 | #Connect to Exchange Online Connect-ExchangeOnline |
連線也可以直接帶帳號
1 | Connect-ExchangeOnline -UserPrincipalName aaa@abc.com |
sudo apt update
sudo apt upgrade
apt install software-properties-commonadd-apt-repository universeadd-apt-repository ppa:ondrej/phpapt updateapt install acl curl apache2 fping git graphviz imagemagick libapache2-mod-fcgid mariadb-client mariadb-server mtr-tiny nmap php-cli php-curl php-fpm php-gd php-gmp php-json php-mbstring php-mysql php-snmp php-xml php-zip rrdtool snmp snmpd whois python3-pymysql python3-dotenv python3-redis python3-setuptools python3-systemd python3-pip
su - librenms
./scripts/composer_wrapper.php install --no-dev
exit
vi /etc/php/8.1/fpm/php.ini
vi /etc/php/8.1/cli/php.ini
cp /etc/php/8.1/fpm/pool.d/www.conf /etc/php/8.1/fpm/pool.d/librenms.conf
vi /etc/php/8.1/fpm/pool.d/librenms.conf
Change [www]
to [librenms]
:
[librenms]
Change user
and group
to "librenms":
user = librenms
group = librenms
Change listen
to a unique name:
listen = /run/php-fpm-librenms.sock
在LibreNMS 看到相關圖表的量詞解釋筆記
網站翻了一堆討論,記下來處理