2026年10月23日

例の件で研究室サーバの更新をしようと、さくらのVPSを新しく契約しようとしたら、例の件で新規追加を停止中。

dnf install -y vim-enhanced
sudo dnf upgrade --refresh -y
sudo cp -a /etc/selinux/config /etc/selinux/config.before-enable
sudo sed -i 's/^SELINUX=.*/SELINUX=permissive/' /etc/selinux/config
sudo grubby --update-kernel=ALL --remove-args="selinux=0"
sudo grubby --update-kernel=ALL --args="enforcing=0"
sudo reboot

この状態でログインしてgetenforceがPermissiveであることを確認。

sudo setenforce 1
getenforce

して、Enforcingになっていることを確認。別端末からログインできることを確認。永続化。

sudo sed -i 's/^SELINUX=.*/SELINUX=enforcing/' /etc/selinux/config
sudo grubby --update-kernel=ALL --remove-args="enforcing=0"
sudo reboot
sudo systemctl enable --now firewalld
sudo firewall-cmd --list-services

ここでもsshできることを確認。

Dockerその他のインストール。有効化。

sudo firewall-cmd --permanent --remove-service=cockpit
sudo firewall-cmd --reload
sudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl enable --now docker
sudo docker compose version
sudo dnf -y rsync semanage

証明書はCaddyで自動更新。

名前を本番環境に変えたらアクセスできなくなった。原因は証明書が無効になったから。そりゃそうだ。

Subversionの移行にも成功。これで懸案だったウェブサーバ、svnサーバの移行終了。めでたい。

いやー、そもそも古いOS使ってて、「上げなきゃなー」と思っていたけど超腰が重かったのだが、今回の件で一気に対応。っていうか、ちょっと前(去年くらい?)はサーバ管理系はChatGPT全然ダメだったけど、今回の対応はほぼ完璧。サーバも直接apacheではなくDocker Composeで対応していろいろ楽だし、これまでちゃんと対応してこなかったSELinuxもちゃんとEnforcingにした(←いや、面倒くさくて・・・)。

本当にAIの進展はすごいなぁ。