2021年4月19日 星期一

CentOS upgrade GCC

使用 SCL 安裝方式,它不會取代原本系統的 gcc ,是透過 sch enable 進行切換,相對比較安全

以 gcc 9 為例:
yum -y install centos-release-scl-rh
yum -y install devtoolset-9-toolchain.x86_64

# which gcc
/usr/bin/gcc
# gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

切換到 gcc 9 的環境

# scl enable devtoolset-9 bash
# which gcc
/opt/rh/devtoolset-9/root/usr/bin/gcc
# gcc --version
gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

沒有留言:

DNS negative cache

在查詢一個域名時,若當資料不存在,會出現 NXDOMAIN DNS 也會 cache 這個查不到的結果,其預設的 TTL 跟 DNS 及 Zone 的 SOA TTL 有關 例如 BIND 的 max-ncache-ttl 預設是 10800 秒 當 SOA 中的 TTL 小於 ...