-->

DEVOPSZONES

  • Recent blogs

    How to Install Extras Repository in Amazon Linux 2

    How to Install Extras Repository in Amazon Linux 2

     You must first ensure that the amazon-linux-extras repository is set up on your instance before you can install a software package from the Extras Library. Next, select the desired software package from the list of available packages, enable it, and then use yum to install it.

    Use the which command to confirm that the amazon-linux-extras package is installed:

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

    If the amazon-linux-extras package isn't installed, use yum to install it:

    $ sudo yum install -y amazon-linux-extras

    3.    List the available topics.

    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  postgresql9.6            available    [ =9.6.6  =9.6.8 ]
    6  postgresql10             available    [ =10 ]
    8  redis4.0                 available    [ =4.0.5  =4.0.10 ]
    9  R3.4                     available    [ =3.4.3 ]
    10  rust1                   available    [ =1.22.1  =1.26.0  =1.26.1  =1.27.2  =1.31.0 ]
    11  vim                     available    [ =8.0 ]
    13  ruby2.4                 available    [ =2.4.2  =2.4.4 ]
    15  php7.2                  available    [ =7.2.0  =7.2.4  =7.2.5  =7.2.8  =7.2.11  =7.2.13  =7.2.14 =7.2.16 ]

    4.    Enable the desired topic. The output shows the commands required for installation. For example, to enable the PHP 7.2 topic, use the following command:

    $ sudo amazon-linux-extras enable php7.2

     Install the topic using yum. For example, to install the PHP 7.2 topic, use the following command:

    $ sudo yum clean metadata && sudo yum install php-cli php-pdo php-fpm php-json php-mysqlnd

    6.    Use the following commands to verify the installation and confirm the software version:

    $ yum list installed php-cli php-pdo php-fpm php-json php-mysqlnd
    Loaded plugins: extras_suggestions, langpacks, priorities, update-motd






    No comments