User Tools

Site Tools


guides:webserver:part1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
guides:webserver:part1 [2019/10/04 13:40]
admin created
guides:webserver:part1 [2022/07/04 13:30] (current)
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). 
-I have [[https://​peertube.armchairscientist.co.uk/​videos/​watch/​e5ff67cd-2b73-4a60-9fdd-abc0c474211b|a video here that takes you through it]]. Only the first 3 minutes or so are relevant. Remember to change your server location to Europe/​London.\\+
 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"​
   * In the top-right of the nav bar left of "​Support"​ is a region, click this to change your region to EU e.g. Ireland   * In the top-right of the nav bar left of "​Support"​ is a region, click this to change your region to EU e.g. Ireland
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/​Windows ​==== 
-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]] +If you don't have SSH installed (you get a ''​command not found''​ error when trying ​to run ssh from the command prompt), 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
-Download ​putty here: https://​www.chiark.greenend.org.uk/​~sgtatham/​putty/ ​\\ +  * You'll have to convert the PEM file from Amazon to a ppk file that PuTTY can use From the start menu run PuTTYgen 
-For simplicity, download the executables under “Alternative binary files”\\ +    * Under 'Type of key to generate'​ choose **RSA** 
-The main program “putty.exe” 32-bit\\ +    * Press the **Load** button ​and select the PEM file you downloaded from Amazon 
-And the key converter utility “puttygen.exe”\\ +    * Press **Save private key** and save the newly generated ppk file somewhere you'll be able to find it
-The MSI installer is more customisable but fiddly\\ +
-Another [[https://​youtu.be/​bi7ow5NGC-U|video guide]] ​to both converting ​and connecting +
- +
-----+
  
-Now move on to the [Guides/​Webserver/​Part2|Webserver Part 2: Setting up]] to set up the web and database ​server.+To use PuTTY to connect to your server: 
 +  * Open PuTTY from the start menu 
 +    * 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) 
 +    * Under '​Connection type' choose **SSH** 
 +    * Ensure ​the port is **22** 
 +    * 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
  
 +  * [[Guides/​Webserver/​Part2|(next) Webserver Part 2: Setting up the web and database server]] ​
guides/webserver/part1.1570192819.txt.gz · Last modified: 2019/10/04 13:40 by admin