Rocky Linux 9安裝let’s Encrypt

dnf install certbot
firewall-cmd --add-service=http --permanent
firewall-cmd --add-service=https --permanent
firewall-cmd --reload
# 申請mail.test.com 憑證
systemctl stop httpd
certbot certonly --standalone --preferred-challenges http -d  mail.test.com

# 若要renew 請加到crontab
certbot renew --post-hook "systemctl restart httpd"

Rocky Linux 9 安裝podman

 dnf install podman container-tools

讓系統自動啟用podman

systemctl enable podman
systemctl enable podman-restart

修改預設儲存路徑(預設是”/var/lib/containers/storage”)

mkdir -p /podman/storage
vi /etc/containers/storage.conf

讓selinux開放使用

semanage fcontext -a -e /var/lib/containers/storage /podman/storage
restorecon -R -v /podman/storage/

將新的podman storage綁定到原本的/var/lib/container

mount -o bind /podman/storage/ /var/lib/containers
#上面指令綁定,若確認成功,改成開機就綁定
vi /etc/fstab
/podman/storage/ /var/lib/containers bind bind 0 0

重開機,或下指令讓podman 跑起來

systemctl start podman

查看修改的路徑是否生效

podman info

Rocky Linux 9 minimal 安裝後,必須額外安裝的套件

有遇到就加在這裡

#找semanage成是在哪個套件
dnf provides semanage 
dnf install policycoreutils-python-utils
#epel
dnf install epel-release
# CRB
dnf config-manager --enable crb
# net tools include ifconfig
dnf install net-tools
# httpd mod_ssl
dnf install httpd mod_ssl
# git
dnf install git
# sshpass (remote command by ssh )
dnf install sshpass

outlook 關於ldap通訊錄的處理經驗

公司是小公司, 所以我都自架郵件伺服器, 使用postfix mail server + 微軟的網域主控站做認證.

同事的通訊錄就使用ldap連到網域主控,快速設定通訊錄 一直以來相安無事, 若是遇到亂碼,就改用戶端windows系統支援UTF-8

但是最大的問題是, 若是筆電拿到外面去, ldap就無法連線, 就算用不到ldap通訊錄, 收發信的時候, 也常常出現ldap無法連線的錯誤, 很是困擾.

後來發現能修改預設通訊錄檢查方式, 就能避掉外出人員, 收發信的問題.

預設值是”從全域通訊錄清單開始“, 我們改成”從聯絡人資料夾開始“, 開啟通訊錄,也改成”Outlook通訊錄

Rocky Linux 9 設定套件來源

安裝完Rocky Linux 9, 接著要安裝EPEL(Extra Packages for Enterprise Linux)來源,以及CRB(Code Ready Builder)

dnf -y install epel-release
dnf -y config-manager --enable crb

這樣安裝powertools就方便多了, 以前我在CentOS 8要安裝 aspell 作法如下:

dnf --enablerepo=powertools install aspell

現在不用了, 直接輸入:

dnf install aspell

RockyLinux 9 簡易安裝 mariadb

好久沒安裝mysql了, 我之前都是docker 無腦安裝, 並不需要了解太多, 但是因為我先前安裝的 piwigo docker版本升級不利, 想說手動安裝piwigo看看, 當然第一步就是安裝mariadb囉.

這次RL9預設的mariadb是10.5, 安裝相當簡單

dnf install mariadb-server

接下來就是改密碼,預設console直接可以使用root登入

mysql -p -uroot

跟之前不一樣,我還停留mysql舊時代改密碼方式 update user set password=password(‘you password’) where user=’root’
居然失敗了, 爬了文, 反正就是跟上主流,改用oracle類似的變更方式了

alter user root@localhost identified by 'your password';
flush privileges;

很多相關設定可參考原廠文件

1 16 17 18 19 20 78