Questions tagged [amazon-linux-2]

55 questions
12
votes
1 answer

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?
10
votes
4 answers

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 handled changed. The output from the web process is…
8
votes
1 answer

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 a way to get yum to install a more modern wget…
6
votes
5 answers

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: libc.so.6(GLIBC_2.28)(64bit) #6 11.04 Error:…
kilseic
  • 61
5
votes
2 answers

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 sed -i 's/update_cmd = default/update_cmd =…
YoungDinosaur
  • 155
  • 1
  • 5
4
votes
3 answers

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 Linux 1 appears to be a fork of CentOS, now CentOS…
rwhirn
  • 41
  • 1
  • 1
  • 4
4
votes
1 answer

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 on starting clamd, so I'm trying to figure out…
3
votes
1 answer

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. How can I fix this and install the mysql…
surpavan
  • 189
3
votes
2 answers

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 setup we had on our old server The amzn2extra-php7.4…
Arth
  • 415
3
votes
0 answers

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" and "RPM Fusion Free" repositories. I've tried…
3
votes
2 answers

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 roll my own SFTP server. Please don't recommend I…
3
votes
2 answers

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] logpath = /logs/*error*.log findtime =…
2
votes
1 answer

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 for doing so: Migration to ECS running on Amazon…
2
votes
1 answer

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 mod_security but I cannot get it to work. I am new…
2
votes
1 answer

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. Commands I ran are below: sudo wget…
1
2 3 4