|
|
(2 intermediate revisions by the same user not shown) |
Line 3: |
Line 3: |
| == Using MongoDB == | | == Using MongoDB == |
| | | |
− | [[MongoDB_Putty| Using putty]]
| + | Using MongoDB involves the following steps: |
| | | |
| + | * [[MongoDB_UsingPutty| Using putty]] |
| + | * [[MongoDB_StartingMongoDB| Starting MongoDB]] |
| | | |
− |
| |
− | To access the database, you need to login to mi-linux.wlv.ac.uk (also called csl-student.wlv.ac.uk).
| |
− |
| |
− | mi-linux can be accessed using a Secure Shell client, such as Putty, that is available using the Apps Anywhere system.
| |
− |
| |
− | === Apps Anywhere ===
| |
− |
| |
− | putty is a secure shell (SSH) client that can be used to access the University's Linux server. It is freely available to download for use at home (just search for putty). When using putty at the University, it is available via the Applications Anywhere software hub:
| |
− | [[http://www.wlv.ac.uk/appsanywhere Apps Anywhere]]
| |
− |
| |
− | Click the Apps Anywhere icon on your desktop:
| |
− |
| |
− | https://mi-linux.wlv.ac.uk/~oracle/wiki/Apps.png
| |
− |
| |
− | Which will bring up the following window:
| |
− |
| |
− | https://mi-linux.wlv.ac.uk/~oracle/wiki/appsAnywhere.png
| |
− |
| |
− | Click where it says <b>CLICK HERE</b>.
| |
− |
| |
− | Once you have been validated, then search for <b>putty</b>:
| |
− |
| |
− | https://mi-linux.wlv.ac.uk/~oracle/wiki/putty.png
| |
− |
| |
− | '''Note''':
| |
− | * the software version numbers may differ slightly
| |
− | * you may have to install this for every PC that you use.
| |
− |
| |
− |
| |
− | === putty ===
| |
− |
| |
− | Once you have installed putty, double click on it and it will bring up a Window similar to this:
| |
− |
| |
− | https://mi-linux.wlv.ac.uk/~oracle/wiki/puttyClient.png
| |
− |
| |
− | with the following details:
| |
− |
| |
− | Host Name: '''mi-linux.wlv.ac.uk''' (or '''csl-student.wlv.ac.uk''')
| |
− |
| |
− | and press '''Open'''
| |
− |
| |
− | When prompted to ''login as:''
| |
− |
| |
− | use your University username and password.
| |
− |
| |
− | == Starting MongoDB ==
| |
− |
| |
− | MongoDB can be started in several ways.
| |
− |
| |
− | === First time ===
| |
− |
| |
− | Once logged in, to start MongoDB run either the following command:
| |
− |
| |
− | runMongo
| |
− |
| |
− | This runs with a default password, that should be changed when you first login (see below).
| |
− |
| |
− | === With Password ===
| |
− |
| |
− | Once you have changed your password:
| |
− |
| |
− | runMongo yourPassword
| |
− |
| |
− |
| |
− | === With other settings ===
| |
− |
| |
− | ''runMongo'' is a script file setup for your convenience that run '''mongo''' and logs you into your own database.
| |
− |
| |
− | If you need to change any of the mongo options you will need to run '''mongo''' directly:
| |
− |
| |
− | mongo dbYourStudentNumber --port 27017 -u yourStudentNumber -p yourMongoPassword -whatever options required
| |
− |
| |
− | == Changing Password ==
| |
− |
| |
− | Once you have logged into MongoDB successfully you can change the default password:
| |
− |
| |
− | db.updateUser("myStudentNumber",
| |
− | {
| |
− | pwd: "myNewPassword",
| |
− | }
| |
− | );
| |
− |
| |
− |
| |
− | Replacing myStudentNumber with your University student number and myNewPasswor with your new password.
| |
− |
| |
− | Note, the function names in MongoDB are <b>case sensitive</b>.
| |
| | | |
| == Next Step == | | == Next Step == |
| | | |
| [[MongoDB_Overview|MongoDB]] Overview. | | [[MongoDB_Overview|MongoDB]] Overview. |