看了 release announcement 主要是安全性更新和增加穩定度。
除了 Ubuntu 以外,其他 Ubuntu based 的 distribution 也一起發布更新:
軟體開發、伺服器和生活瑣事
看了 release announcement 主要是安全性更新和增加穩定度。
除了 Ubuntu 以外,其他 Ubuntu based 的 distribution 也一起發布更新:
phpbrew install 8.0.11 時會出現 OpenSSL 的錯誤訊息:
/home/zero/.phpbrew/build/8.0.29/ext/openssl/xp_ssl.c:1240:9: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations] 1240 | DH_free(dh); | ^~~~~~~ In file included from /usr/include/openssl/dsa.h:51, from /usr/include/openssl/x509.h:37, from /usr/include/openssl/ssl.h:31, from /home/zero/.phpbrew/build/8.0.29/ext/openssl/xp_ssl.c:31: /usr/include/openssl/dh.h:200:28: note: declared here 200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh); | ^~~~~~~
主要是因為舊版的 PHP 使用到的 OpenSSL 也是舊版的。
解決方法:
先下載 OpenSSL v1.1,並編譯:
cd ~/tmp/openssl-1.1.1v # --prefix 設定為暫存路徑 ./Configure --prefix=/home/zeroplex/openssl-1.1.1/ -fPIC -shared linux-x86_64 make make install
make install
後執行檔、函式庫就會存放到 /home/zeroplex/openssl
中。
先設定要使用的 OpenSSL pkgconfig:
# 在 openssl 位置中找到 pkgconfig 的路徑 export PKG_CONFIG_PATH=/home/zeroplex/openssl/lib/pkgconfig
接下來 phpbrew 使用相同的指令即可:
phpbrew install 8.0.29 +defaults
備註:phpbrew install 7.4 也需要相同的方法
OpenVPN 連線成功時,預設會將所有網路流向都導向新建立的 VPN。
若 OpenVPN client 是在 server 上面跑,僅特定連線走 VPN、不應該修改 default gateway,使用 --pull-filter
來忽略 gateway 設定:
sudo openvpn --config connect.cong --pull-filter ignore redirect-gateway
連線以後僅需要特定網段走 VPN,可以在設定檔中加上 push route
:
auth-user-pass auth.conf client auth SHA1 ignore-unknown-option cipher data-ciphers .... # 僅 10.3.0.* 的封包改走 VPN push "route 10.3.0.0 255.255.255.0" <ca> -----BEGIN CERTIFICATE-----
原本以為使用 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';
參考資料:
在多台電腦間共用目錄,samba 應該算是最方便的工具了。
安裝 samba:
sudo apt install samba
安裝完成後,可以在 /etc/samba
找到設定檔 smb.conf
。
開啟設定檔,加入目錄共用設定:
[folderName] comment = Samba on Ubuntu path = /home/zeroplex/files/ read only = no browsable = yes
foldername
:在網路上要顯示的名稱,照上面的設定為 \\192.168.0.xxx\folderName
path
:主機上要共用的目錄路徑