我正在尝试让主管工作以确保我的队列系统始终在运行。
以下是我采取的步骤,我从各种来源拼凑而成:(以 root 或超级用户身份运行)
冉:
# easy_install supervisor
# echo_supervisord_conf > /etc/supervisord.conf
# vi supervisord.conf
Run Code Online (Sandbox Code Playgroud)将以下内容粘贴到文件末尾:
command=/usr/bin/php /path/to/AppName/artisan --env=production --timeout=240 queue:listen
Run Code Online (Sandbox Code Playgroud)冉:
# supervisord -c /etc/supervisord.conf
# supervisorctl
supervisor> status
supervisor>
Run Code Online (Sandbox Code Playgroud)
它不显示任何内容。
冉:
# service supervisord reload
supervisord: unrecognized service
Run Code Online (Sandbox Code Playgroud)我正在尝试按照此处的说明安装 amazon-linux-extras :
sudo yum install -y amazon-linux-extras
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
amzn-main | 2.1 kB 00:00:00
amzn-updates | 3.8 kB 00:00:00
839 packages excluded due to repository priority protections
No package amazon-linux-extras available.
Error: Nothing to do
Run Code Online (Sandbox Code Playgroud)
为什么包不可用?
我安装了 EPEL,所以我不明白发生了什么。
更新
输出
sudo yum repolist
Loaded plugins: priorities, update-motd, upgrade-helper
843 packages excluded due to repository priority protections
repo id repo name status
!amzn-main/latest amzn-main-Base 5,934
!amzn-updates/latest amzn-updates-Base 4,722
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 12,517+843
repolist: 23,173
Run Code Online (Sandbox Code Playgroud) 我管理一些运行 Amazon Linux(不确定是什么版本)的 EC2 实例,这些实例需要安全补丁。
很多软件都打了很好的补丁,但我们一直停留在内核升级上。我们无法按照我们的意愿使用最新的内核版本。我们做了什么?
yum update。系统报告我们已经获得了预期的最新内核版本,并且不再需要更新任何内容。uname -r。它报告我们仍然使用相同的内核版本,而不是我们期望的最新内核版本。我们错过了什么要点?请帮忙。
kernel amazon-ec2 linux-kernel amazon-web-services amazon-linux
亚马逊推出了一款名为“Amazon Linux 2”的新 Linux
当我尝试让 certbot 运行时......
wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto
./certbot-auto
Run Code Online (Sandbox Code Playgroud)
给出这个错误
Sorry, I don't know how to bootstrap Certbot on your operating system!
You will need to install OS dependencies, configure virtualenv, and run pip install manually.
Please see https://letsencrypt.readthedocs.org/en/latest/contributing.html#prerequisites for more info.
Run Code Online (Sandbox Code Playgroud)
然后我尝试:
yum install pip
yum install python-pip
pip install cryptography
pip install certbot
yum install python-urllib3
yum install augeas
/usr/bin/certbot
Run Code Online (Sandbox Code Playgroud)
我收到这条消息
Traceback (most recent call last):
File "/usr/bin/certbot", line 7, in <module>
from certbot.main …Run Code Online (Sandbox Code Playgroud) 随着libssh( CVE-2018-10933 )最近发布的安全公告,我想知道如何确定我正在运行的任何服务是否使用了易受攻击的库?我最终会使用yum upgrade该系统,但现在很高兴知道我是否处于危险之中。我在 EC2 上使用Amazon Linux 2 AMI。谢谢!
我需要与之通信的服务器仅允许 TLS1.3 流量。
因此,我已将与 Amazon Linux 2 捆绑的 OpenSSL 版本更新为OpenSSL 1.1.1c.
遵循本指南
我现在可以使用 OpenSSL 例如 TLS 1.3 openssl s_client -connect google.com:443 -tls1_3。
我需要其他命令行工具(例如 cURL 和 Git)来使用此更新版本的 OpenSSL,以便它们也可以使用 TLS 1.3 与服务器进行通信。当我尝试在更新后使用 cURL 时,我得到以下信息
$ curl --tlsv1.3 "https://google.com"
curl: (4) OpenSSL was built without TLS 1.3 support
Run Code Online (Sandbox Code Playgroud)
让 cURL 和 Git 等其他工具使用更新后的 OpenSSL 的最佳方法是什么?
今年 10 月初,亚马逊宣布 EC2 实例按秒计费。这对我来说可能会大大降低成本。然而,亚马逊也表示这种计费方式取决于平台:
按秒计费目前不适用于运行 Microsoft Windows 或 Linux 发行版且按小时单独收费的实例。没有单独按小时收费的市场 AMI 有资格按秒计费。
这种新型计费方式是否也适用于基于 Amazon Linux 的自定义 AMI?如何查看我的账单类型?
amazon-ami amazon-web-services amazon-beanstalk amazon-linux
在 Amazon Linux 2发行说明中,Amazon 建议 initscripts 不应再存在于/etc/init.d
Amazon Linux 2 使用 systemd 219 init 系统来引导用户空间并管理系统进程。它以 /sbin/init 形式提供,并取代了上一代 Amazon Linux 中提供的 System V 风格的 init 系统。因此,initscripts 不应再存在于 /etc/init.d 中。应使用 systemctl {start|stop|restart} SERVICE_NAME.service 代替它。此外,服务 SERVICE_NAME {start|stop|restart} 与 Amazon Linux AMI 和 Amazon Linux 2 兼容。
我们依靠 initscript 在实例启动时自动启动 Supervisor。systemd 219 init 系统下有可行的替代方案吗?
我正在安装 SSL 证书来为 HTTPS 提供服务。我使用Apache 2.4的Amazon Linux,并获得在证书startssl如果。我的 Vhost 配置如下:
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin webmaster@myweb.com
ServerName myweb.com
DocumentRoot /var/www/html/myapp
<Directory /var/www/htmlmyapp>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/httpd/error_log
LogLevel warn
CustomLog /var/log/httpd/ssl_access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/mycert.crt
SSLCertificateKeyFile /etc/ssl/private/mycert.key
SSLCertificateFile /etc/ssl/certs/sub.class1.server.ca.pem
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>
</IfModule>
Run Code Online (Sandbox Code Playgroud)
当我重新启动 Apache 时,我得到以下输出:
Stopping httpd: [ OK ]
Starting httpd: Apache/2.4.12 …Run Code Online (Sandbox Code Playgroud) amazon-linux ×9
amazon-ec2 ×2
amazon-ami ×1
apache-2.4 ×1
certbot ×1
curl ×1
init.d ×1
kernel ×1
lets-encrypt ×1
linux ×1
linux-kernel ×1
mod-ssl ×1
security ×1
ssl ×1
supervisord ×1