This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
guides:webserver:part1 [2019/10/04 13:40] admin |
guides:webserver:part1 [2022/07/04 13:30] admin |
||
---|---|---|---|
Line 3: | Line 3: | ||
===== Setting up your Amazon EC2 instance ===== | ===== Setting up your Amazon EC2 instance ===== | ||
- | Visit Amazon Web Services and create an account https://aws.amazon.com/ You will have to put credit card details in, but you won't be charged for your first year if you select a product in the free tier (the free tier has an adequate server for what we'll need, just don't create a second one).\\ | + | Visit Amazon Web Services and create an account https://aws.amazon.com/ You will have to put credit card details in, but you won't be charged for your first year if you select a product in the free tier (the free tier has an adequate server for what we'll need, just don't create a second one). |
Get logged in to the AWS site to you see your username beside the bell icon. Hit the orange button "Sign in to console" | Get logged in to the AWS site to you see your username beside the bell icon. Hit the orange button "Sign in to console" | ||
Line 40: | Line 40: | ||
Make sure you **DON'T** disable the existing ticked Security Groups (those are the ones that let you SSH into the server) i.e. install-wizard. | Make sure you **DON'T** disable the existing ticked Security Groups (those are the ones that let you SSH into the server) i.e. install-wizard. | ||
- | ==== On Mac/Linux ==== | + | ==== On Mac/Linux/Window ==== |
- | Mac and Linux systems have builtin OpenSSH tools to connect to your server: | + | Mac and Linux systems (as well as Windows 10+) have builtin OpenSSH tools to connect to your server: |
- | <code>ssh -i youridentifyfile.pem ubuntu@your_server_ip</code> | + | <code>ssh -i youridentityfile.pem ubuntu@your_server_ip</code> |
- | **Having trouble with permissions or accessing the PEM file?** Further information [[creating_an_ssh_shortcut|is here]] | + | **Having trouble with permissions or accessing the PEM file?** You probably have to set correct permissions on the PEM file. Further information [[creating_an_ssh_shortcut|is here]] |
+ | <code bash> | ||
+ | chmod 600 youridentityfile.pem | ||
+ | </code> | ||
==== On Windows ==== | ==== On Windows ==== | ||
- | There are some extra steps needed to convert your PEM file to something compatible with PuTTY if you are using Windows. There are some [[https://aws.amazon.com/premiumsupport/knowledge-center/convert-pem-file-into-ppk/|instructions for that here]] | + | You'll need to download PuTTY and convert your PEM file to PPK: |
+ | * Download PuTTY from https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html You generally want to choose the '64 bit MSI (Windows Installer)' option. | ||
+ | * You'll have to convert the PEM file from Amazon to a ppk file that PuTTY can use. From the start menu run PuTTYgen | ||
+ | * Under 'Type of key to generate' choose **RSA** | ||
+ | * Press the **Load** button and select the PEM file you downloaded from Amazon | ||
+ | * Press **Save private key** and save the newly generated ppk file somewhere you'll be able to find it | ||
- | Download putty here: https://www.chiark.greenend.org.uk/~sgtatham/putty/ \\ | + | To use PuTTY to connect to your server: |
- | For simplicity, download the executables under “Alternative binary files”\\ | + | * Open PuTTY from the start menu |
- | The main program “putty.exe” 32-bit\\ | + | * In the 'Host Name' box enter ''ubuntu@your_amazon_public_IP'' (replace your_amazon_public_IP with the IP of your new EC2 server - this IP can be found in the instance list on your Amazon console, you might have to scroll a little to the right to see it) |
- | And the key converter utility “puttygen.exe”\\ | + | * Under 'Connection type' choose **SSH** |
- | The MSI installer is more customisable but fiddly. \\ | + | * Ensure the port is **22** |
- | Another [[https://youtu.be/bi7ow5NGC-U|video guide]] to both converting and connecting | + | * In the category pane, expand 'SSH' then choose 'Auth'. Click **Browse** and choose the ppk file you generated earlier. |
- | + | * Optional, but recommended: Choose 'Session' from the top of the category list, enter a name in 'Saved sessions'' then press **Save** (this lets you reconnect to the server without repeating the above steps by just clicking on the session name next time you open putty | |
- | ---- | + | * Click **Open** to connect. The first time you do this, you'll be given a notification of the finger print of the server, this is for information only - say Yes to trusting this certificate |
- | + | ||
- | Now move on to the [Guides/Webserver/Part2|Webserver Part 2: Setting up]] to set up the web and database server. | + | |
+ | * [[Guides/Webserver/Part2|(next) Webserver Part 2: Setting up the web and database server]] |