Step-by-step installation of MongoDB on your VPS with CentOS 7
Recent success of NoSql databases (we have already mentioned them in our previous post on Big Data and Database NoSQL), so lets look more closely to this fresh database solution.
What is MongoDB?
MongoDB is the leading NoSQL database, widely used all over the world thanks to its simplicity, potential and integrity with the most popular languages like PHP, Ruby, etc. MongoDB is the member of Document Based Databases family, easy to install and use while multiple characteristics and specs are really interesting also when it is installed on a single node (in case of VPS server).
Here are the instructions to install MongoDB on VPS with CentOS 7. The process has been successfully tested on our VPS server so lets go ahead.
Step 1 : Adding Repository
vi /etc/yum.repos.d/mongodb.repo
Opening new file add the following lines and press [ i ] (insert):
[mongodb] name=MongoDB Repository baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/ gpgcheck=0 enabled=1
To save changes press in sequence [esc] [ : ] [ w ] [ q ]
Step 2 : Installing MongoDB
Update the packages:
yum -y update
Wait until update is completed
Initiate package installation with the following command:
yum -y install mongodb-org mongodb-org-server
Step 3 : Starting MongoDB
Adjust your server because it it launches automatically on boot:
systemctl enable mongod
Start MongoDB :
systemctl start mongod
Verify if MongoDB is active:
systemctl status mongod
You can activate MongoDB command line:
mongo
This is it!
To start using the program you can find a lot of quick and smart guides in the web “The Little MongoDB Book“.
The potential of such tool get an extended capabilities when installed on multiple nodes such as shard or replica. That is also the reason to considerate dedicated servers as an appropriate instrument compatible with complex architecture that provides necessary performance to release MongoDB’s potential on the enterprise level capable to deal with Big Data.
These are the first steps to proceed with MongoDB capabilities.
Have a good installation.