This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env python | |
| import redis | |
| import random | |
| import pylibmc | |
| import sys | |
| r = redis.Redis(host = 'localhost', port = 6389) | |
| mc = pylibmc.Client(['localhost:11222']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| To install this init script, you should save mongodb to /etc/init.d/ and mongosharding.conf to /etc/ | |
| then run the following commands as root or with sudo: | |
| chmod 755 /etc/init.d/mongodb | |
| chown root:root /etc/init.d mongodb | |
| update-rc.d mongodb defaults | |
| This installation procedure was tested on UBUNTU 11.10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo "Make data dirs...." | |
| mkdir ~/data | |
| mkdir ~/data/config | |
| mkdir ~/data/db | |
| mkdir ~/data/shard0 | |
| mkdir ~/data/shard0/rs0 | |
| mkdir ~/data/shard0/rs1 | |
| mkdir ~/data/shard0/rs2 |
NewerOlder