Yes, you can!
While on May 13, 2016 you can't do it... actually, as of today, December 13 2017, the answer is yes, you can install Amazon Linux 2 on your own machines and in his Amazon AMI image!
https://aws.amazon.com/amazon-linux-2/
It is also available as virtual machine images for VMware, Oracle VM VirtualBox, and Microsoft Hyper-V virtualization solutions for on-premises development and testing.
This is from the announcement:
https://aws.amazon.com/about-aws/whats-new/2017/12/introducing-amazon-linux-2/
Virtual machine images and docker images:
- https://cdn.amazonlinux.com/os-images/latest/
- https://hub.docker.com/_/amazonlinux/
Yahoo! From the FAQ you're supposed to generate a config.iso with user-data and meta-data:
- http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-ami-basics.html
- http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-2-virtual-machine.html
... but it looks like this example of a cloud-init is a little more on point at explaining the different ways that you can set up the auth:
https://cdn.amazonlinux.com/os-images/latest/README.cloud-init
As a MacOS user rather than Linux desktop user, I also needed to know that the cdrtools homebrew package provides mkisofs which is apparently near identical to the genisoimage tool that is mentioned throughout the Amazon Linux cloud-init documentation.
mkisofs -output seed.iso -volid cidata -joliet -rock user-data meta-data
It may also help to know that if the seed.iso file generated above is not connected on first boot, it will be ineffectual. (This took me too many login attempts to figure out on my own, and I didn't see it mentioned anywhere in the documentation that I skimmed.)
If you just want an ec2-user account with password set to password, attaching this init.iso file on first boot will do that.
d3fbbe38530f6c49964e6829e86d1133b4dfe2b7 /Users/kingdonb/Downloads/init.iso
The contents of that file are in this gist, for posterity in case the init.iso link becomes bad.
Hope this helps!
Answer from Kingdon on Stack ExchangeAmazon Linux 2023 on-premise
How to install a newer version on Amazon Linux 2?
docker - How to install standard system commands for amazon-linux 2 - Stack Overflow
How to install newer version of R on Amazon Linux 2 - Stack Overflow
Enhanced developer productivity
Amazon Linux 2 is offered as a virtual machine and container image for on-premises development and testing. Developers can speed up their application development by building, testing, and integrating on the same Linux distribution that is used in their production environment.
Optimized performance
Amazon Linux 2 includes support for the latest Amazon Elastic Compute Cloud (Amazon EC2) instance capabilities and is tuned for enhanced performance. It includes packages that help ease integration with other AWS services.
Peace of mind with long-term support
Amazon Linux 2 offers long-term support. Developers, IT administrators, and ISVs get the predictability and stability of a long-term support (LTS) release, but without compromising access to the latest versions of popular software packages.
Videos
Yes, you can!
While on May 13, 2016 you can't do it... actually, as of today, December 13 2017, the answer is yes, you can install Amazon Linux 2 on your own machines and in his Amazon AMI image!
https://aws.amazon.com/amazon-linux-2/
It is also available as virtual machine images for VMware, Oracle VM VirtualBox, and Microsoft Hyper-V virtualization solutions for on-premises development and testing.
This is from the announcement:
https://aws.amazon.com/about-aws/whats-new/2017/12/introducing-amazon-linux-2/
Virtual machine images and docker images:
- https://cdn.amazonlinux.com/os-images/latest/
- https://hub.docker.com/_/amazonlinux/
Yahoo! From the FAQ you're supposed to generate a config.iso with user-data and meta-data:
- http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-ami-basics.html
- http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-2-virtual-machine.html
... but it looks like this example of a cloud-init is a little more on point at explaining the different ways that you can set up the auth:
https://cdn.amazonlinux.com/os-images/latest/README.cloud-init
As a MacOS user rather than Linux desktop user, I also needed to know that the cdrtools homebrew package provides mkisofs which is apparently near identical to the genisoimage tool that is mentioned throughout the Amazon Linux cloud-init documentation.
mkisofs -output seed.iso -volid cidata -joliet -rock user-data meta-data
It may also help to know that if the seed.iso file generated above is not connected on first boot, it will be ineffectual. (This took me too many login attempts to figure out on my own, and I didn't see it mentioned anywhere in the documentation that I skimmed.)
If you just want an ec2-user account with password set to password, attaching this init.iso file on first boot will do that.
d3fbbe38530f6c49964e6829e86d1133b4dfe2b7 /Users/kingdonb/Downloads/init.iso
The contents of that file are in this gist, for posterity in case the init.iso link becomes bad.
Hope this helps!
EDIT late in 2017 AWS released Amazon Linux 2, which can be installed on a local machine.
ORIGINAL ANSWER, for Amazon Linux v1 I believe the answer is no, and that the closest OS would be CentOS, which is not close enough to avoid your "millions of tweaks" problem.
Amazon says "The Amazon Linux AMI is only available for use inside of Amazon EC2." (http://aws.amazon.com/amazon-linux-ami/faqs/). You can only export an AMI which you created by import (https://aws.amazon.com/ec2/vm-import/). And the list of images you can import/export does not include Amazon Linux (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/VMImportPrerequisites.html#vmimport-operating-systems).
CentOS is probably the closest OS (Amazon Linux was based on RedHat/CentOS many years ago), but Amazon Linux has diverged a long way, is updated more often and includes a set of tools and repositories you can't easily include in your system build. I haven't found a way of duplicating Amazon Linux and keeping it up to date.
OPINION: By providing a free, very up-to-date OS complete with all AWS tools, Amazon has made it pretty compelling to use their OS over any others. But it's not open source, it locks you into their platform much more than any other linux, and you'll probably end up paying Amazon for lots of dev environments which you otherwise would not have chosen to use. Good commercial decision for them, but if you choose another more open distribution you have a more portable platform and less errors between dev and production.
Hi, I am new to postgresql and also new to devops.
I am currently using Amazon Linux 2, I know it's old but I am currently stuck with this. And now I need to install postgresql, the built-in version with amazon-linux-extra is 14, it might just work, but since I am on this topic, I am trying to install a newer version of postgresql, it does not have to be the latest, anything that is newer than 14 will do.
After some hours with google and chatgpt, I feel like I am really not good at this.
Basically I tried first with official install guide from https://www.postgresql.org/download/linux/redhat/, I selected Redhat 7 as I believe this is the os that amazon linux 2 is based on?
sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
Got error: Requires /etc/redhat-release
Chatgpt proposes to add yum repo:
sudo tee /etc/yum.repos.d/pgdg.repo <<EOF [pgdg17] name=PostgreSQL 17 for RHEL/CentOS 7 - x86_64 baseurl=https://download.postgresql.org/pub/repos/yum/17/redhat/rhel-7-x86_64/ enabled=1 gpgcheck=0 EOF
then sudo yum install -y postgresql17 postgresql17-server
Got error https://download.postgresql.org/pub/repos/yum/17/redhat/rhel-7-x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
And I am trying to avoid to build from source as when I look at the build commands and build options, I feel complete overwhelmed.
Any suggestion is appreciated!
Use amazon-linux-extras which installs R4.0.2:
amazon-linux-extras install R4
You may need root:
sudo amazon-linux-extras install R4
I've tried setting up R 3.6.x on a docker container that uses the amazonlinux image. My approach was to get the R source file from the below link and install from source
cd /tmp/
wget https://cloud.r-project.org/src/base/R-3/R-3.6.3.tar.gz
tar -zxf R-3.6.3.tar.gz
cd /tmp/R-3.6.3
./configure --without-libtiff --without-lapack --without-ICU --disable-R-profiling --disable-nls
make
make install
you will need to yum install some dependencies, like 'make', which doesn't seem to come with aws amazonlinux docker image (which i think mirrors the EC2 instance AMI image you are referring to).
The above kind of worked for me in that i had a working R3.6 installation, but it didnt allow me use it with rshiny server, so i'm reverting to the shipped 3.4.3 version.
tl;dr: you'll probably have to manually download the source files and install the desired R version from source, and throw in some build dependencies as well.
I want to do some local testing for an amazon linux workspace.
Is it possible to get the image of this workspace, download it, and run it in virtualbox? Or do I have to access it through actual workspaces?