プロジェクト

全般

プロフィール

20260319 サーバ移行01 » 履歴 » リビジョン 2

リビジョン 1 (sylow castle, 2026/03/19 16:22) → リビジョン 2/3 (sylow castle, 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 

 ```