AWS EC2 Amazon Linux2
AWS EC2 Amazon Linux2 PHP5.6
上記サイトを参考にphpだけphp5.6に変更
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
sudo sed -i -e 's/priority=10/priority=99/g' /etc/yum.repos.d/amzn2-core.repo
sudo vim /etc/yum.repos.d/amzn2-core.repo
priority=10を
priority=99に全て変更
sudo sed -i -e 's/priority = 10/priority = 99/g' /etc/yum.repos.d/amzn2-extras.repo
sudo vim /etc/yum.repos.d/amzn2-extras.repo
priority=10を
priority=99に全て変更
sudo yum install --enablerepo=remi,remi-php56 php php-mbstring php-mysqlnd
sudo yum install -y --enablerepo=remi,remi-php56 php56-php-devel php56-php-pear php56-php-mbstring php56-php-xml php56-php-mcrypt php56-php-gd php56-php-pecl-xdebug php56-php-opcache php56-php-pecl-apcu php56-php-fpm php56-php-phpunit-PHPUnit php56-php-mysqlnd
Sudo yum -y --enablerepo=remi-php56 install php-pear
sudo yum -y install httpd
sudo su
systemctl enable httpd.service
systemctl start httpd.service
echo "" > /var/www/html/info.php
sudo yum -y install postgresql postgresql-server postgresql-libs
sudo yum install --enablerepo=remi,remi-php56 php php-devel php-pdo php-pear php-mbstring php-common php-cli php-mysql php-mysqlnd php-devel php-pgsql php-gd php-mcrypt
postgresql-setup initdb
cd /var/lib/pgsql/data
vi postgresql.conf
#listen_addresses = 'localhost' # what IP address(es) to listen on;
listen_addresses = ‘*’ # 変更;
# comma-separated list of addresses;
# defaults to 'localhost'; use '*' for all
# (change requires restart)
#port = 5432 # (change requires restart)
port = 5432 # 外す

vi pg_hba.conf
# "local" is for Unix domain socket connections only
#local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 ident
host all all 127.0.0.1/32 trust
host all all 217.178.34.168/32 trust
host all all 133.18.168.64/32 trust
host all all 219.117.226.26/32 trust
host all all 153.127.240.131/32 trust
host all all 133.18.22.205/32 trust
host all all 133.18.4.55/32 trust
host all all 153.122.55.69/32 trust
host all all 133.18.171.251/32 trust
host all all 133.18.175.26/32 trust
host all all 126.209.230.41/32 trust

systemctl restart postgresql.service

pear install DB
pear install Auth
pear install Image_QRCode-0.1.3
pear install XML_Parser
pear install Net_POP3
pear install Mail
pear install Mail_Mime
pear install Mail_mimeDecode


Mysql install
yum install http://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
yum install mysql-community-server

[root@ip-10-10-10-93 ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.34

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> set password for root@localhost=password('A-QVPpTF7v8M');

phpMyAdmin install
wget http://www.jazzman.club/phpMyAdmin-4.9.7-all-languages.tar.gz
mkdir phpMyAdmin && tar -xvzf phpMyAdmin-4.9.7-all-languages.tar.gz -C phpMyAdmin --strip-components 1


yum -y install ImageMagick
yum -y install ImageMagick-devel
pecl install imagick
vi /etc/php.ini
extension=imagick.so をphp.iniに追加

????