在bluehost上安裝mongodb

來源:互聯網
上載者:User

This article is a little more up to date with the changes made by Hostmonster / Bluehost, and to make the instructions a little more clear, and simplified.

1. Download the MongoDB binaries – You want to download the legacy-static production release. Hosmonster / Bluehost run Linux 64-bit

Download

I found it easier to extract the files on my desktop then upload them to a directory called mongodb in the root home folder.

Your MongoDB folder should look like the below when all done:
/home/{username}/mongodb
/home/{username}/mongodb/bin
/home/{username}/mongodb/data
/home/{username}/mongodb/include
/home/{username}/mongodb/lib64

Replace {username} with your login name for Hostmonster / Bluehost. You can find your username in the cPanel on the left where it says username.

2. In your SSH/Shell console – Now we need to make the MongoDB command usable so do the following commands

nano .bashrc

3. Now add the following line to the bottom of the file.

export PATH=/home/{username}/mongodb/bin:$PATH

Replace {username} with your login name for Hostmonster / Bluehost. You can find your username in the cPanel on the left where it says username.

4. Save

ctrl+x confirm save by typing ‘Y’ then enter, then enter again to confirm the file.

5. Lets verify that everything is working. You will need to reload bash

source .bashrc

6. Make the MongoDB binaries executable

chmod 744 -R mongodb/bin

7. Verify MongoDB is running

mongod —version

8. Start the MongoDB

screen mongod —dbpath /home/{username}/mongodb/data —quiet

Now safe to exit your Shell Console

Replace {username} with your login name for Hostmonster / Bluehost. You can find your username in the cPanel on the left where it says username.

They only let you run a program for 5 minutes before killing it, so it’s fairly useless to install MongoDB unless you have a dedicated IP.

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.