Finally, Nosql products are used. We are using mongodb, which is currently popular. Of course it is not just a large stream, but a product that uses geospatial indexes.
This is my configuration process:
1, download the version you need, I use a mongodb-linux-x86_64-2.4.9.tgz
# wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.9.tgz# tar -xvzf mongodb-linux-x86_64-2.4.9.tgz
2. Create the mongodb directory and database directory.
# mv mongodb-linux-x86_64-2.4.9.tgz /opt/mongodb # mkdir -p /opt/mongodb/data
3. Added mongodb users.
# Useradd mongod-s/bin/false # chown-R mongod: mongod/data/mongodb 4. Write the configuration file and create the directory ext under/opt/mongodb:
#mkdir -p ext
Write:
#! /Bin/bash # file name: mongodb. conf # Configuration Options for MongoDB # For More Information, Consider: #-Configuration Parameters: http://www.mongodb.org/display/DOCS/Command+Line+Parameters#-File Based Configuration: http://www.mongodb.org/display/DOCS/File+Based+Configurationdbpath=/opt/mongodb/datalogpath=/opt/mongodb/data/mongodb.loglogappend=true# bind_ip = 127.0.0.1 # port = 27017 fork = tr Ueauth = true # noauth = true5. test: here, we can actually use mongodb, but the process is not started. Test:
#cd /opt/mongodb/bin
Here we can see mongo (this is mongodb shell) and mongod (this is the mongodb process)
6. Start the process:
In the/etc/init. d directory:
#vi mongodb
Write:
#! /Sbin/runscript # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $ Header: $ pai_home =/opt/mongodbdepend () {use net} start () {ebegin "Starting mongodb... "$ {pai_home}/bin/mongod \ -- config $ {MONGO_HOME}/ext/mongodb. conf eend $ ?} Stop () {ebegin "Stoping mongodb..." $ {MONGO_HOME}/bin/mongod \ -- shutdown \ -- config $ {MONGO_HOME}/ext/mongodb. conf eend $ ?} Restart () {start stop} ------------- OK. The configuration is complete.