Skip to content

Zeroplex 生活隨筆

軟體開發、伺服器和生活瑣事

小 縮小字型大小。 中 重設字型大小。 大 放大字型大小。

作者: 日落

apt upgrade 時不詢問

Posted on 2023 年 6 月 27 日 By 日落 在〈apt upgrade 時不詢問〉中尚無留言

原本以為使用 DEBIAN_FRONTEND=noninteractive 參數就可以:

sudo DEBIAN_FRONTEND=noninteractive apt upgrade

後來發現還有個套件叫做 needrestart,預設會在 apt upgrade 完成後詢問哪一些服務要重新啟動:

which services should be restarted

先檢查一下是否有安裝 needrestart,有的話可以看到 /etc/needrestart 目錄。

再去修改設定檔 needrestart.conf:

# Restart mode: (l)ist only, (i)nteractive or (a)utomatically.
#
# ATTENTION: If needrestart is configured to run in interactive mode but is run
# non-interactive (i.e. unattended-upgrades) it will fallback to list only mode.
#
$nrconf{restart} = 'a';

參考資料:

  • How do I ask apt-get to skip any interactive post-install configuration steps?
  • apt-get upgrade auto restart services
Tags:Linux, Ubuntu

.env 設定檔中的字串建議加上 quote

Posted on 2023 年 6 月 23 日 By 日落 在〈.env 設定檔中的字串建議加上 quote〉中尚無留言

在 .env 設定檔中,遇到有特殊字元的密碼:

DB_PASS=password#2023

在 ini 中 # 剛好代表註解起始點,結果 DB 一直登入失敗。

比較保險的寫法,應該是在所有的字串都加上引號:

DB_PASS="password#2023"

不只 .ini,k8s 常用的 yml 中的字串也是應該加上引號,特別是 yml 雷還比較多 …

Tags:Laravel

SSL Labs 廢棄 TLS 1.1

Posted on 2023 年 6 月 22 日2023 年 6 月 22 日 By 日落 在〈SSL Labs 廢棄 TLS 1.1〉中尚無留言

很久以前就開始準備廢棄 SSL 的 TLS 1.1,最近 SSL Labs server test 已在檢查結果中將 TLS 1.1 列為檢查項目:

SSL Lab will check if server using deprecated TLS 1.1

伺服器將 TLS 1.0 & 1.1 廢棄之後,評分就會回到 A。

在 DataGrip 選擇要檢視的資料庫內容

Posted on 2023 年 6 月 20 日 By 日落 在〈在 DataGrip 選擇要檢視的資料庫內容〉中尚無留言

JetBrains 的 DataGrip 可以在建立 DB 連線以後,選擇要同步、檢視的項目,避免同時讀取大量資料導致速度變慢。

在 connection 上點滑鼠右鍵,選擇 properties 後切換到 schemas 頁籤,選擇想要讀取的項目 (SQL Server 這邊,可以是資料庫也可以是權限等):

Linux VMware Workstation Pro 中 Windows 10 guest 當機 (hangs) 的問題

Posted on 2023 年 6 月 19 日2023 年 6 月 19 日 By 日落 在〈Linux VMware Workstation Pro 中 Windows 10 guest 當機 (hangs) 的問題〉中尚無留言

跑到一半 guest OS (windows 10) 卡住不會動,但是 host 中的 VMware Workstation Pro 又把處理器吃光,不知道是在跑什麼。

在 VMware Community 看到一個說法,是 Windows 中的 HyperV 和 VMware 衝突,關閉即可恢復:

使用系統管理員身份執行 cmd,並輸入設定:

bcdedit /set hypervisorlaunchtype off
bcdedit /set hypervisorlaunchtype auto

嘗試了感覺沒有差很多

Tags:VMware, Windows

文章分頁

上一頁 1 ... 13 14 15 ... 318 下一頁

其他

關於我  (About me)

  文章 RSS Feed

  留言 RSS Feed

Apache AWS Bash C/C++ Docker FreeBSD GCP Git Google Java JavaScript Laravel Linux Microsoft MSSQL MySQL Nginx PHP PHPUnit PostgreSQL Python Qt Ubuntu Unix Vim Web Windows WordPress XD 作業系統 分享 好站推薦 專題 攝影 新奇搞笑 新聞 旅遊 生活雜記 程式設計 網路架站 網頁設計 資訊學習 資訊安全 遊戲 音樂


創用 CC 授權條款
本著作係採用創用 CC 姓名標示-相同方式分享 4.0 國際 授權條款授權.