Bobcares

Install a software package from the Extras Library on EC2

Are you looking for how to install a software package from the Extras Library on EC2? We will help you!

Here, at Bobcares, we often receive similar AWS queries from our customers as a part of our AWS Support Services.

Today, let’s see the steps followed by our Support Techs to install a software package from the Extras Library on Amazon EC2.

 

Install a software package from the Extras Library on EC2

 
Amazon Linux Extras is a mechanism in Amazon Linux 2 to enable the consumption of new versions of software packages on a stable operating system. For installing a software package from the Extras library, first, we need to install the amazon-linux-extras repository on the instance. Then we need to list the available packages and enable the desired ones. After enabling, then using yum we can install the software packages.

Now, let’s see the steps to install a software package from Amazon Linux Extras in Amazon Linux 2:

1. First, access the EC2 Linux instance via SSH.

2. Then run the which command to verify the amazon-linux-extras package is installed.

$ which amazon-linux-extras
/usr/bin/amazon-linux-extras

We can use yum to install the amazon-linux-extras package if it is not installed already.

$ sudo yum install -y amazon-linux-extras

3.Then we need to list the available software packages.

$ amazon-linux-extras
0 ansible2 available [ =2.4.2 =2.4.6 ]
2 httpd_modules available [ =1.0 ]
3 memcached1.5 available [ =1.5.1 ]
4 nginx1.12 available [ =1.12.2 ]
5 postgresql10 available [ =10 ]
6 redis4.0 available [ =4.0.5 =4.0.10 ]
7 R3.4 available [ =3.4.3 ]
8 rust1 available [ =1.22.1 =1.26.0 =1.26.1 =1.27.2 =1.31.0 ]
9 vim available [ =8.0 ]
10 ruby2.4 available [ =2.4.2 =2.4.4 ]
11 php7.3 available [ =7.3.0 =7.3.4 =7.3.5 =7.3.8 =7.3.11 =7.3.13 =7.3.14 =7.3.16 ]

4. Now we can enable the desired topic.

The output will show the commands needed for installation.

Here, for example, to enable PHP 7.3, we can use the following command.

$ sudo amazon-linux-extras enable php7.3
0 ansible2 available [ =2.4.2 =2.4.6 ]
2 httpd_modules available [ =1.0 ]
3 memcached1.5 available [ =1.5.1 ]
4 nginx1.12 available [ =1.12.2 ]
5 postgresql10 available [ =10 ]
6 redis4.0 available [ =4.0.5 =4.0.10 ]
7 R3.4 available [ =3.4.3 ]
8 rust1 available [ =1.22.1 =1.26.0 =1.26.1 =1.27.2 =1.31.0 ]
9 vim available [ =8.0 ]
10 ruby2.4 available [ =2.4.2 =2.4.4 ]
11 php7.2=latest enabled [ =7.3.0 =7.3.4 =7.3.5 =7.3.8 =7.3.11 =7.3.13 =7.3.14 =7.3.16 ]
_ php7.2 available [ =7.2.22 =7.2.25 =7.2.27 ]

Now you can install:
# yum clean metadata
# yum install php-cli php-pdo php-fpm php-json php-mysqlnd

5. Then we can install the topic using yum.

$ sudo yum clean metadata

$ sudo yum install php-cli php-pdo php-fpm php-json php-mysqlnd

6. Now, use the following commands to verify the installation.

$ yum list installed php-cli php-pdo php-fpm php-json php-mysqlnd
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Installed Packages
php-cli.x86_64 7.2.16-1.amzn2.0.1 @amzn2extra-php7.2
php-fpm.x86_64 7.2.16-1.amzn2.0.1 @amzn2extra-php7.2
php-json.x86_64 7.2.16-1.amzn2.0.1 @amzn2extra-php7.2
php-mysqlnd.x86_64 7.2.16-1.amzn2.0.1 @amzn2extra-php7.2
php-pdo.x86_64 7.2.16-1.amzn2.0.1 @amzn2extra-php7.2

$ which php
/usr/bin/php

7. Also confirm the software version using the following command.

$ php --version
PHP 7.2.16 (cli) (built: Aug 3 2021 15:40:35) ( NTS )
Copyright (c) 1997-2018 The PHP Group

 

[Need help with more AWS queries? We’d be happy to assist]
 

Conclusion

 
To conclude, today we discussed the steps followed by our Support Engineers to help our customers to install a software package from the Amazon Linux Extras library.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";
0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Speed issues driving customers away?
We’ve got your back!

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF