Install MongoDB 4 on CentOS 7

Create file

Add

Install MongoDB with

Set MongoDB to start on boot.

Start MongoDB