After you add software repositories, you can use the package management tools that are provided by Linux to install software packages based on your business requirements. This topic describes how to install software packages on different Linux distributions.
Prerequisites
Before you can install software packages on Linux instances, make sure that the following requirements are met:
Software repositories that contain the software packages are added to the Linux instances.
You know the names of the software packages.
Procedure
In the following examples, the Apache HTTP Server (httpd) package that is contained in the Alibaba Cloud software repository is used.
Install a software package on CentOS
Connect to a CentOS instance.
For more information, see Connect to a Linux instance by using a password or key.
Run the following command to install the Apache HTTP Server package:
yum install httpd
NoteTo install another software package, replace
httpd
in the preceding command with the name of the software package.
Install a software package on Debian or Ubuntu
Connect to a Debian or Ubuntu instance.
For more information, see Connect to a Linux instance by using a password or key.
Run the following commands in sequence to install the Apache HTTP Server package:
apt-get update apt-get install apache2
NoteTo install another software package, replace
apache2
in the preceding command with the name of the software package.
Install a software package on openSUSE
Connect to an openSUSE instance.
For more information, see Connect to a Linux instance by using a password or key.
Run the following command to install the Apache HTTP Server package:
zypper install apache2
NoteTo install another software package, replace
apache2
in the preceding command with the name of the software package.
What to do next
After you install a software package, you may need to update the software. For information about how to update software, see Update software.