2013年11月13日 星期三

ssh autologin to multi server

situation:
         three server with ip 10.10.10.1, 10.10.10.2, 10.10.10,3

1. install all open ssh package on these servers
# apt-get install ssh

2. create the same user account on these servers
# useradd -d /home/user1 -m user1
# passwd user1

3. on one of these three server , generate the public key
# ssh-keygen -t rsa

4. copy public key to the others
#ssh-copy-id -i user1@10.10.10.2
#ssh-copy-id -i user1@10.10.10.3

5. testing the autologin function
#ssh 10.10.10.2

2013年11月9日 星期六

how to install mongoDB

1. insert into key from url to get mongDB key
#sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

2.modify the apt source.ist
#echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list

3. update the repository
#sudo apt-get update

4. install mongoDB
#sudo apt-get install mongodb-10gen

5.testing the mongoDB
#mongo