程序代写 hadoop cache Using the BigData Hadoop system – cscodehelp代写

Using the BigData Hadoop system
This is an alternative approach that uses a simple terminal window (the kind you would start from the GUI). This approach will work equally well – the only change is how to shut down the server which is detailed at the end of this document
Start you “Ubuntu Hadoop 2” machine. Note: the 1st time you do this you will be asked to change the password, do this (and remember to keep a copy of the password!).
Once started you will get a the option to connect (the small PC icon in the lower right), clicking on this will show the ‘SSH connection’ parameters, the line will look something like the one below (I have changed a few numbers as otherwise you can access my server )
ssh -p 51304
Before you start, you will need to install putty. You can either run it from the University’s virtual desktop system (it is part of the University applications) or install your own copy, if you wish to do this can get it from https://www.putty.org/ (follow the ‘Download Putty’ link)
Note: There are other SSH terminal clients available, indeed you can simply type(or paste) the connection command provided by the Azure services into a command window (remembering to change the user from eeee4115 to hduser).
Once putty is started you will get a small window to complete as shown below
To set up the connection you need to look at the string provided in the Azure labs. E.g.
For the Host Name use the part after the @ symbol (highlighted in yellow)
For the Port, change this to the number after the -p (highlighted in blue, so in this case 51304)
You may wish to save this, is so, enter a name that is appropriate in the ‘Saved Sessions’ and press ‘Save’ (you can then ‘Load’ it the next time).

Getting connected
To connect to the server press ‘Open’
The first time you connect will get a ‘Putty security alert’ that the server’s key is not cached in the registry, this is OK – press ‘Yes’ to connect
Once the connection opens you will be prompted for a username & password
Login: hduser Note: NOT eeee4115! Login using the password hadoop1234
You will see a window similar to that below
Time to get going!
We first need to set up some security permissions (I cannot do this in advance as the machines are cloned and the keys change).
In the terminal window, type the following commands ONE AT A TIME (note: they are CASE SENSITIVE) – you may find it easier to cut/paste
Commands you need to type are in courier roman italics Note: two single quotes
rm -rf .ssh
ssh-keygen -t dsa -P ” -f ~/.ssh/id_dsa
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys ssh-keygen -t rsa
The lines below are instructions
o Accept the default path presented for the file name
o Press enter when prompted for a passphrase
o Press enter when asked to enter the same passphrase again
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys chmod og-wx ~/.ssh/authorized_keys

Checking it worked
Now type
ssh localhost
You will see an output similar to the one shown below
When prompted if you wish to continue connecting, enter Yes
You will then be ‘logged in again’, the screen will look like the one below (last part only shown)
Type
exit
This will take you back to your previous ‘login’
You should now be able to log in without confirming the key, to check this
ssh localhost
{you should see the screen as above but should not have been asked to confirm things}
exit

Time now to learn how to shut the system down
From the command prompt type
sudo shutdown now
You will be asked to enter the password for hduser (hadoop1234) to confirm the action
The system will start the shutdown process, part of which will be to disconnect you – you will be able to tell this has worked as you see the message “Remote side unexpectedly closed network connection”
Close the Putty window
Wait ~2 minutes and to the Azure console and shut down the system (it seems not to be good at this!)

Leave a Reply

Your email address will not be published. Required fields are marked *