From f168e1c14255351e23c7cf325c5ae87962ec4748 Mon Sep 17 00:00:00 2001 From: Rey Dhuny Date: Wed, 8 Oct 2014 23:08:33 +0100 Subject: [PATCH 1/5] Add a document to walk you through setting up your own tilde.club flavoured server. --- docs/how-to-set-up-a-tilde.md | 72 +++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 docs/how-to-set-up-a-tilde.md diff --git a/docs/how-to-set-up-a-tilde.md b/docs/how-to-set-up-a-tilde.md new file mode 100644 index 0000000..71ee20d --- /dev/null +++ b/docs/how-to-set-up-a-tilde.md @@ -0,0 +1,72 @@ +## Preamble + +This document will talk you through setting up your own tilde.club flavoured server. + +## Prerequisites + +* An [Amazon AWS account](https://aws.amazon.com) +* A thirst for the unknown + +## Create an instance on Amazon EC2 + +* On AWS click `Launch Instance` +* Select `Amazon Linux AMI` +* Select `t2.micro` +* Select the (recommended) thingy in the popup +* Click `Launch` +* In `Security Groups` right-click: + * `Edit inbound rules` -> `Add Rule` -> `HTTP` and `SSH` + * `Edit outbound rules` -> `Add Rule` -> `HTTP` and `HTTPS` +* In `Elastic IPs`: + * Click `Allocate New Address` + * Choose `VPC` on the dropdown (it won't work otherwise, I forget why) + * Right click, `Associate Address` + * Choose the instance you just created +* Create an `A record` at your domain name registrar to point at the Elastic IP then wait for those changes to propagate. + +**NOTE** This could take up to 48 hours, use `dig domain.club +nostats +nocomments +nocmd` to see if you're in business. + +## SSH into your shiny instance using your `pem` file + +* `ssh -i security.pem ec2-user@domain.club` +* `yum update` +* `sudo yum remove java` +* `sudo yum install git` + +## Change hostname + +* `sudo vim /etc/hosts` change `localhost.localdomain` to `domain.club` +* `sudo vim /etc/sysconfig/network` change `localhost.localdomain` to `domain.club` +* `sudo reboot` + +## Allow passwords to log in + +* `sudo vim /etc/ssh/sshd_config` change `PasswordAuthentication` to `yes` +* `sudo service sshd restart` + +## Create a user `bill` with correct permissions + +* `sudo adduser bill` +* `sudo passwd bill` +* `mkdir /home/bill/public_html` +* `sudo chmod 755 /home/bill` + +## Install Apache + +* `sudo yum install httpd` +* `sudo /etc/init.d/httpd start` +* `sudo vim /etc/httpd/conf/httpd.conf`: + * comment out `UserDir disabled` + * uncomment `UserDir public_html` + * uncomment the `Control access to UserDir directories` block beginning with `` +* `sudo /etc/init.d/httpd restart` + +## Install other software + +* `yum install tmux` +* `yum install mutt` +* `yum install irssi` +* `yum install tree` +* `yum install lynx` +* `yum install finger` +* etc From 095dc5c86d728b785e78e8b6fcb066f40a852c0a Mon Sep 17 00:00:00 2001 From: Rey Dhuny Date: Wed, 8 Oct 2014 23:20:39 +0100 Subject: [PATCH 2/5] Update how-to-set-up-a-tilde.md --- docs/how-to-set-up-a-tilde.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/how-to-set-up-a-tilde.md b/docs/how-to-set-up-a-tilde.md index 71ee20d..1aedf8b 100644 --- a/docs/how-to-set-up-a-tilde.md +++ b/docs/how-to-set-up-a-tilde.md @@ -1,10 +1,11 @@ ## Preamble -This document will talk you through setting up your own tilde.club flavoured server. +This document will talk you through setting up your own tilde.club flavoured server; the example `domain.club` is used below. ## Prerequisites * An [Amazon AWS account](https://aws.amazon.com) +* Your own domain * A thirst for the unknown ## Create an instance on Amazon EC2 From 55fdc30177e27a27ec18aaadfdcf2dc90acd08e9 Mon Sep 17 00:00:00 2001 From: Rey Dhuny Date: Wed, 8 Oct 2014 23:49:26 +0100 Subject: [PATCH 3/5] Add a mention that other cloud providers would work just as well /cc @pfhawkins --- docs/how-to-set-up-a-tilde.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/how-to-set-up-a-tilde.md b/docs/how-to-set-up-a-tilde.md index 1aedf8b..e0fe7f7 100644 --- a/docs/how-to-set-up-a-tilde.md +++ b/docs/how-to-set-up-a-tilde.md @@ -4,7 +4,7 @@ This document will talk you through setting up your own tilde.club flavoured ser ## Prerequisites -* An [Amazon AWS account](https://aws.amazon.com) +* An [Amazon AWS account](https://aws.amazon.com), though any other cloud provider would work just as well. * Your own domain * A thirst for the unknown From 589cdbceb36f96c0179f55b29c8c40f4ff856995 Mon Sep 17 00:00:00 2001 From: Rey Dhuny Date: Thu, 9 Oct 2014 13:21:23 +0100 Subject: [PATCH 4/5] Fix chmod/chown permissions on `foo` user. I imagine this will eventually be scripted anyway but it's always nice to see something up and running quickly. --- docs/how-to-set-up-a-tilde.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/how-to-set-up-a-tilde.md b/docs/how-to-set-up-a-tilde.md index e0fe7f7..4167a3b 100644 --- a/docs/how-to-set-up-a-tilde.md +++ b/docs/how-to-set-up-a-tilde.md @@ -45,12 +45,14 @@ This document will talk you through setting up your own tilde.club flavoured ser * `sudo vim /etc/ssh/sshd_config` change `PasswordAuthentication` to `yes` * `sudo service sshd restart` -## Create a user `bill` with correct permissions +## Create a test user `foo` account and `public_html` folder -* `sudo adduser bill` -* `sudo passwd bill` -* `mkdir /home/bill/public_html` -* `sudo chmod 755 /home/bill` +* `sudo adduser foo` +* `sudo passwd foo` +* `sudo mkdir /home/foo/public_html` +* `sudo chown foo:foo /home/foo/public_html` +* `sudo chmod 755 /home/foo` +* `sudo chmod 755 /home/foo/public_html` ## Install Apache From 125033ea8d6a75e45c545618c70d4271c5390367 Mon Sep 17 00:00:00 2001 From: Rey Dhuny Date: Thu, 9 Oct 2014 13:33:57 +0100 Subject: [PATCH 5/5] Make the `Security Groups` section more explicit --- docs/how-to-set-up-a-tilde.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/how-to-set-up-a-tilde.md b/docs/how-to-set-up-a-tilde.md index 4167a3b..92a7835 100644 --- a/docs/how-to-set-up-a-tilde.md +++ b/docs/how-to-set-up-a-tilde.md @@ -15,9 +15,15 @@ This document will talk you through setting up your own tilde.club flavoured ser * Select `t2.micro` * Select the (recommended) thingy in the popup * Click `Launch` -* In `Security Groups` right-click: - * `Edit inbound rules` -> `Add Rule` -> `HTTP` and `SSH` - * `Edit outbound rules` -> `Add Rule` -> `HTTP` and `HTTPS` +* In `Security Groups`: + * Right click on the security group used by your instance and: + * Click `Edit inbound rules` + * Add a rule for `HTTP` + * Add a rule for `SSH` + * Again, right click on the security group used by your instance and: + * Click `Edit outbound rules` + * Add a rule for `HTTP` + * Add a rule for `HTTPS` * In `Elastic IPs`: * Click `Allocate New Address` * Choose `VPC` on the dropdown (it won't work otherwise, I forget why)