2015年4月25日 星期六

CentOS 7 修改時區

安裝環境時,忘了選時區怎麼辦?

# cp /usr/share/zoneinfo/Asia/Taipei /etc/localtime
# ntpdate time.stdtime.gov.tw

PS:CentOS 7 minimal安裝預設沒有ntpdate套件,要先安裝。 

CentOS 7 On Hyper-V(第二代) 修改螢幕解析度

環境說明: CentOS 7  Grub 2 on Hyper-V 第二代

修改 /etc/default/grub  加入
GRUB_CMDLINE_LINUX_DEFAULT="video=hyperv_fb:800x600"

重新產生grub2 環境
 # grub2-mkconfig -o /boot/grub2/grub.cfg
若是使用第二代的Hyper-V環境(UEFI環境),產生的grub2設定檔位置不一樣
要注意,否則怎麼改都不成功。
# grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg

Ubuntu下
# Sudo update-grub


Ubuntu 參考

2015年4月4日 星期六

rpm 套件管理

 查更新記錄
rpm -qa --changelog openssl | head -n11
* 2015  3月 19 四 Tomáš Mráz 1.0.1e-42.4
- update fix for CVE-2015-0287 to what was released upstream

* 2015  3月 18 三 Tomáš Mráz 1.0.1e-42.3
- fix CVE-2015-0209 - potential use after free in d2i_ECPrivateKey()
- fix CVE-2015-0286 - improper handling of ASN.1 boolean comparison
- fix CVE-2015-0287 - ASN.1 structure reuse decoding memory corruption
- fix CVE-2015-0289 - NULL dereference decoding invalid PKCS#7 data
- fix CVE-2015-0292 - integer underflow in base64 decoder
- fix CVE-2015-0293 - triggerable assert in SSLv2 server

查詢openssl 是否對CVE-2014-0224有做修正
rpm -q --changelog openssl | grep CVE-2014-0224

- fix CVE-2014-0224 fix that broke EAP-FAST session resumption support
- fix CVE-2014-0224 - SSL/TLS MITM vulnerability
 

2015年3月9日 星期一

Brocade SAN Switch 常用指令

nsShow: 顯示主機的WWN (10:00:00:00:c9:2b:c9:0c).
cfgShow : 檢視zone的設定是否正確.
 cfgshow all 查詢設定檔

configshow: 顯示交換器設定 (類似show run)
version: 查詢韌體板本



  • Port 相關指令


portCfgShow : 檢測交換器埠的資訊ports information.
portShow :檢視  NPIV 屬性和列出每個連接裝置上的Port WWNha的所有 N_Port (physical and
virtual)

portcamshow                Display filter utilization


原文:portShow command to view the NPIV attributes and all the N_Port (physical and
virtual) port WWNs that are listed under portWwn of device(s) connected





version : 查詢韌體板本

2015年3月8日 星期日

FreeBSD 10 與先前版本主要差異



FreeBSD 10 與先前版本主要差異
  • clang 取代 GCC 成為預設編譯器
  • Unbound 已被導取代 base 系統作為本機 DNS 解析服務。
  • BIND 已從 base 系統移除,改用Unbound取代。
  • 使用來自 NetBSD 專案的 bmake 替換了 make。
  • pkg 成預設的套件管理工具。
  • pkgadd、pkgdelete 及其相關工具已被移除
  • 對虛擬化進行了主要增強,內建支援BIS(Built in – BIS are included as part of this ,FreeBSD 9及8的版本需自行額外加裝BIS, Linux 則稱為LIS) 。
  • 針對 SSD 的 TRIM 支援已被加入到 ZFS
  • 效能更高的LZ4 壓縮演算法已被加入到 ZFS

Hyper-v對FreeBSD的支援
 
FreeBSD virtual machines on Hyper-V


CentOS and Red Hat Enterprise Linux virtual machines on Hyper-V

https://technet.microsoft.com/zh-tw/library/dn531026.aspx

2015年2月22日 星期日

PHP Warning: date(): It is not safe to rely on the system's timezone settings.

在排程執行cacti時,出現下列錯誤訊息
when last update time is 1424519091 (minimum one second step)
PHP Warning:  date(): It is not safe to rely on the
 system's timezone settings. You are *required*
 to use the date.timezone setting or the 
date_default_timezone_set() function. In case you 
used any of those methods and you are still getting
 this warning, you most likely misspelled the 
timezone identifier. We selected the timezone 'UTC' 
now, but please set date.timezone to select your 
timezone. in /usr/share/cacti/lib/functions.php on line 486

解決方式
 修正/etc/php.ini
 在data.timezone 後方加入"Asia/Taipei"
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "Asia/Taipei"