add mongodb repo in the sources.list:
sudo nano /etc/apt/sources.list
add below:
deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
add mongodb repo key(make sure port 11371 is open):
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
update repo:
sudo apt-get update
install mongodb:
sudo apt-get install mongodb-10gen
check if mongo process is running:
ps aux | grep mongo
to start, stop, restart mongodb:
sudo service mongodb start
sudo service mongodb stop
sudo service mongodb restart
to test mongo by going mongo command prompt:
mongo
at the mongo prompt:
>show dbs;
> db.test.save( { a: 1 } )
> db.test.find()
install php driver for mongodb:
sudo apt-get install php-pear php5-dev
sudo apt-get install make
check mongo php driver:
pecl search mongo
install mongo php driver:
sudo pecl install mongo
add mongo extension in php.ini:
sudo nano /etc/php5/apache2/php.ini
add below:
extension = mongo.so
-----
note: use mongo command to go to the mongo command shell.
-----
note: install phpmoadmin to administer mongodb.
cd /var/www
sudo wget http://phpmoadmin.com/file/phpmoadmin.zip
sudo unzip phpmoadmin.zip
and then browse to http://localhost/moadmin.php in the internet browser.
----
note: add this to php.ini if mongodb is in another server.
[Mongo]
; default host 127.0.0.1
; custom host: the IP address of the database server
mongo.default_host = "xxx.xxx.xxx.xxx"
----
note: if you have problem running mongo then try using below to install:
sudo apt-get install mongodb
sudo nano /etc/apt/sources.list
add below:
deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
add mongodb repo key(make sure port 11371 is open):
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
update repo:
sudo apt-get update
install mongodb:
sudo apt-get install mongodb-10gen
check if mongo process is running:
ps aux | grep mongo
to start, stop, restart mongodb:
sudo service mongodb start
sudo service mongodb stop
sudo service mongodb restart
to test mongo by going mongo command prompt:
mongo
at the mongo prompt:
>show dbs;
> db.test.save( { a: 1 } )
> db.test.find()
install php driver for mongodb:
sudo apt-get install php-pear php5-dev
sudo apt-get install make
check mongo php driver:
pecl search mongo
install mongo php driver:
sudo pecl install mongo
add mongo extension in php.ini:
sudo nano /etc/php5/apache2/php.ini
add below:
extension = mongo.so
-----
note: use mongo command to go to the mongo command shell.
-----
note: install phpmoadmin to administer mongodb.
cd /var/www
sudo wget http://phpmoadmin.com/file/phpmoadmin.zip
sudo unzip phpmoadmin.zip
and then browse to http://localhost/moadmin.php in the internet browser.
----
note: add this to php.ini if mongodb is in another server.
[Mongo]
; default host 127.0.0.1
; custom host: the IP address of the database server
mongo.default_host = "xxx.xxx.xxx.xxx"
----
note: if you have problem running mongo then try using below to install:
sudo apt-get install mongodb
Learn More :
How To
- HOW TO SET UP A SERVER W/RCON
- HOW TO SETUP LRAB AND UNREAL
- How to set up sdless a9lh
- How to set up group calendar, including link to download addon:
- How to install PhantomJS on Ubuntu
- HOW TO INSTALL LIBPD ON RASPBIAN
- How to install VulnReport on Ubuntu
- How to install Audio Recorder in Ubuntu 16.04, 15.10
- HOW TO INSTALL GAMES ON THE VITA
- How to: install LibArtifactData-1.0
- HOW TO PLAY POKEMON GO ON PC WITHOUT GETTING BANNED v1.1
- How to install GRUB Customizer for Ubuntu Backtrack Linux
- How to install Slowloris on Linux
- Installing Tata Docomo 3G Dongle under Ubuntu 10.10
- Installing Kubuntu (Ubuntu) 12.10 in VMWare Player 5
Driver
12.10
Install
- How To Install PHP5, Apache2, MySQL for UBUNTU
- How to install GRUB Customizer for Ubuntu Backtrack Linux
- How to install Slowloris on Linux
- Script to install mailcatcher on Debian/Ubuntu without RVM
- Install gamepanelx master on ubuntu 12.10
- TREE.IO INSTALLATION ON UBUNTU
- Installing Tata Docomo 3G Dongle under Ubuntu 10.10
- Installing Kubuntu (Ubuntu) 12.10 in VMWare Player 5
- How To Install Plex Media Server on Ubuntu
Ubuntu
- Ubuntu 16.04.1 Parallels Tools Install Log
- How to install VulnReport on Ubuntu
- How To Install Docker Ubuntu 14.04
- How to install PhantomJS on Ubuntu
- How to install VulnReport on Ubuntu
- How to run on ubuntu VM
- How to install skeltrack on ubuntu 11.04
- How to install GRUB Customizer for Ubuntu Backtrack Linux
- Script to install mailcatcher on Debian/Ubuntu without RVM
- Ubuntu 12.10 on Lenovo Ideapad S205
- Install gamepanelx master on ubuntu 12.10
- TREE.IO INSTALLATION ON UBUNTU
- Installing Tata Docomo 3G Dongle under Ubuntu 10.10
- Installing Kubuntu (Ubuntu) 12.10 in VMWare Player 5
- How To Install Plex Media Server on Ubuntu
- Kali Tools In Ubuntu Linux (instructions)