Questions tagged [amazon-linux-2]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

Amazon Linux 2 not showing page

I have this Amazon Linux2 box and when I installed a certificate for SSL it will always show the apache TestPage.. instead of the contents of /var/www/html/site1 or site2 folders. With http it works. ...
0 votes
1 answer
35 views

Amazon Linux 2 SSL setup with Godaddy subdomain Certificate

I have two sites site1.mydomain.com and site2.mydomain.com on a Amazon Linux 2 instance. I used a Loadbalancer and a godaddy certifcate with subdomains site1 and site2 but for cost reasons wanted to ...
0 votes
0 answers
10 views

How do I keep NGINX directory ownership after installation on Amazon 2 EC2

I have NGINX server set up as proxy to a rails application. In the main config file /etc/nginx/nginx.conf I've set user to be ec2-user, which is the default user for this instance. Since NGINX server ...
  • 113
0 votes
0 answers
17 views

Rsyslog logs not getting forwarded

rsyslog audit logs are not getting forwarded from Amazon Linux 2 (koji linux) what are the known rsyslog issues related to this amazon linux 2 system? Also, what is the significance of below two line #...
  • 1
0 votes
0 answers
61 views

ImageMagick With HEIC Extension Issue in Amazon Linux 2

I need to integrate HEIC extension in ImageMagick. I am using Amazon Linux 2 server. I have tried to install ImageMagick as mentioned in their documentation: https://imagemagick.org/script/install-...
0 votes
1 answer
534 views

Installing podman on Amazon Linux 2

I am trying to install podman on an Amazon Linux 2 instance cat /etc/os-release NAME="Amazon Linux" VERSION="2" ID="amzn" ID_LIKE="centos rhel fedora" ...
0 votes
0 answers
54 views

Debugging reads and writes of an NFS (Amazon EFS)

I have a Kirby CMS website (PHP server behind nginx reverse proxy) running in Amazon EFS. The most recent update of the site lead to 502 Bad Gateway and 504 Gateway Timeout errors. Looking at the ...
  • 103
0 votes
1 answer
515 views

How to install mcrypt for PHP 7.4 on Aws Linux 2?

I'm trying to install mcrypt with yum install php-mcrypt but run into this dependency error: Error: Package: php-mcrypt-5.4.16-9.el7.x86_64 (epel) Requires: php(api) = 20100412-64 installed: php-...
  • 101
0 votes
0 answers
112 views

How do I install third party packages from non-default repositories in Amazon Linux?

My ultimate goal is to create a Docker image with a particular binary installed (loudgain) that I can run functions on. As above, pkgs.org claims the binary is available from both "fedora-updates&...
0 votes
0 answers
20 views

How to connect two adapters to aws linux 2 with virtulabox?

I followed this video link and able to use amazon linux 2 with virtualbox. But this video shows only one network adapter(bridged). I connected two network adapters(NAT and Host-Only) but only the ...
0 votes
0 answers
61 views

SELinux denied issue - iptables_t plymouthd_t:unix_stream_socket connectto

We have Amazon Linux 2 with Selinux enabled on it from audit.log file, we have the following denied: type=AVC msg=audit(1645462240.556:179): avc: denied { connectto } for pid=7329 comm="...
0 votes
1 answer
220 views

Why doesn't the Fedora EPEL repo have Nginx v1.20.2?

I have some Amazon Linux 2 EC2 instances. I've installed the Amazon Linux 2 EPEL topic and the EPEL repo: amazon-linux-extras install epel I've installed the latest available version of nginx: yum ...
  • 3,348
3 votes
2 answers
10k views

systemctl restart httpd Failed to start The Apache HTTP Server httpd pid already running

Forgive the cross post from Stack Overflow but I realized this was probably the better location to ask. I recently rebuilt my server on AWS, upgrading from Amazon Linux to Amazon Linux 2, which like ...
  • 31
1 vote
1 answer
856 views

Environment Variable Empty in Bash Script

I have an EC2 instance that I am deploying on AWS. I am using an Amazon Linux 2, and I am passing a user data to it as such: userdata_file.write( f''' #!/bin/bash\n export ...
0 votes
0 answers
99 views

amazon cloudwatch agent fails to start

An error I am getting is Failed to execute operation: The name org.freedesktop.PolicyKit1 was not provided by any .service files This error suddenly appeared after I rebuilt my environment. I am ...
1 vote
1 answer
558 views

How to install Erlang 24.1 on Amazon Linux 2

I need to install Erlang 24.1 on Aamazon Linux 2. I am using package cloud script and repos for this but it fails with following message. (venv) [CORP\shiv.d@a-1njrk968l4brs yum.repos.d]$ sudo yum ...
  • 119
0 votes
1 answer
2k views

Apache 2.4: How to log POST data?

I have my LAMP application hosted on AWS EC2 Linux 2 instance. I can see requests logs in /var/log/httpd/access_log but there is no POST data there. I could figure out that I can use mod_dumpio or ...
0 votes
1 answer
246 views

How to diagnose/fix CloudFormation/autoscaling SSL errors on file download

I have an autoscaling group that was created by AWS CloudFormation. It runs on Amazon Linux 2. Last week, it was working fine. Now, new instances throw a "certificate has expired" error when ...
1 vote
1 answer
591 views

How do I migrate our existing Beanstalk application to Amazon Linux 2?

Our three Beanstalks are currently running on the "Tomcat 8.5 with Java 8 running on 64bit Amazon Linux" platform, either on the canned "ami-0e469f970b0c3b65c" AMI, or (for one of ...
3 votes
2 answers
1k views

Setting up sftp on Amazon Linux 2 with ssh keys, user segregation (sftp vs ssh), different ports, and user directory constraints

TDLR: I have a Catch 22 where, depending on permissions on the user's home directory, I can get the SSH authentication to work, or the user directory constraints, but not both. BTW, I really want to ...
2 votes
1 answer
1k views

Cannot start mysql-server on Amazon Linux 2 due to dependency issues

I'm trying to install MySQL on a Amazon Linux 2 server and I can't seem to get past this dependency issue (prevents server pkgs etc being installed thus preventing me from starting a mysql-server. ...
1 vote
1 answer
840 views

How to start etcd in docker from systemd?

I want to start etcd (single node) in docker from systemd, but something seems to go wrong - it gets terminated about 30 seconds after start. It looks like the service starts in status "...
  • 1,147
2 votes
1 answer
2k views

How to start containerd as a service after yum install?

I installed containerd on Amazon Linux 2 using the suggested commands: sudo amazon-linux-extras enable docker sudo yum install -y containerd I added this in the EC2 user data script to run at ...
  • 1,147
1 vote
0 answers
39 views

Cron Help in Amazon Linux 2 EC2 [duplicate]

It's like not only Amazon Linux 2 I could not setup cron. I type crontab -e then @reboot bash /home/ec2-user/abcd.sh After Rebooting the EC2, this cron job doesn't work. The same used to work in my ...
  • 67
-1 votes
1 answer
108 views

Why are some of my Secondary IPs missing after a YUM update on Amazon Liunx 2

On Sunday, I did a Yum Update on my Amazon Linux 2 instance (a T2.Medium) and after the update only 2 IP addresses per interface were working. Before the update I had 6 IPs per interface. It looks ...
  • 213
0 votes
1 answer
509 views

Amazon Linux 2 - EC2 PostgreSQL

I've the following: Amazon Linux 2 Postgres 12 installed a user created I'm using ssh to connect to my instance. The issue is that it doesn't let me to connect to my postgres database. I've created ...
1 vote
0 answers
180 views

How to disable SoughtRules in SpamAssassin

I'm running SpamAssassin 3.4 via Amavisd 2.12, installed with yum from EPEL on Amazon Linux 2. According to the SpamAssassin Confluence wiki (here and here), SoughtRules should be disabled, but ... I ...
0 votes
0 answers
2k views

How to upgrade from Python 2 to python 3 on Amazon Linux 2?

I created a new AL2 EC2. I see Python 2 is already installed. How can I upgrade this to Python 3 WITHOUT using virtualenv? I would like to maintain ONLY ONE version of Python.
  • 125
0 votes
1 answer
2k views

Fail2Ban iptables entries to reject HTTPS not stopping requests to Docker container on Amazon Linux 2

I've set up Fail2Ban on Amazon Linux 2, enabling the built-in nginx-http-auth jail with this override config: [nginx-http-auth] enabled = true action = iptables[name=HTTPS, port=https, protocol=tcp] ...
0 votes
1 answer
254 views

Using EC2 imagebuilder to populate authorized_keys from s3 does not work

I'm struggling to setup imagebuilder to populate authorized_keys file from S3 file on a Amazon Linux 2 instance. IAM role is functionnal and pipeline runs fine (no error, nor output) Here is the ...
  • 43
0 votes
1 answer
837 views

Trying to send mail through mailx and postfix, but receiving nothing in inbox

I'm trying to set up a type of notification system that will alert me when my website is down using crontab and mailx. I went ahead and installed mailx on my server and then tried to send a simple ...
  • 101
0 votes
0 answers
96 views

(AWS) ALB with ec2 instances Amazon Linux and Nginx

I want to use Nginx in Amazon Linux intances. If I use a single instance with a public IP granted by Amazon, the configuration works. Then when I add an ALB and later add the target group the app ...
  • 23
1 vote
1 answer
595 views

How to speed up clamd@amavisd launch / get it to "start" on Amazon Linux 2

I recently upgraded clamav from I'm not sure which version, but whatever was current on EPEL on February 13th, to 0.102.3. Under the previous version, I had to set TimeoutStartSec in the systemd conf ...
3 votes
1 answer
936 views

How are systemd/system overrides supposed to work?

I'm messing around with some timeout settings, and am trying to figure out the correct way to set things for systemd/system daemons. Specifically, this is an underpowered server, and I keep timing out ...
0 votes
2 answers
2k views

how to install certbot on Amazon Linux 2

I have an EC2 VM running Amazon Linux release 2 (Karoo) How can I get certbot? It comes with the awscli tools installed, which seem to be incompatible with the certbot in epel: $ sudo bash # yum ...
  • 634
8 votes
1 answer
12k views

Save iptables firewall rules on Amazon Linux 2

I'm running Amazon Linux 2, on EC2 instances in AWS. I want to be able to add my own iptables rules, and have them survive reboots. What is the correct way (or a correct way) to do this?
9 votes
4 answers
3k views

Outputting JSON logs on Elastic Beanstalk with Amazon Linux 2

We're trying to migrate our Java applications from from the current Elastic Beanstalk JDK 8 platforms to the new ones running Corretto 11 on Amazon Linux 2. The app works well, but the way logs are ...
0 votes
2 answers
529 views

Open SSL throwing unknown option '-n' in Amazon Linux2 instance

My code throws error when it reaches this line: {% set encrypted_password = salt['cmd.run']('openssl enc -aes-128-cbc -a -salt -md md5 -in <(echo -n "' + ssm_plaintext_password +'") -pass pass:'+...
  • 1
0 votes
1 answer
424 views

Unable to access console or SSH on Amazon Linux 2 KVM image

I am trying to create a KVM guest instance running Amazon Linux 2 in an on-premises environment, on a CentOS 7 host. I am doing this over SSH (e.g. my local machine -> SSH to the CentOS host). I know ...
1 vote
1 answer
2k views

firewalld on EC2 Amazon Linux 2 - no icmptypes found

On freshly-booted Amazon EC2 instance (Amazon Linux 2), the firewalld could not be started. Executing systemctl start firewalld gives several warnings and errors (details below), boiling down to: no ...
  • 140
1 vote
0 answers
178 views

How to enable jpeg suppot for php GD in aws linux 2?

I am using php7.4 also installed php-gd using yum install php-gd and also restart my httpd service and also reboot my server. installed libjpeg but still getting Array ( [GD Version] => ...
0 votes
0 answers
42 views

Locked of Server, how to run sudo passwordless

Here is the issue Created a new server with Amazon Linux 2 Removed ssh-key from default root user (ec2-user) Created two new accounts with sudo access without a password Now I got locked out of the ...
1 vote
1 answer
628 views

Mail sent from AWS going to spam

I'm running a number of wordpress sites on an AWS EC2 instance. One of the sites is using WooCommerce for an online shop. when an order is made a confirmation email is sent out but these mails all ...
  • 113
0 votes
1 answer
876 views

Amazon Linux 2 OpenSSL Wrong Singature Type

I'm coding a discord bot in python. Whenever I try to connect to a specific site, on my EC2 instance running Amazon Linux 2, the script returns the following error: discord.ext.commands.errors....
1 vote
1 answer
475 views

CentOS: detailed history of patch updates

e.g. http://mirror.centos.org/centos/7/os/x86_64/Packages/ ... chrony-3.2-2.el7.x86_64.rpm Any ways to know what made the -2 part in 3.2-2? I.e. deltas between 3.2 and 3.2-2. That's no-brainer ...
  • 291
7 votes
1 answer
1k views

Why does Amazon Linux 2 have older version of wget vs. Amazon Linux 1?

We noticed that wget on Amazon Linux 2 is v1.14, but on the older version of Amazon Linux, it was v1.18. Any idea why this would be? I'm fairly certain we installed from yum in both cases. Is there ...
1 vote
2 answers
5k views

How to install nginx mod lua on Amazon Linux 2?

I have an Amazon Linux 2 machine. I have installed NGINX with amazon-linux-extras install nginx1.12 How can I install nginx-mod-http-lua? I have tried: yum search lua and no packages are listed ...
  • 634
1 vote
2 answers
2k views

Can't install Mysql on Linux -- Mysql website failing?

I'm attempting to install mysql on Amazon Linux 2. I followed the instructions in the first answer here: amazon linux 2 ami - aws - How to install mysql in Amazon Linux 2? When I type: sudo yum ...
  • 243
1 vote
2 answers
3k views

How to install PostgreSQL 9.6 and plperl on Amazon Linux 2?

With the official repositories, the RHEL6 packages get installed which happen to work on Amazon Linux 2 (RHEL7 clone). You might run into a dependency hell if you want to install the plperl extension ...
  • 91
0 votes
1 answer
3k views

Putting Tomcat on Port 80 on Amazon Linux 2 (iptables?)

I'm configuring a new EC2 instance, which will be running Tomcat, and I want it accessible on Port 80. Within Amazon Linux 1, the primary strategy I saw people using was to use iptables to do port ...