プロジェクト

全般

プロフィール

20260319 サーバ移行01

Redmineサーバの移行のメモ

  • etckeeperのインストール
  • localeを日本語に設定
  • /etc/skelの設定

諸々のインストール

dnf install epel-release vim bash-completion htop bind-utils lsof dnf-automatic

userの追加

adduser s.castle
cd /home/s.castle/.ssh

echo "公開鍵" >> authorized_keys

getent group | grep wheel
usermod --append --groups wheel s.castle
getent group | grep wheel

/etc/sudoersの設定

wheelグループに権限追加

visudo

nginx

apacheからnginxに変更をする

mkdir /var/www /var/www/html
cd /var/www/html
mkdir www.sylow-castle.work

firewallはVPS側の設定で。
静的ファイルを開こうとするとSELinuxで拒否された雰囲気のため確認する

cd /var/www
chcon -R -t httpd_sys_content_t ./html

これで動くようになったのでSELinuxが原因と確認。SELlinuxの設定を永続化する。

dnf install policycoreutils-python-utils 
semanage fcontext -a -t httpd_sys_content_t "/var/www/html(/.*)?"
restorecon -Rv /var/www/html

ファイルは見られるけどリバースプロキシとして動作しない。やはりSELinuを試す

setenforce 0

当たりだったので適当に調べて解決

getsebool httpd_can_network_connect
httpd_can_network_connect --> off
setsebool -P httpd_can_network_connect on