[Linux] CentOS 6.x / 7.x change Hostname

{Centos 6.x}
step01. check current hostname
# hostname

step02.
# vi /etc/sysconfig/network
———modify———
HOSTNAME=改成你要的主機名稱
———modify———

step03.
# vi /etc/hosts
———modify———
* IP FQDN Hostname *
192.168.1.1  www1.dns.com.tw www1
———modify———

step04.
# service network restart 或 sync;sync;sync;shutdown -r now , init 6

Done.

{Centos 7.x}
step01. check current hostname
# hostname

step02. 永久的名稱
# hostnamectl –static set-hostname www1.dns.com.tw

若暫時等同用CentOS 6.x > hostname www1.dns.com.tw)
# hostnamectl –transient set-hostname www1.dns.com.tw

—-hostnamectl 三個模式—
-static        靜態
–transient 短暫
–pretty       機靈

step03.
systemctl restart network.service  或 sync;sync;sync;reboot , init 6
** Check **
# cat /proc/sys/kernal/hostname
# hostname
# hostname -f  (查詢 FQDN)
# hostname -i  (查詢主機對應IP)
# hostname -I  (查詢主機對應所有IP)

**Caution**
若只用指令hostname來變更CentOS 6.x僅是暫改,若重開機還是會回復原先主機名稱 !

[Cisco] UCSM / FI6248UP ‘default Keyring’s certificate is invalid, reason: expired’

在維護已久的UCSM (FI6xxx) series總是容易見著這樣的錯誤訊息。不去理會其它不會對維運設備造成太大影響,只是偶而客戶問及總不希望有個錯誤訊息掛載在那兒。
ucs-error.jpg

Resolution :

step01. SSH login UCSM

step02. # scope security

step03. /security# scope keyring default

step04./security/keyring# set regenerate yes

step05./security/keyring* commit-buffer // 套用立即生效

等待幾分鐘這個錯誤訊息即會消失..^O^


 

Rerfernce :

  1. vStrong.info – HOW TO: Regenerate expired UCS Manager certificate
  2. virtualbuildingblocks.com – Regenerate Expired Cisco UCS Certificate
  3. vnotions – Fix: Cisco UCSM – Default Keyring’s certificate is invalid