1. VPC_SG_IAM_RDS_EFS(すべてのリソースが使用されるべきです作成するCloudFormationを)
1.1 VPCのネットワークを作成します。
1.2セキュリティグループを作成します。
1.3 IAMロールの作成
1.4 RDSインスタンスの作成
1.5 EFSファイルシステムの作成
2.は、Apache&PHPをインストールワードプレスを設定します
2.1構成:
yum install httpd24 -y chkconfig httpd on yum -y install php55 php55-bcmath php55-devel php55-common php55-cli php55-pecl-apc php55-pdo php55-mysql php55-xml php55-gd php55-mbstring php-pear php55-mysqlnd php55-mcrypt sudo yum install -y amazon-efs-utils sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport fs-469e6527.efs.ap-northeast-2.amazonaws.com:/ /var/www/html/ cd /var/www/html/ wget https://wordpress.org/latest.zip unzip latest.zip mv wordpress/* /var/www/html/ rm -rf latest.zip wordpress/ chown -R apache:apache /var/www/html/* chmod -R 755 /var/www/html/*
2.2 配置wordpress
[root@ip-192-168-3-73 html]# vim wp-config.php
[root@ip-192-168-3-73 html]#
测试,所以不需要Google搜索
2.3 登陆方式:
http://13.209.82.198/wp-admin/
2.4测试:
写一个test page
2.5 Bootstrap脚本
#!/bin/bash sudo -s sudo yum update -y yum install httpd24 -y chkconfig httpd on yum -y install php55 php55-bcmath php55-devel php55-common php55-cli php55-pecl-apc php55-pdo php55-mysql php55-xml php55-gd php55-mbstring php-pear php55-mysqlnd php55-mcrypt sudo yum install -y amazon-efs-utils sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport fs-469e6527.efs.ap-northeast-2.amazonaws.com:/ /var/www/html sudo echo "fs-469e6527.efs.ap-northeast-2.amazonaws.com:/ /var/www/html nfs4 nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,_netdev,noresvport 0 0" >> /etc/fstab cd /var/www/html echo "<?php phpinfo(); ?>" > phpinfo.php service httpd start wget https://wordpress.org/latest.zip unzip latest.zip mv wordpress/* /var/www/html/ RM -rfワードプレス/ latest.zip のsudoのchown -R apacheの:apacheの/ var / www / htmlと設定/ * sudoのはchmod -R 775 / var / www / htmlと設定