Installing applications and development tools via AppStream – Revisiting Modules and AppStreams
Installing applications and development tools via AppStream
From the previous recipe, we’re familiar with how to search for and list applications in AppStreams; let’s now dive into installing applications and development tools via AppStream.
How to do it…
Building from the last recipe, in which we examined nodejs, let’s go ahead and install it. There’s more than one way to do this. You can enable the module and then use the standard dnf install [package(s)] command to install the packages:
#dnf module enable nodejs
#dnf install nodejs npm
You can also use the standard dnf commands without specifying modules and the default module will get enabled as part of the transaction:
dnf install nodejs npm
Or, the preferred way is to tap directly into the new set of dnf module commands and simply run dnf module install [module name(s)]:
#dnf module install nodejs
The output is shown in the following screenshot:

Figure 10.6 – Output of dnf module install nodejs
What you get is the latest in the default AppStream (if nothing is enabled), but if for some reason you wanted an older version in the stream, you can select that by appending a colon and the version to the end of the command. For example, if I didn’t want the latest and, instead, wanted the version before it, I would type the following:
#dnf module install nodejs:10:8030020210118191659
The output is shown in the following screenshot:

Figure 10.7 – Output of dnf module install nodejs:10:8030020210118191659
This would instruct DNF to install the releases of Node.js (and related artifacts) that correlate to the version specified.
Another thing to notice is that, by default, only the common profile will be installed. We can specify a different profile (for example, the development profile), by appending a forward slash and a profile name:
#dnf module install nodejs:10/development
The output is shown in the following screenshot:

Figure 10.8 – Output of dnf module install nodejs:10/development
You can even specify more than one profile, like so:
#dnf module install nodejs:10/development nodejs:10/s2i
The output is shown in the following screenshot:

Figure 10.9 – Output of dnf module install nodejs:10/development nodejs:10/s2i
Or, if you wish to install all the profiles, simply use an asterisk to indicate a wildcard selection:
#dnf module install nodejs:10/*
The output is shown in the following screenshot:

Figure 10.10 – Output of dnf module install nodejs:10/*