How To Install nodejs-node-static on CentOS 7

In this tutorial we learn how to install nodejs-node-static on CentOS 7. nodejs-node-static is Simple, compliant file streaming module for node

Introduction

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

What is nodejs-node-static

node-static is a simple, “rfc 2616 compliant” file streaming module for node. node-static has an in-memory file cache, making it highly efficient. node-static understands and supports “conditional GET” and “HEAD” requests. node-static was inspired by some of the other static-file serving modules out there, such as node-paperboy and antinode.

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

Install nodejs-node-static 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-node-static using yum by running the following command:

sudo yum -y install nodejs-node-static

Install nodejs-node-static 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-node-static using dnf by running the following command:

sudo dnf -y install nodejs-node-static

How To Uninstall nodejs-node-static on CentOS 7

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

sudo dnf remove nodejs-node-static

References

Summary

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