-
课程简介 5
-
Lecture1.1
-
Lecture1.2
-
Lecture1.3
-
Lecture1.4
-
Lecture1.5
-
-
Amazon Web Services基础 7
-
Lecture2.1
-
Lecture2.2
-
Lecture2.3
-
Lecture2.4
-
Lecture2.5
-
Lecture2.609 min
-
Lecture2.7
-
-
Identity Access Management (IAM) – 身份认证服务 3
-
Elastic Compute Cloud (EC2) – 计算服务 24
-
Lecture4.1
-
Lecture4.2
-
Lecture4.3
-
Lecture4.4
-
Lecture4.5
-
Lecture4.619 min
-
Lecture4.719 min
-
Lecture4.815 min
-
Lecture4.915 min
-
Lecture4.1010 min
-
Lecture4.1125 min
-
Lecture4.1211 min
-
Lecture4.1314 min
-
Lecture4.1408 min
-
Lecture4.1532 min
-
Lecture4.1617 min
-
Lecture4.1720 min
-
Lecture4.1825 min
-
Lecture4.1929 min
-
Lecture4.2018 min
-
Lecture4.2123 min
-
Lecture4.2212 min
-
Lecture4.2322 min
-
小测4.110个问题
-
-
Simple Storage Service (S3), Glacier, CloudFront – 存储服务 16
-
Lecture5.1
-
Lecture5.2
-
Lecture5.308 min
-
Lecture5.410 min
-
Lecture5.506 min
-
Lecture5.621 min
-
Lecture5.706 min
-
Lecture5.805 min
-
Lecture5.910 min
-
Lecture5.1027 min
-
Lecture5.1115 min
-
Lecture5.1220 min
-
Lecture5.1315 min
-
Lecture5.1418 min
-
Lecture5.1520 min
-
小测5.115个问题
-
-
Virtual Private Cloud (VPC) – 网络服务 12
-
Lecture6.120 min
-
Lecture6.235 min
-
Lecture6.320 min
-
Lecture6.425 min
-
Lecture6.510 min
-
Lecture6.620 min
-
Lecture6.710 min
-
Lecture6.810 min
-
Lecture6.915 min
-
Lecture6.1014 min
-
Lecture6.1115 min
-
小测6.19个问题
-
-
Route53 – DNS服务 9
-
Lecture7.115 min
-
Lecture7.215 min
-
Lecture7.310 min
-
Lecture7.415 min
-
Lecture7.510 min
-
Lecture7.620 min
-
Lecture7.710 min
-
Lecture7.810 min
-
小测7.110个问题
-
-
RDS, DynamoDB Database – 数据库服务 9
-
Lecture8.120 min
-
Lecture8.225 min
-
Lecture8.320 min
-
Lecture8.420 min
-
Lecture8.505 min
-
Lecture8.610 min
-
Lecture8.705 min
-
Lecture8.810 min
-
小测8.110个问题
-
-
应用服务(SQS, SWF, SNS等) 8
-
Lecture9.120 min
-
Lecture9.210 min
-
Lecture9.310 min
-
Lecture9.410 min
-
Lecture9.505 min
-
Lecture9.615 min
-
Lecture9.715 min
-
小测9.19个问题
-
-
其他服务 10
-
Lecture10.115 min
-
Lecture10.215 min
-
Lecture10.315 min
-
Lecture10.410 min
-
Lecture10.515 min
-
Lecture10.605 min
-
Lecture10.718 min
-
Lecture10.818 min
-
Lecture10.911 min
-
Lecture10.1013 min
-
-
真实的高可用AWS架构方案 7
-
Lecture11.120 min
-
Lecture11.230 min
-
Lecture11.320 min
-
Lecture11.425 min
-
Lecture11.510 min
-
Lecture11.610 min
-
Lecture11.720 min
-
-
AWS认证考试白皮书 8
-
Lecture12.115 min
-
Lecture12.215 min
-
Lecture12.320 min
-
Lecture12.420 min
-
Lecture12.520 min
-
Lecture12.6
-
Lecture12.715 min
-
Lecture12.820 min
-
-
综合测试题 1
-
小测13.165个问题
-
-
考试指南 3
-
Lecture14.105 min
-
Lecture14.210 min
-
Lecture14.305 min
-
60个评论
echo “fs-016d99b36e6cd3ae1.efs.ap-northeast-3.amazonaws.com:/ /var/www/html nfs4 nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,_netdev,noresvport 0 0” >> /etc/fstab
这条命令执行不成功怎么办,提示没有fstab这个目录,可以自己在/etc下面创建一个吗?
参照 https://www.youtube.com/watch?v=yhALnQUdtns 解决 Names or service not known的问题
谢谢补充!
小茶,请教下下边这些命令用来做什么的?因为视频中貌似没有这几个
sudo amazon-linux-extras install -y epel
sudo yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum-config-manager –enable remi-php72
sudo scl enable php72 bash
echo “xxxxx.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
1. 无法挂载EFS,提示无法解析 EFS的DNS名字
2. 另外在EC2创建时,现在有直接挂载文件系统,不过提示没有挂载点
看看VPC设置里面有没有开启“DNS域名解析”,如果没开启会解析不到EFS的DNS名字的。
亲测需要在VPC里开启DNS主机名和DNS解析才可以挂载成功。
小茶老师,efs没法挂载到ec2里有什么可能,报下面的错误:
Name or Service not known
mount.nfs4: Operation already in progress
创建实例时可以选择最新的AMI LINUX2实例,然后安装最新的php和mariadb,可以使用下面脚本:
#!/bin/bash
sudo -s
sudo yum update -y
sudo amazon-linux-extras install -y lamp-mariadb10.2-php7.2 php7.2 epel
sudo yum install -y httpd mariadb-server
sudo systemctl start httpd.service
sudo systemctl enable httpd.service
sudo usermod -a -G apache ec2-user
#mount
#echo fstab
sudo chown -R ec2-user:apache /var/www
sudo chmod 2775 /var/www && find /var/www -type d -exec sudo chmod 2775 {} \;
find /var/www -type f -exec sudo chmod 0664 {} \;
cd /var/www/html
echo “” > phpinfo.php
wget https://wordpress.org/latest.zip
unzip latest.zip
mv wordpress/* /var/www/html/
rm -rf wordpress/ latest.zip
sudo chown -R apache:apache /var/www/html/*
chmod -R 775 /var/www/html
亲测有效,希望对大家有用。
感谢补充和修正!
EC2主机的公有DNS地址,每次关机重启后会变化。这会造成WordPress无法登入。为了解决这个问题,这篇文章最后面,关于如何解决这个问题,帮了大忙了。
https://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/hosting-wordpress.html
这个好,赞一个。
不能选择数据库
我们能够连接到数据库服务器(这意味着您的用户名和密码正确),但未能选择wordpress2数据库。
您确定它存在吗?
用户wordpress2有权限使用数据库wordpress2吗?
在部分系统中您的数据库名称前缀是您的用户名,如是username_wordpress2。可能是这种问题吗?
如果您不知道如何设置数据库,您应该联系您的主机提供商。或者您也可以在WordPress支持论坛获得帮助。
数据库名字,用户名,密码都没错怎么就连不上呀?
查一下数据库名称是否正确,以及表前缀是否正确(默认表前缀是wp_)
是要填数据库名,而不是数据库ID。我开始填了数据库ID,报同样的错误。改成数据库名就OK了
能否更新一下Bootstrap脚本脚本的内容?php5.5已经不支持最新的wordpress了,自己尝试安装php7.3一直没成功。。挫败得很。。
今天下午已经更新了代码的部分了哈。现在代码中直接安装php7.2(目前来说7.3版本很多bug我觉得),可以直接放到Bootstrap使用啦!
谢谢亲爱的小茶
为你服务是我的荣幸
我有个疑问,每个instance都有EBS存储,WordPress配置文件可以放到上面吗?为什么还要挂载EFS呢?
可以的,可以放在本地的EBS,当然没有问题。如果考虑你有多个实例在同一个负载均衡器后面,这个时候我作为用户上传了一个文件,那么这个文件只会存在某一个EBS中,如果这个实例后来scale in被终止了,我的这个文件也会消失。所以需要用EFS共享存储,或者将文件持久化到S3等地方。
老师,现在我可以访问phpinfo,但安装好wordpress后就无法访问主页了。
显示“”该网页无法正常运作13.125.183.101 目前无法处理此请求。
HTTP ERROR 500“”
查不出来是哪一步有问题。
估计是php版本偏低。wordpress的lastest.zip早就升级到PHP7了, 是可以读下readme.html看看对php版本的最低要求,重新安装高版本的php就可以了。
500错误一般是服务端错误了,看看PHP版本配置和Apache的配置吧。
如何安装高版本,我网上找了命令,但是不对,正打算重新实验下,新建要给ec2.。在安装 yum install http24 -y ,只后就显示 No package httpd24 available.
http这个好了,怎么升级PHP呢?老师可以给个代码吗?
Steven,试下看看这个博客指引,我之前按这个做过一次,是可以的。
打开主页后提示这个:
Your server is running PHP version 5.5.38 but WordPress 5.2.1 requires at least 5.6.20.
不是wordpress配置界面
在wordpress\wp-includes\version.php中,将
$required_php_version = ’5.6.20′;
修改为
$required_php_version = ’5.2.0′;
不过这只是机械式的更改,有掩耳盗铃的嫌疑,会影响后期的稳定性,不过也算是临时解决办法吧
嗯嗯,测试的话可以这么做。
最好还是升级一下PHP版本
[root@ip-10-0-2-210 ec2-user]# yum update -y
Loaded plugins: priorities, update-motd, upgrade-helper
Could not retrieve mirrorlist http://repo.us-east-1.amazonaws.com/latest/main/mirror.list error was
12: Timeout on http://repo.us-east-1.amazonaws.com/latest/main/mirror.list: (28, ‘Connection timed out after 10001 milliseconds’)
One of the configured repositories failed (Unknown),
and yum doesn’t have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work “fix” this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Disable the repository, so yum won’t use it by default. Yum will then
just ignore the repository until you permanently enable it again or use
–enablerepo for temporary usage:
yum-config-manager –disable
4. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager –save –setopt=.skip_if_unavailable=true
Cannot find a valid baseurl for repo: amzn-main/latest
curl http://www.google.com 有什么结果?
[root@ip-10-0-2-210 ec2-user]# curl http://www.google.com
curl: (6) Could not resolve host: http://www.google.com
搞不定啊
我感觉你的DNS解析有问题,你是不是用自己创建的VPC?是的话,到VPC的设置页面,选取你EC2所在的VPC,点击“操作”,点击“Edit DNS Resolution”,然后再点击“enable”试下。
[root@ip-10-0-2-210 ec2-user]# yum update -y
已加载插件:priorities, update-motd, upgrade-helper
Could not retrieve mirrorlist http://repo.ap-northeast-2.amazonaws.com/latest/main/mirror.list error was
12: Timeout on http://repo.ap-northeast-2.amazonaws.com/latest/main/mirror.list: (28, ‘Connection timed out after 5000 milliseconds’)
升级不了
是不是出方向的安全组或者NACL没有打开80/443口?
开了,还是不行。
hi 小茶,我的EC2 建好后putty一致连不上,报错:Network error:connection timeout . 可能是什么原因呢?
这个要看看你的安全组和NACL的设置喔,一般是这些阻止了你访问。
看一下是否安装EFS后导致的404,EFS内要重新下载安装下wordpress
按照这个流程操作,可以打开Apache的界面, 但是后面添加/phpinfo.php 确找不到页面是怎么回事
phpinfo.php有放到根目录吗?同时要用下面的命令保证文件的权限正确。
sudo chown -R apache:apache /var/www/html/*
小茶老师,echo phpinfo那段话 写不进去文件里面
Putty版本问题
完全按照视频流程操作为什么打不开/phpinfo.php
你进去EC2能找到这个文件吗?如果没有的话,手动执行 echo “” > phpinfo.php
ls列出文件是有phpinfo.php的,为什么访问的时候是404
看一下是否安装EFS后导致的404,EFS内要重新下载安装下wordpress
如果输入在验证PHP url时,发现只显示 ?php phpinfo(); ?而没有执行,可以参考下面的办法。
对于PHP7和Apache2.4:
sudo vim /etc/httpd/conf/httpd.conf
转到最下面并插入以下内容(全部自动插入):
SetHandler application/x-httpd-php
然后,重启Apache以加载新配置
sudo service httpd restart
感谢补充~
我一开始也这样,后面我重启了实例就好了,玄学
我遇到了一个问题记录一下,不知道是不是个例。
环境:选的mysql免费版。
wordpress创建数据库时,死活说连接不上,后来我到rds的参数配置,把rds参数配置文件里的mysql的character_set_database 和 character_set_server 都从utf8mb4改成了utf8,重新生成rds,才装过去。
这种情况我也没遇到过,一般来说RDS不用做特别设置就可以连接上的。可能是wordpress安装的AMI不同导致?
我也遇到这个问题了,后来数据库换了个版本,可以连上了,但是报消息说不能创建wp-config.php文件,需要我自己手工建,这是为啥
权限问题,只需要复制粘贴那一页的内容,手动创建wp-config.php文件就可以了。
手动创建了,权限775,用户apache也更改了,再访问就是当前无法使用此页面
实操发现var/www/html 下面没有wp-config.php 文件,但是有个wp-config-sample。php文件,可以改名去掉sample,或者创建一个wp-config。php,然后把wordpress 提示的内容复制粘贴进去,保存,提升权限,就可以了。2023/3/4
遇到同样的话题,找到答案了,因为RDS创建过程中,不会自动创建数据库instance(检查configuration->database name,显示为空),修正办法是,在创建RDS时,点开advance设置,填写数据库instance名字,这个名字才是wordpress配置页面的数据库名字
我也碰到这个问题,折腾好久,不知道AWS什么时候改的这个设置,我看视频里根本就没有这一步。
感谢告知,“database name显示为空”被这个卡住好久了!因为这个database name的过程和视频里面完全不一样,而且创建好了之后再rds里面还无法修改配置,只能重新创建一个新的数据库,在里面重新配置了!~~后面学习的朋友,看到这里需要引起注意–2020.04.08