我刚刚使用来自亚马逊的aws 提供的图像在我的 Windows 10 管理程序上安装了 amazon linux 。我能够成功登录。但是,当我执行yum 安装任何东西时,它只会失败并显示错误“无法解析主机:cdn.amazonlinux.com”。以下是完整片段
[root@cloudimg yum]# yum install curl
Loaded plugins: langpacks, priorities, update-motd
https://cdn.amazonlinux.com/2/core/2.0/x86_64/f5ab60d117aab318ddc588ab7dbac074cc20ddf36a924287c55fbd593496ae79/repodata/repomd.xml?instance_id=fail®ion=URLError: [Errno 14] curl#6 - "Could not resolve host: cdn.amazonlinux.com"
Trying other mirror.
https://cdn.amazonlinux.com/2/extras/docker/18.09.9/x86_64/6f06d82b5b1fa3d35af7a537bd9f3fa1d95d238361558bbb1e6a47c219c3adb2/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: cdn.amazonlinux.com"
Trying other mirror.
amzn2extra-docker/2/x86_64/pri FAILED
https://cdn.amazonlinux.com/2/extras/docker/18.09.9/x86_64/6f06d82b5b1fa3d35af7a537bd9f3fa1d95d238361558bbb1e6a47c219c3adb2/repodata/primary.sqlite.gz: [Errno 14] curl#6 - "Could not resolve host: cdn.amazonlinux.com"
Trying other mirror.
https://cdn.amazonlinux.com/2/extras/docker/18.09.9/x86_64/6f06d82b5b1fa3d35af7a537bd9f3fa1d95d238361558bbb1e6a47c219c3adb2/repodata/primary.sqlite.gz: [Errno 14] curl#6 - "Could not resolve host: cdn.amazonlinux.com"
Trying other mirror.
One of the …Run Code Online (Sandbox Code Playgroud) 有人可以提供在 amazon linux 2 上安装 mariadb 的步骤吗?我对 Linux 还很陌生,所以如果能提供一些细节,我将不胜感激。我看到了一些在 centOs 上安装 maria db 的链接,但不确定这是否适用于 Amazon linux 2
我正在将 Elastic Beanstalk 部署升级到 Linux2。多个.ebextensions脚本在新部署中失败。看来 的用法get_config已经改变。
旧脚本变量:
EB_APP_USER=$(/opt/elasticbeanstalk/bin/get-config container -k app_user)
EB_APP_DEPLOY_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k app_deploy_dir)
EB_APP_PID_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k app_pid_dir)
EB_SCRIPT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k script_dir)
EB_SUPPORT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k support_dir)
Run Code Online (Sandbox Code Playgroud)
我能够在https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/custom-platforms-scripts.html找到前两个的替代品
新的脚本变量:
EB_APP_USER=$(/opt/elasticbeanstalk/bin/get-config platformconfig -k AppUser)
EB_APP_DEPLOY_DIR=$(/opt/elasticbeanstalk/bin/get-config platformconfig -k AppDeployDir)
Run Code Online (Sandbox Code Playgroud)
我找不到替代品
app_pid_dirscript_dirsupport_dir有人知道我应该用什么吗?
自从我开始使用 AWS ECS 以来,我一直遵循AWS ECS 参考架构。此参考架构使用 Amazon Linux,我想更新到 Amazon Linux 2,但我不确定我需要做什么才能成功完成此转换。
此参考架构的 GitHub 存储库上存在一个问题,尽管有几个人寻求帮助,但它已经几个月没有受到任何关注。据我了解,以下是使用 Amazon Linux 2 ECS 优化 AMI 时需要解决的一些问题:
sysvinitAmazon Linux 2 不再支持;systemd应该改用。journald了 Cloud 当前不支持的docker 日志(此处描述)我有一个开源项目,用于学习 CloudFormation 和 AWS;这ecs-cluster.yaml是描述我尝试更新的 ECS 集群和容器实例的文件的链接。
我听说有些人将 Amazon Linux 2 与 ECS 一起使用,我也想更新,因为对 Amazon Linux (1) 的支持将在大约 6 个月后结束。有谁知道为了将 Amazon Linux 2 与 ECS 一起使用,我还需要考虑哪些其他因素?调试此问题非常耗时,我不确定应该尝试哪些选项和配置。
linux amazon-web-services amazon-ecs amazon-linux amazon-linux-2
昨天我们与 10 台配置相同的服务器失去了联系,经过一番调查后得出的结论是安全更新后重新启动失败了。
到目前为止,我们还无法让任何服务器重新上线,但很幸运能够重新安装实例而不会丢失数据。
我将粘贴下面的控制台日志,任何人都可以帮助我确定根本原因,也许可以给我一些建议,告诉我是否有更好的方法来配置服务器以使恢复更容易(例如通过“按 Enter 继续”提示)。 ,它似乎挂在)。
完整的日志对于SO来说太大了,所以我把它放在pastebin上并粘贴了下面的编辑版本。我已经删除了使输出着色的转义序列并删除了一些双新行,但除此之外它是完整的。
[ 0.000000] Linux version 4.14.200-155.322.amzn2.x86_64 (mockbuild@ip-10-0-1-230) (gcc version 7.3.1 20180712 (Red Hat 7.3.1-10) (GCC)) #1 SMP Thu Oct 15 20:11:12 UTC 2020
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.14.200-155.322.amzn2.x86_64 root=UUID=a1e1011e-e38f-408e-878b-fed395b47ad6 ro console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 nvme_core.io_timeout=4294967295 rd.emergency=poweroff rd.shell=0 LANG=en_US.UTF-8
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] SMBIOS 2.7 present.
[ 0.000000] DMI: Amazon EC2 t3.micro/, BIOS …Run Code Online (Sandbox Code Playgroud) 我正在尝试增加 Beanstalk Nodejs 服务器( Amazon Linux 2worker_connections )上的 nginx数量。
我按照文档创建了一个包含以下内容的文件:.platform/nginx/conf.d/proxy.conf
worker_rlimit_nofile 65536;
events {
worker_connections 32768;
}
Run Code Online (Sandbox Code Playgroud)
部署时我收到错误:
[emerg] "worker_rlimit_nofile" directive is not allowed here in /var/proxy/staging/nginx/conf.d/proxy.conf
当评论这一行时我仍然得到:
[emerg] "events" directive is not allowed here in /var/proxy/staging/nginx/conf.d/proxy.conf:3
我想在 AWS Beanstalk 上部署 JAVA 应用程序(基于 PlayFramework 1.x)。我正在使用基于 Corretto 8 的 Web 服务器环境,在 64 位 Amazon Linux 2/3.1.6 上运行。
我还在环境中添加了一个负载均衡器。在部署过程中,我的钩子运行良好(例如数据库模式演变),然后就到了启动 Web 服务器的时候了。
部署失败并出现以下错误:
[ERROR] update processes [web cfn-hup nginx healthd] pid symlinks failed with error Read pid source file /var/pids/web.pid failed with error:open /var/pids/web.pid: no such file or directory
[ERROR] An error occurred during execution of command [app-deploy] - [Track pids in healthd]. Stop running the command. Error: update processes [web cfn-hup nginx healthd] pid symlinks failed with error Read …Run Code Online (Sandbox Code Playgroud) 我正在尝试在 Elastic Beanstalk 上的 AWS Linux 2 上运行节点应用程序,并且需要使用纱线安装依赖项。(如果您尝试使用 npm 而不是纱线来安装依赖项,我的 Node 应用程序会导致错误。)
我已经弄清楚如何在 .platform/hooks/prebuild/ 中设置脚本以使其运行yarn,但即使它正在运行yarn安装,它仍然会尝试运行npm install,这会出错,导致我的部署失败了。
所以我需要弄清楚如何阻止默认的 npm install 步骤运行。
(有谁知道在 AWS Linux 2 设置过程中从哪个文件运行该命令?我想知道是否可以在 .platform/hooks/prebuild/ 中添加另一个脚本来修改该文件以防止调用 npm。)
amazon-ec2 node.js npm amazon-elastic-beanstalk amazon-linux-2
AWS 的 Linux 2 有一个工具“ Amazon Linux Extras ”,它为各种东西(nginx、php、mariadb 等)提供额外的存储库。
我很惊讶找不到此功能的 Ansible 模块。我为此在 github 中找到了一个 repo,但它是空的。
我可以通过手工制作 yum_repository 模块任务来解决这个问题。这需要逆向工程 AWS 的 CLI 命令(又名 amazon-linux-extras install ...)正在做什么。或者我可以直接运行该命令,但是每次运行剧本时这当然会触发更改。
有什么建议?
我正在尝试将 Django 应用程序部署到 AWS ElasticBeanStalk。
我遵循了标记正确答案中的所有指南,但仍然出现以下错误:
[INFO] -----------------------Command Output-----------------------
[INFO] find: '/.platform/hooks/': No such file or directory [INFO]
------------------------------------------------------------
Run Code Online (Sandbox Code Playgroud)
当我使用 Windows 操作系统时,我从https://cocalc.com/在线控制台创建了我的 .sh 文件。
我还压缩了文件并使用 EBS 控制台进行部署,以避免在 git add/commit 期间转换我的文件。
我在 .ebextension 内容中的配置文件是:
container_commands:
01_sh_executable:
command: "chmod +x .platform/hooks/predeploy/01_execute.sh"
Run Code Online (Sandbox Code Playgroud)
我的 01_execute.sh 文件内容是:
#!/bin/bash
source /var/app/venv/*/bin/activate
cd /var/app/staging
python manage.py makemigrations
python manage.py migrate
python manage.py createsu
python manage.py collectstatic --noinp
Run Code Online (Sandbox Code Playgroud)
选择的平台是在 64 位 Amazon Linux 2 上运行的 Python 3.7。我还注意到,当我运行 eb ssh 并键入 ls 时,它返回空白。Linux 不是我的强项之一。
任何帮助将不胜感激。
django amazon-web-services amazon-elastic-beanstalk python-3.7 amazon-linux-2
amazon-linux-2 ×10
amazon-ec2 ×2
amazon-linux ×2
amazon-ecs ×1
ansible ×1
django ×1
linux ×1
mariadb-10.4 ×1
node.js ×1
npm ×1
python-3.7 ×1