ubuntu redis mongo
11885 ワード
Install Redis 2.8.9
Remove Redis 2.8.9
redisのサービスを開始
root@ubuntu:/usr/local/redis-2.4.14# ./src/redis-serverこの方法でredisを起動するには、デフォルトの構成が使用されていることに注意してください.起動パラメータを使用して、指定したプロファイルを使用して次のコマンドで起動するようにredisに伝えることもできます.$./redis-server redis.conf
redisクライアントとサービス側のインタラクションを開始
naxsu@ubuntu:/usr/local/redis-2.4.14$ ./src/redis-cli redis 127.0.0.1:6379> set foo bar OK redis 127.0.0.1:6379> get foo "bar"redis 127.0.0.1:6379>
redisを閉じる
redis 127.0.0.1:6379> shutdown
クライアントを終了
redis 127.0.0.1:6379> quit
========================================================================
MONGODB
1. Import the MongoDB public key
Ubuntu package manager use this key to check the consistency and authenticity of the packages
1
2
3
4
5
6
$
sudo
apt
-
key
adv
--
keyserver
hkp
:
//keyserver.ubuntu.com:80 --recv 7F0CEB10
Executing
:
gpg
--
ignore
-
time
-
conflict
--
no
-
options
--
no
-
default
-
keyring
--
homedir
/
tmp
/
tmp
.
nG6OPIkakq
--
no
-
auto
-
check
-
trustdb
--
trust
-
model
always
--
keyring
/
etc
/
apt
/
trusted
.
gpg
--
primary
-
keyring
/
etc
/
apt
/
trusted
.
gpg
--
keyring
/
etc
/
apt
/
trusted
.
gpg
.
d
/
gnome
-
terminator
-
ppa
.
gpg
--
keyserver
hkp
:
//keyserver.ubuntu.com:80 --recv 7F0CEB10
gpg
:
solicitando
clave
7F0CEB10
de
hkp
servidor
keyserver
.
ubuntu
.
com
gpg
:
clave
7F0CEB10
:
clave
pú
blica
"Richard Kreuter <[email protected]>"
importada
gpg
:
Cantidad
total
procesada
:
1
gpg
:
importadas
:
1
(
RSA
:
1
)
2. Generate a file with the MongoDB repository url
1
2
$
echo
'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen'
|
sudo
tee
/
etc
/
apt
/
sources
.
list
.
d
/
mongodb
.
list
deb
http
:
//downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
3. Refresh the local database with the packages
1
$
sudo
apt
-
get
update
4. Install the last stable MongoDB version and all the necessary packages on our system
sudo apt-get install mongodb-org=3.0.0 mongodb-org-server=3.0.0 mongodb-org-shell=3.0.0 mongodb-org-mongos=3.0.0 mongodb-org-tools=3.0.0
(a) To restart the mongod service
(b) To start mongod Service
(c) To stop mongod service
(c) To get status of mongod service
変換元:http://www.sysads.co.uk/2014/05/install-redis-2-8-9-ubuntu-14-04-13-10/
http://itway.iteye.com/blog/1555063
http://www.cnblogs.com/SuperLiangG/p/4335657.html
sudo apt-add-repository ppa:chris-lea/redis-server
sudo apt-get update
sudo apt-get install redis-server
Remove Redis 2.8.9
sudo apt-get purge--auto-remove redis-server
redisのサービスを開始
root@ubuntu:/usr/local/redis-2.4.14# ./src/redis-serverこの方法でredisを起動するには、デフォルトの構成が使用されていることに注意してください.起動パラメータを使用して、指定したプロファイルを使用して次のコマンドで起動するようにredisに伝えることもできます.$./redis-server redis.conf
redisクライアントとサービス側のインタラクションを開始
naxsu@ubuntu:/usr/local/redis-2.4.14$ ./src/redis-cli redis 127.0.0.1:6379> set foo bar OK redis 127.0.0.1:6379> get foo "bar"redis 127.0.0.1:6379>
redisを閉じる
redis 127.0.0.1:6379> shutdown
クライアントを終了
redis 127.0.0.1:6379> quit
========================================================================
MONGODB
1. Import the MongoDB public key
Ubuntu package manager use this key to check the consistency and authenticity of the packages
1
2
3
4
5
6
$
sudo
apt
-
key
adv
--
keyserver
hkp
:
//keyserver.ubuntu.com:80 --recv 7F0CEB10
Executing
:
gpg
--
ignore
-
time
-
conflict
--
no
-
options
--
no
-
default
-
keyring
--
homedir
/
tmp
/
tmp
.
nG6OPIkakq
--
no
-
auto
-
check
-
trustdb
--
trust
-
model
always
--
keyring
/
etc
/
apt
/
trusted
.
gpg
--
primary
-
keyring
/
etc
/
apt
/
trusted
.
gpg
--
keyring
/
etc
/
apt
/
trusted
.
gpg
.
d
/
gnome
-
terminator
-
ppa
.
gpg
--
keyserver
hkp
:
//keyserver.ubuntu.com:80 --recv 7F0CEB10
gpg
:
solicitando
clave
7F0CEB10
de
hkp
servidor
keyserver
.
ubuntu
.
com
gpg
:
clave
7F0CEB10
:
clave
pú
blica
"Richard Kreuter <[email protected]>"
importada
gpg
:
Cantidad
total
procesada
:
1
gpg
:
importadas
:
1
(
RSA
:
1
)
2. Generate a file with the MongoDB repository url
1
2
$
echo
'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen'
|
sudo
tee
/
etc
/
apt
/
sources
.
list
.
d
/
mongodb
.
list
deb
http
:
//downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
3. Refresh the local database with the packages
1
$
sudo
apt
-
get
update
4. Install the last stable MongoDB version and all the necessary packages on our system
sudo apt-get install mongodb-org=3.0.0 mongodb-org-server=3.0.0 mongodb-org-shell=3.0.0 mongodb-org-mongos=3.0.0 mongodb-org-tools=3.0.0
(a) To restart the mongod service
sudo service <span style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13.3333330154419px; line-height: 24px;">mongod</span> restart
(b) To start mongod Service
sudo service <span style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13.3333330154419px; line-height: 24px;">mongod</span> start
(c) To stop mongod service
sudo service <span style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13.3333330154419px; line-height: 24px;">mongod</span> stop
(c) To get status of mongod service
sudo service <span style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13.3333330154419px; line-height: 24px;">mongod</span> status
変換元:http://www.sysads.co.uk/2014/05/install-redis-2-8-9-ubuntu-14-04-13-10/
http://itway.iteye.com/blog/1555063
http://www.cnblogs.com/SuperLiangG/p/4335657.html