Questions tagged [amazon-linux-2]
The amazon-linux-2 tag has no usage guidance.
54
questions
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 ...
9
votes
1
answer
19k
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?
8
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 ...
5
votes
5
answers
4k
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: ...
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 ...
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 ...
3
votes
3
answers
33k
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 ...
2
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]
...
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.
...
2
votes
1
answer
5k
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
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 ...
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 ...
1
vote
1
answer
95
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....
1
vote
1
answer
3k
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 ...
1
vote
1
answer
880
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 ...
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 ...
1
vote
1
answer
2k
views
Where are the logs for commands executed as root in AWS Linux 2 AMI?
Can't find them, there's no .bash_history. Also checked at /var/log/audit and /var/log/secure* Maybe they don't even exist or are disabled.
Thanks!
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 ...
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 ...
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 ...
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 "...
1
vote
1
answer
931
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 ...
1
vote
1
answer
781
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 ...
1
vote
1
answer
2k
views
How to set umask for Apache on Amazon Linux 2 AMI
I want to set umask 0002 for Apache httpd so that certain files that it creates will be writable by other users.
The traditional solutions don't seem to work on Amazon Linux 2 AMI.
1
vote
0
answers
475
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&...
1
vote
1
answer
723
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 ...
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 ...
1
vote
1
answer
279
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 ...
1
vote
0
answers
174
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 ...
1
vote
0
answers
224
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] => ...
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 ...
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 ...
0
votes
1
answer
858
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 ...
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.
0
votes
1
answer
421
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 ...
0
votes
1
answer
311
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 ...
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 ...
0
votes
1
answer
245
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 ...
0
votes
0
answers
105
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 ...
0
votes
1
answer
143
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
...
0
votes
0
answers
142
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 ...
0
votes
0
answers
43
views
how to determine specific website from PID?
I'm running a Linux2 webserver on Amazon EC2 which is hosting a number of (mainly wordpress) websites.
Every day at about the same time the server CPU jumps to run at 100% CPU for about an hour.
Using ...
0
votes
0
answers
82
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 ...
0
votes
1
answer
114
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
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"
...
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-...
0
votes
0
answers
38
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
1
answer
410
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 ...
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 ...
0
votes
2
answers
707
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:'+...