20260319 サーバ移行01 » 履歴 » バージョン 2
バージョン 1 (健二 酒井, 2026/03/19 16:22) → バージョン 2/3 (健二 酒井, 2026/03/19 20:52)
# 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
```
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
```