Top Banner
Institut Mines-Télécom Installation Outils NoSQL Raja CHIKY [email protected] 2016-2017
22

Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Sep 16, 2018

Download

Documents

lekien
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

Installation Outils NoSQL Raja CHIKY [email protected] 2016-2017

Page 2: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

Plan

§  Clé-Valeur: Redis §  Orienté Colonne: Cassandra §  Orienté document: MongoDB §  Graphes: Neo4J

Page 3: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

Remarque

§  La majorité de ces bases de données nécessitent JAVA 7 ou au delà

§  Vérifiez que vous avez Java en allant sur un terminal (Linux/mac) ou invite de commandes (Windows)

>java -version §  Si vous ne disposez pas de Java, installer la

dernière version du JDK http://www.oracle.com/technetwork/java/javase/downloads/index.html

Page 4: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

REDIS

Page 5: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

Installation Redis pour Linux/Mac

>wget http://download.redis.io/redis-stable.tar.gz >tar xvzf redis-stable.tar.gz >cd redis-stable >make

>redis-server >redis-cli redis 127.0.0.1:6379 > ping

PONG >redis 127.0.0.1:6379> set mykey somevalue

OK >redis 127.0.0.1:6379> get mykey

"somevalue"

http://try.redis.io/

Page 6: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

Installation redis pour Windows

§  D’après le site de Redis.io : http://redis.io/download

« Windows The Redis project does not officially support Windows. » §  On peut tout de même l’installer sur Windows 64-

bit §  Aller à

https://github.com/MSOpenTech/redis/releases §  Télécharger la dernière version :

Redis-x64-2.8.2400.zip §  Extraire l’archive

Page 7: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

Suite (Windows)

§  Lancer l’application ‘redis-server’ sur l’invite de commande

Page 8: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

Suite (Windows)

§  Lancer l’application ‘redis-cli’ dans une autre fenête d’invite de commande

§  Pour confirmer que tout fonctionne, ecrire la commande

>ping PONG

Page 9: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

CASSANDRA

Page 10: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

Cassandra : Installation (Linux/Mac)

§  Télécharger la dernière version à partir de http://cassandra.apache.org/download/

§  Décompresser (xxx étant le numéro de version)

•  tar zxvf apache-cassandra-xxx-bin.tar.gz

§  Configuration : 1 seul fichier de configuration. Vérifier que vous avez bien les répertoires

•  Conf/cassandra.yaml

# directories where Cassandra should store data on disk.

data_file_directories: /var/lib/cassandra/data

# commit log

commitlog_directory: /var/lib/cassandra/commitlog

# saved caches

saved_caches_directory: /var/lib/cassandra/saved_caches

§  Créer ces répertoires (donner les droits nécessaires avec la commende chmod)

> sudo mkdir /var/lib/cassandra

> sudo mkdir /var/lib/cassandra/data

> sudo mkdir /var/lib/cassandra/data/commitlog

> sudo mkdir /var/lib/cassandra/data/saved_caches

Page 11: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

Configuration de log4j pour Cassandra

§  Fichier de configuration: log4j-server.properties log4j.appender.R.File=/var/log/cassandra/system.log

§  sudo mkdir /var/log/cassandra §  Lancement du serveur

•  ./bin/cassandra -f

§  Lancement du client •  ./bin/cassandra-cli [-host localhost –port 9160]

Page 12: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

Cassandra : Installation (Windows)

§  Utiliser la distribution DataStax Community §  http://www.planetcassandra.org/cassandra/ §  Choisir un MSI installer pour Windows et

télécharger §  Exécuter l’installeur et suivre les instructions §  Vous pouvez vous faire aider par ce tutorial:

http://www.datastax.com/2012/01/getting-started-with-apache-cassandra-on-windows-the-easy-way

Page 13: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

MONGODB

Page 14: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

MogoDB: Installation et configuration (Windows)

§  Ouvrir un shell cmd >wmic os get osarchitecture (pour connaître l’architecture de son système d’exploitation (32

ou 64 bits) §  Extraire l’archive dans « C:\ » par exemple >cd / >md data (crée un répertoire data) >md data\db (crée un répertoire db) >C:\mongodb\bin\mongod.exe (lance le serveur) §  Ou >C:\mongodb\bin\mongod.exe --dbpath ‘’dossier data ’’ (en spécifiant le dossier si c’est différent de c:\data\db) §  Ouvrir un autre shell pour lancer le client >C:\mongodb\bin\mongo.exe

14

Page 15: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

Installation et configuration (LINUX/MAC OS)

§  www.mongodb.org/downloads §  tar zxvf mongodb-xxx.tgz

(xxx:version choisie) §  mv mongodb-xxx /votredossier §  sudo mkdir /data/db

(par défaut, mongodb utilise ce dossier, il faut donc le créer)

§  Sinon lui fournir le chemin de votre dossier au lancement

./bin/mongod --dbpath /votreDossier

15

Page 16: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

Lancement

§  ./bin/mongod

16

Page 17: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

Lancement du client

§  ./bin/mongo

§  Pour vous familiariser avec l’environnement essayez ces quelques commandes

>help >db.help()

17

Page 18: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

NEO4J

Page 19: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

Installation (Linux)

§  Télécharger la dernière version en sélectionnant votre plateforme

http://neo4j.com/download/ §  Extraire l’archive >tar –xf <nomdelarchive> §  Changer de répertoire et aller dans le dossier

désarchivé §  Lancer

>./bin/neo4j start §  Vérifier en allant sur lien:

http://localhost:7474/webadmin §  Arrêter le serveur >./bin/neo4j start

Page 20: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

Installation (Mac)

§  On peut suivre les mêmes instruction que pour Linux ou télécharger un installer « dmg » à partir de

http://neo4j.com/download/ §  Cliquer sur l’installer et déplacer l’icône Neo4J

dans le répertoire Applications §  Lancer l’application Neo4J

Page 21: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

Installation (Windows)

§  Choisir la version Windows à partir de http://neo4j.com/download/ §  Double cliquer sur l’installer exe §  Suivre les instructions

Page 22: Installation Outils NoSQL - perso.isep.frperso.isep.fr/rchiky/nosql/InstallationOutils.pdf · terminal (Linux/mac) ou invite de commandes ... The Redis project does not officially

Institut Mines-Télécom

FIN

[email protected]