我怎么知道要创建什么.ebextensions配置文件? [英] How do I know what .ebextensions config file to create?
问题描述
我认为我走在正确的道路上.我可以使用.ebextensions更改我正在运行的实例的某些conf文件.由于我使用的是Elastic Beanstalk,并且很多软件都进行了收缩包装(我很好用),因此我应该使用.ebextensions作为修改环境的一种方式.
I think I'm on the right path. I can use .ebextensions to change some of the conf files for the instance I'm running. Since I'm using Elastic Beanstalk, and that a lot of the software is shrinkwrapped (which I'm fine with), I should be using .ebextensions as a means of modifying the environment.
我想采用某种形式的mod_rewrite配置,但是我对这个Amazon Linux一无所知.我什至不知道Web服务器是什么.在过去的几个小时中,我一直在使用控制台,但看不到我要覆盖的所有内容.
I want to employ some form of mod_rewrite config, but I know nothing of this Amazon Linux. I don't even know what the web server is. I've been through the console for the past few hours and see no trace of the things I want to override.
显然,我可以设置一个外壳来环顾四周,但是由于Beanstalk正在处理配置,以这种方式进行修改会导致内容被覆盖.我不确定最后一点.
Apparently I can setup a shell to take a look around, but modifying things that way will cause things to be overridden since Beanstalk is handling config. I'm not entirely sure on that last point.
我应该像典型的unix主机一样在userland ssh玩吗?
Should I just ssh and play in userland like a typical unix host?
推荐答案
您绝对可以SSH到该实例,然后四处看看.但是请记住,您的更改不是永久性的.您应该将.ebextensions配置文件视为在主机上重新运行命令的方式,以及更多.
You can definitely ssh to the instance, and see around. But remember, that your changes are not persistent. You should look at .ebextensions config files as the way to re-run your commands on the host, plus more.
可能要花一些时间才能看到ElasticBeanstalk在哪里存储配置文件和所有其他有趣的东西.
It might take some time to see where ElasticBeanstalk stores configuration files and all other interesting things.
为您入门,您的应用程序文件位于:/opt/python/current/app
,如果您使用的是Python,则它位于虚拟环境中:/opt/python/run/venv/bin/python27
To get you started, your app files are located at: /opt/python/current/app
and if you are using Python, it is located in virtual environment at: /opt/python/run/venv/bin/python27
在运行Linux的EC2实例上自定义软件指南包含详细信息有关您可以做什么的信息:
Customizing the Software on EC2 Instances Running Linux guide contains detailed information on what you can do:
- 软件包-安装软件包
- 来源-检索档案文件
- 文件-文件操作
- 用户-与用户有关的任何事情
- 组-任何具有组的
- 命令-执行实例命令
- Container_commands-在容器放入后执行命令 提取
- 服务-启动服务
- Option_settings-配置 容器设置
- Packages - install packages
- Sources - retrieve archives
- Files - operations with files
- Users - anything with users
- Groups - anything with groups
- Commands - execute instance commands
- Container_commands - execute commands after the container is extracted
- Services - launch services
- Option_settings - configure container settings
查看是否满足您的要求,如果不满足,请返回StackOverflow并提出更多问题.
See if that satisfies your requirements, if not, come back to StackOverflow and ask more questions.
这篇关于我怎么知道要创建什么.ebextensions配置文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!