Redhat Network error code: 400

# subscription-manager list –available –all
Error updating system data on the server, see /var/log/rhsm/rhsm.log for more details.

# subscription-manager clean
# subscription-manager register –username <username> –password <password> –auto-attach

Bind9 DDNS

At Server Side:

apt install bind9

Generate an account named username1

# dnssec-keygen -a HMAC-SHA512 -b 512 -n USER username1

You will have such as new files Kusername1.+165+42799.key in currently folder

Show the key in the file

# cat Kusername1.+165+42799.key
calvincarol. IN KEY 0 3 165 Um1GdfXXYTUIBSvsl+rFErq+XhqUMB0JffM4qdmNq3XHiF9Rq9Uirvnu ZvsrSU836Xn8rJTmbpIYMe6WrGuznA==

At the key & domain config to bind, also-notify is the second DNS Server IP

# vi /etc/bind/vi named.conf.default-zones

key “username1” {
algorithm hmac-sha512;
secret “Um1GdfXXYTUIBSvsl+rFErq+XhqUMB0JffM4qdmNq3XHiF9Rq9Uirvnu ZvsrSU836Xn8rJTmbpIYMe6WrGuznA==”;
};

zone “yourddnsdomain.com” IN {
type master;
file “/var/cache/bind/named.yourddnsdomain.com”;
also-notify { xxx.xxx.xxx.xxx; };
update-policy { grant username1 name subdomain.yourddnsdomain.com. A; };
};

At Client Side:

apt install bind9

Copy the key file to client side

vi /root/do-nsupdate
#!/bin/bash

updateServer=ns1.masterdns.com
updateDomain=subdomain.yourddnsdomain.com
encryptKeyPath=”/root/Kusername1.+165+42799.key”
checkIPWeb=”http://checkip.amazonaws.com/”

CURRENT_IP=$(nslookup $updateDomain $updateServer| grep Address | grep -v “#53”)
CURRENT_IP=$(echo ${CURRENT_IP:9})

EXT_IP=$(wget -qO- $checkIPWeb)

if [ $CURRENT_IP != $EXT_IP ]; then
KEY=$encryptKeyPath

cat <<EOF | nsupdate -k “$KEY”
server $updateServer
update delete $updateDomain. A
update add $updateDomain. 3600 A $EXT_IP
send
EOF
fi

chmod 755 /root/do-nsupdate

vi /etc/crontab
0 * * * * root /root/do-nsupdate

Starting logger…failed

zimbra@mail:~$ zmcontrol status
Host mail.xx.xxx.com
amavis Running
antispam Running
antivirus Running
dnscache Running
ldap Running
logger Stopped
zmlogswatchctl is not running
mailbox Running
memcached Running
mta Running
opendkim Running
proxy Running
service webapp Running
snmp Running
spell Running
stats Running
zimbra webapp Running
zimbraAdmin webapp Running
zimlet webapp Running
zmconfigd Running

Option1
好像是重新重裝一次就可以解決

Option2
/opt/zimbra/log/zmlogswatch.out
Error opening /var/log/zimbra-stats.log: No such file or directory at /opt/zimbra/data/tmp/.swatchdog_script.20942 line 92.

touch /var/log/zimbra-stats.log
chown zimbra:zimbra /var/log/zimbra-stats.log

/opt/zimbra/libexec/zmsyslogsetup

Zimbra Open Source Edition migration

舊機的Zimbra要必需和新機的Zimbra相同版本, 我的舊機是Ubuntu 14.04, Zimbra 8.8.12, 新機會安裝Ubuntu 18.04, Zimbra 8.8.12, 如果安裝過程中有錯誤就看最低下有沒有解決方法

首先在新機Download相同版本解壓及安裝(只安裝不設定加-s), 然後把新的zimbra改名不用
# wget https://files.zimbra.com/downloads/8.8.12_GA/zcs-8.8.12_GA_3794.UBUNTU18_64.20190329045002.tgz
# tar zxvf zcs-8.8.12_GA_3794.UBUNTU18_64.20190329045002.tgz
# cd zcs-8.8.12_GA_3794.UBUNTU18_64.20190329045002/
# ./install.sh -s
# mv /opt/zimbra /opt/zimbra_backup

在舊機停用zimbra, 然後用root壓縮/opt/zimbra再傳送到新機
# su – zimbra
# zmcontrol stop
# exit

Option1
# rsync -e “ssh -p 2222” -axvzKHS /opt/zimbra/ newServerLogin@xxx.xxx.xxx.xxx:/tmp/zimbra

Option2
# tar zcvfS /root/zimbrabackup_20201008.tar.gz /opt/zimbra
# scp /root/zimbrabackup_20201008.tar.gz newServerLogin@xxx.xxx.xxx.xxx:/home/newServerLogin/

在新Server解壓, 改回原位置, 修復權限
# tar zxvfS zimbrabackup_20201008.tar.gz

# mv opt/zimbra /opt/
# /opt/zimbra/libexec/zmfixperms -e -v

應該沒有訊息的
# /opt/zimbra/bin/postfix check

有2次升級都有這個訊息, 但是沒有理會好像都是正常運作
postsuper: Renamed to match inode number: 3 messages
postsuper: warning: QUEUE FILE NAMES WERE CHANGED TO MATCH INODE NUMBERS

再次正式安裝
# cd zcs-8.8.12_GA_3794.UBUNTU18_64.20190329045002/
# ./install.sh

錯誤1
Validating ldap configuration
/usr/bin/perl: symbol lookup error: /opt/zimbra/common/lib/perl5//x86_64-linux-gnu-thread-multi/auto/Socket/Socket.so: undefined symbol: Perl_xs_apiversion_bootcheck
Unknown Error: It should be impossible to reach this statement.

解決方法
# for pkg in $(dpkg -l | grep zimbra | grep perl | awk ‘{print $2}’); do sudo apt-get install –reinstall $pkg; done

錯誤2
ERROR: Unable to retrive Zimbra GPG key for package validation
Please fix system to allow normal package installation before proceeding

解決方法
# gpg –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys 9BE6ED79
Reference
https://wiki.zimbra.com/wiki/Error_%22Unable_to_retrive_Zimbra_GPG_key_for_package_validation%22

錯誤3
Checking for port conflicts
Port conflict detected: 53 (zimbra-dnscache)
Port conflicts detected! – Press Enter/Return key to continue

不用理會

錯誤4
zmlogswatchctl is not running

解決方法
這個應該是8.8.12的bugs, 升級到8.8.15
# wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_3869.UBUNTU18_64.20190918004220.tgz
# tar zxvf zcs-8.8.15_GA_3869.UBUNTU18_64.20190918004220.tgz
# cd zcs-8.8.15_GA_3869.UBUNTU18_64.20190918004220
# ./install.sh

Reference
https://wiki.zimbra.com/wiki/How_to_move_ZCS_to_another_server

IBM WebSphere force delete profile

/opt/IBM/WebSphere/AppServer/bin/manageprofiles.sh -listProfiles

Soft Delete

/opt/IBM/WebSphere/AppServer/bin/manageprofiles.sh -delete -profileName AppSrv01

Hard Delete

rm -fr /opt/IBM/WebSphere/AppServer/profiles/AppSrv01

/opt/IBM/WebSphere/AppServer/bin/manageprofiles.sh -validateAndUpdateRegistry

 

https://www.ibm.com/support/knowledgecenter/zh-tw/SSAW57_9.0.5/com.ibm.websphere.nd.multiplatform.doc/ae/tpro_removeprofile.html