Install MongoDB on openSUSE Tumbleweed

Bismillah.

Last week I reinstalled my computer to be openSUSE Tumbleweed. And here I want to share my experience installing MongoDB on this operating system.

We can visit here directly. Then we can choose our operating system. Because I am using openSUSE so I choose openSUSE instead of SLE (SUSE Linux Enterprise).

screenshot_20170216_215731

There are 3 options to install. First is the easiest method which using One Click Install. We can click the button based on openSUSE we using. Then we will download the mongodb.yml file, so we can open it using YaST 1-Click Install.

screenshot_20170216_221035

The second is Add repository and install it manually. I choose this option. Please run the following as root:

zypper addrepo http://download.opensuse.org/repositories/server:database/openSUSE_Tumbleweed/server:database.repo
zypper refresh
zypper install mongodb

screenshot_20170216_220118

screenshot_20170216_223431

The third option is download the binary package and install it manually. Run the following as root after we download the file:

zypper in [file_name]

After installing some application. Do not forget to check the manual page to read the documentation.

man mongo

screenshot_20170216_223540

man mongod

screenshot_20170216_225632
To start MongoDB server we can use this following command:

mongod

 

But I got failed message. It is said that because the directory /data/db is not found, so I run this following command to create the directory.

mkdir -p /data/db

screenshot_20170216_225758

Then I run the mongod command again. It is running successfully. After that, we can use MongoDB shell to run many operations. So yeah, MongoDB is ready to use. 🙂

mongo

screenshot_20170216_225949

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Powered by WordPress.com.

Up ↑

%d bloggers like this: