cat /etc/redhat-release
月: 2019年11月
yumがうまく動かなかった場合?
http://mirror.centos.org/centos/6/SCL/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 – “The requested URL returned error: 404 Not Found”
他のミラーを試します。
エラー: Cannot retrieve repository metadata (repomd.xml) for repository: scl. Please verify its path and try again
sudo yum -y remove centos-release-SCL
sudo yum -y install centos-release-sclo-rh
↓別対応(これの場合、CentOSがバージョンアップしてしまう)
$ sudo yum remove centos-release-SCL
$ sudo yum update # CentOS-6.8にアップデート
$ sudo yum install centos-release-scl
$ sudo yum update
秘密鍵
default: Warning: Authentication failure. Retrying…
↑のようなエラー時
vagrant ssh-config
IdentityFile “C:/xampp/htdocs/attendance/vagrant/.vagrant/machines/attendance/virtualbox/private_key”
ssh-keygen -yf xxxx/vagrant_private_key > public_key
public_keyがゲスト側にできるので、viとかで中身見てコピー
vagrant ssh
初期パスワードは「vagrant」
sudo vi /home/vagrant/.ssh/authorized_keys
コピーしたpublic_keyの中身を上書き
ファイル検索
sudo find / -name “httpd.conf” -type f
sudo grep -r /var/www/ /etc/
↑etc配下の「/var/www/」が記載されているファイルを探す
ファイル権限変更
sudo chmod 777 www
sudo chown www-data www
sudo chmod -R 777 www
sudo chown -R www-data www
sudo chown -R www-data:www-data www
chown -R nobody logs
「logs」の所有者を「nobody」に変更(もともと「root」とかになってた)
※「-R」は「logs」配下のすべてが「nobody」になる
INFOやTESTファイル書き込み作成
echo ‘<h1>It works!</h1>’ > /var/www/html/test.html
echo “<?php phpinfo() ?>” > /var/www/html/phpinfo.php