Skip to content

Instantly share code, notes, and snippets.

@rxnlabs
Last active July 8, 2021 19:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rxnlabs/00d2b1ab8f55847b3c4d to your computer and use it in GitHub Desktop.
Save rxnlabs/00d2b1ab8f55847b3c4d to your computer and use it in GitHub Desktop.
Install MongoDB on cPanel/WHM
http://www.webmaster.net/how-install-mongodb-centos-6x-or-whm-server
http://linuxdiviner.wordpress.com/2012/07/25/compile-and-install-php-module-without-easyapache-on-cpanel-servers/
1. cd /etc/yum.repos.d
2. vi mongodb.repo
3. Add this code to file
[mongodb]
name=MongoDB Repo
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1
4. Save the file (:wq)
5. yum install mongo-10gen mongo-10gen-server
6. Make sure MongoDB starts with server
chkconfig mongod on
7. Start MongoDB
service mongod start
8. Navigate to PHP installation
cd /usr/local/lib/php/extensions
9. Go to either of the non-debug folders
10. pecl install mongo
11. Verify mongo extension is installed by creating new file and add phpinfo() function
12. Hopefully Mongo extension shows as being installed :)
@abelardolg
Copy link

UPDATED: 2021 January, 1st
image
The following lines...

image

@realsamanrad
Copy link

Same problem here:

http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/repodata/repomd.xml: [Errno 14] curl#63 - "Callback aborted"
Trying other mirror.

@JimMcLennan
Copy link

The baseurl is now different. I was able to install using this:

baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.4/x86_64/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment