Questions tagged [amazon-linux-2]

The tag has no usage guidance.

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

Apache ( 2.4.58) compiling fails after Openssl upgrade to 3.2.1. on Amazon Linux 2

Apache ( 2.4.58) compiling fails after Openssl upgrade to 3.2.1. on Amazon Linux 2, Could you please help me on this. Error: /var/tmp/httpd-2.4.58/support/ab.c:2319: undefined reference to `...
avilala sudarshan yadav's user avatar
2 votes
1 answer
85 views

What are the differences between the migration options for Elastic Beanstalk Multi-container Docker environments to AL2?

We're running an Elastic Beanstalk Multi-container Docker environment on Amazon Linux 1, which has been deprecated and needs to be migrated to Amazon Linux 2. The documentation presents two options ...
Dario Seidl's user avatar
0 votes
1 answer
150 views

Looking for updated SSG for Amazon Linux 2 and Amazon Linux 2023

Are there any new data stream and xccdf checklist available for Amazon Linux 2 and Amazon Linux 2023? I am able to install the scap-security-guide on an Amazon Linux 2 server, but the data stream xml ...
john le's user avatar
1 vote
1 answer
764 views

yum install mysql-devel causing openssl11-devel conflicts with 1:openssl-devel-1.0.2k-24.amzn2.0.10.x86_64

I am tring to install RMysql Package however it throughs below error - which says mysql libraries are not installed. I tried installing them using the yum command but there is a conflict with openssl....
surpavan's user avatar
  • 169
1 vote
1 answer
1k views

How to Setup Automatic Security Updates on AWS Linux AL2023?

With Amazon Linux 2 I would automatically apply security updates using yum-cron and something like: # turn on automatic security updates set -ex sudo yum update -y sudo yum install yum-cron -y sudo ...
YoungDinosaur's user avatar
0 votes
0 answers
297 views

Terraform - error while configuring s3 backend, with instance profile

First up, we use ADFS and do not have individual IAM user profiles. We use the instance profiles as per the roles/permissions we need, and do not use individual access keys etc., This issue came up ...
mgn's user avatar
  • 1
0 votes
1 answer
230 views

I have a local Amazon Linux 2 (EC2) AMI Instance; How do I repartition the disk and expand the file system?

I have expanded the disk of my VM. How do I now repartition the disk and expand the file system on the guest? Which is Amazon Linux 2 Kernel 4.14.252-195.483.amzn2.x86_64 on an x86_64 $> sudo lsblk ...
chris-j's user avatar
5 votes
5 answers
6k views

How can I get node18 on amazonlinux2?

I'm currently trying to install node18 on a amazoncorretto:11 base image. I'm getting the error #6 11.04 Error: Package: 2:nodejs-18.16.0-1nodesource.x86_64 (nodesource) #6 11.04 Requires: ...
kilseic's user avatar
  • 51
0 votes
0 answers
192 views

How to install Gnumeric/ssconvert no Amazon Linux 2?

I cannot find gnumeric/ssconvert package for Amazon Linux 2 (using yum). I tried to compile the source code with error. Is there any easier way to install it? Compile Error [ec2-user@ip-172-31-6-34 ...
Andre's user avatar
  • 1,351
2 votes
2 answers
4k views

How do I install php-memcached for php 8.x on Amazon Linux 2 aarch64?

I'm migrating our website from an older Centos server to a new EC2 instance (Amazon Linux 2, aarch64). I'd like to install both the LAMP stack and memcached on the EC2 instance stack; which is the ...
Arth's user avatar
  • 395
0 votes
1 answer
128 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 ...
pierre fro's user avatar
0 votes
1 answer
3k 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" ...
Daniel Szalay's user avatar
0 votes
1 answer
2k 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-...
Xander's user avatar
  • 101
2 votes
0 answers
595 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&...
Robert Atkins's user avatar
0 votes
0 answers
44 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 ...
uday kiran reddy's user avatar
0 votes
1 answer
476 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 ...
Appleoddity's user avatar
  • 3,860
3 votes
3 answers
39k 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 ...
rwhirn's user avatar
  • 31
1 vote
1 answer
2k 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 ...
Mervin Hemaraju's user avatar
1 vote
1 answer
1k 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 ...
Shiv's user avatar
  • 119
1 vote
1 answer
4k 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 ...
Tushar Agrawal's user avatar
0 votes
1 answer
341 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 ...
philolegein's user avatar
1 vote
1 answer
743 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 ...
hbquikcomjamesl's user avatar
3 votes
2 answers
2k 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 ...
Kevin Buchs's user avatar
2 votes
1 answer
2k 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. ...
newtothis's user avatar
1 vote
1 answer
2k 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 "...
Jonas's user avatar
  • 1,227
2 votes
1 answer
6k 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 ...
Jonas's user avatar
  • 1,227
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 ...
Am3Y's user avatar
  • 77
-1 votes
1 answer
167 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 ...
iewebguy's user avatar
  • 213
0 votes
1 answer
970 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 ...
Pablo Pantaleon's user avatar
1 vote
1 answer
302 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 ...
philolegein's user avatar
0 votes
1 answer
4k 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.
Biju's user avatar
  • 125
2 votes
1 answer
3k 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] ...
Graham Lea's user avatar
0 votes
1 answer
466 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 ...
vfrans's user avatar
  • 43
0 votes
1 answer
2k 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 ...
Michael's user avatar
  • 101
1 vote
0 answers
194 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 ...
user_af's user avatar
  • 33
1 vote
1 answer
1k 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 ...
philolegein's user avatar
4 votes
1 answer
2k 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 ...
philolegein's user avatar
0 votes
2 answers
3k 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 ...
Rich's user avatar
  • 744
10 votes
1 answer
21k 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?
Richard Downer's user avatar
10 votes
4 answers
4k 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 ...
Michał Paluchowski's user avatar
0 votes
2 answers
763 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:'+...
Reshma's user avatar
  • 1
0 votes
1 answer
576 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 ...
turbonerd's user avatar
1 vote
1 answer
3k 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 ...
Juriy's user avatar
  • 141
1 vote
0 answers
230 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] => ...
Chirag Senjaliya's user avatar
0 votes
0 answers
64 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 ...
asosnovsky's user avatar
1 vote
1 answer
942 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 ...
Dog's user avatar
  • 113
0 votes
1 answer
963 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....
mistytalon's user avatar
1 vote
1 answer
914 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 ...
nodakai's user avatar
  • 311
8 votes
1 answer
2k 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 ...
boozedog's user avatar
1 vote
2 answers
6k 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 ...
Rich's user avatar
  • 744