How To Install nodejs-ms on CentOS 7

In this tutorial we learn how to install nodejs-ms on CentOS 7. nodejs-ms is Tiny milliseconds conversion utility for Node.js

Introduction

In this tutorial we learn how to install nodejs-ms on CentOS 7.

What is nodejs-ms

This module is a tiny milliseconds conversion utility for Node.js. It does the following - If a number is supplied to ms, a string with a unit is returned. - If a string that contains the number is supplied, it returns it as a number (e.g - If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned.

We can use yum or dnf to install nodejs-ms on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install nodejs-ms.

Install nodejs-ms on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install nodejs-ms using yum by running the following command:

sudo yum -y install nodejs-ms

Install nodejs-ms on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install nodejs-ms using dnf by running the following command:

sudo dnf -y install nodejs-ms

How To Uninstall nodejs-ms on CentOS 7

To uninstall only the nodejs-ms package we can use the following command:

sudo dnf remove nodejs-ms

References

Summary

In this tutorial we learn how to install nodejs-ms on CentOS 7 using yum and dnf.