Install MongoDB
Configure Package Management System (APT)
The Ubuntu package management tool (i.e. dpkg and apt) ensure package consistency and authenticity by requiring that distributors sign packages with GPG keys. Issue the following command
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
Create a /etc/apt/sources.list.d/mongodb.list file using the following command
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
Now issue the following command to reload your repository:
sudo apt-get update
Install Packages
Issue the following command to install the latest stable version of MongoDB:
sudo apt-get install mongodb-10gen
Install MongoDB PHP Driver to Lampp
Note that if you install XAMPP using the new .run installer file (versions newer than 1.8.3) then you will get the option during setup to install the development files as well as the core files. Remember to select both.
1 Please download lattest xampp for ubuntu and install with following command:
cd Download ( where xampp download location)
sudo chmod +x xampp-linux-1.8.3-4-installer.run
sudo ./xampp-linux-1.8.3-4-installer.run
2. Run the pecl installer
1
|
sudo /opt/lampp/bin/pecl install mongo
Note : If You getting below error : “ ERROR: `phpize' failed”
sudo apt-get install php5-dev
Now again run this command :
sudo /opt/lampp/bin/pecl install mongo
Note : again any error same like
the error message you got:
configure: error: sasl.h not found!
should be solveable by:
sudo apt-get install libsasl2-dev
3. Finally add the following to the php.ini file (located in /opt/lampp/etc folder)
4. restart xampp server
That’s it!
|
No comments:
Post a Comment