How to Install Rocky Linux 8 on the Amazon AWS Ec2 Instance
Rocky Linux 8 is the latest Linux operating system to replace CentOS 8, but with long-term support that has been discontinued by its parent company RedHat. Therefore, if you are an Amazon cloud user and want to get started with Rocky Linux, here are the steps to install it on the AWS Ec2 instance.
- AWS Account
- Internet connection
Installing Rocky Linux 8 on the AWS EC2 Instance
The steps given here are simple, however, you must have an AWS account, without it we will not be able to install anything on this cloud computing service.
1. Log in to AWS and go to the EC2 Dashboard
Here I am assuming you have already created an account on Amazon web services so now go to Ec2 Dashboard. Alternatively, you can use this link. https://ap-south-1.console.aws.amazon.com/ec2/v2/home.
2. Start a new instance
Once you are on the AWS Ec2 Dashboard, click on the Instances option in the given left menu, then press the “Launch instances” button.
3. Choose Rocky Linux 8 Amazon Machine Image
Now select “AWS Marketplace“then in the search field type – Rocky Linux. Soon you will see the official image of the Amazon Rocky Linux 8 machine for you to select.
To note: If you have any problem connecting to the official Rocky Linux AMI, go for the Image “Rocky Linux 8 with the latest updates” offered by procomputers on the same page.
This AMI is also eligible to run on the AWS Free Tier, so just click the “To select” button.
After that, press the “To continue” button.
4. Choose the type of instance Ec2
In this step, we will select the hardware resources that we want to assign to our Rocky Linux instance. You can opt for the free trial for the initial start and scale up the resource later. However, if you want Linux to start providing commercial services, select the resources – CPU, RAM and others as needed. Here we go for the Free Trail.
Once you have made your selection, click on the “Review and launch“.
5. Examine the launch of the Rocky Linux instance
Here we can edit all the present hardware resources we want. Such as those who wish to increase the storage space which is default will be – 10 GB, need to hit the Edit button given in front. However, if you are already happy with the default settings, just click the “To throw” button.
6. Download an existing key pair or create a new one
To remotely connect the created Rocky Linux Ec2 instance via SSH, we need a key pair. So for that use the one that exists or just select “Create a new key pair“then give your key a name, for example here we give” Rocky “. After that click on the”Download the key pair“then the”Launch instances” button.
To note: Save the key pair in a safe place …
7. Connect to the Rocky Linux instance
Open your local system terminal or command prompt and use the following command syntax:
ssh -i "path-to-downloaded-keypair" rocky@server-public-ip-address
To replace path to the downloaded key pair with the path where your real key is located.
Or you can use the SSH client such as MobaXterm. For more details, you can see our article – How to SSH AWS ec2 Linux Instances Remotely
To note: rocky is the default username, not ec2-user or root because the image is not provided by Amazon itself. However, in the future it would be.