We use AWS EC2 to run mailman bundle.
First, login to EC2 Management Console.
For better speed in China, we choose ap-northeast-1 (Tokyo, Japan) node.
Create or import your SSH key pair here
If you already have one ssh key pairs (used to log into a Linux machine), you can import it here。
If not, just click Create Key Pair to create one. Here it will download one .pem file, the private key,
If you are running a macOS or Linux machine, place it here:
~/.ssh/
Second, create a EC2 vm for mailman here
In this instance, we choose
Ubuntu Server 14.04 LTS (HVM), SSD Volume Type - ami-a21529cc
Step 2: Choose an Instance Type. Since micro instances are eligible for the AWS free usage tier, we choose it.
Currently selected: t2.micro (Variable ECUs, 1 vCPUs, 2.5 GHz, Intel Xeon Family, 1 GiB memory, EBS only)
Click Next: Configure Instance Details
We only need one instance in this example.
Free tier eligible customers can get up to 30 GB of EBS General Purpose (SSD). So we have 30 GB here.
We don't need to change it now -- maybe later.
Add some rules.
- Allow SSH traffic from your IP address
- Allow all ICMP traffic from your IP address, to enable ping requests
- Allow HTTPS and HTTP traffic
- Allow port 8000 for testing Mailman
Review your settings here.
Choose the keypair we imported or created before.
An Elastic IP address is a static IP address designed for dynamic cloud computing. An Elastic IP address is associated with your AWS account. With an Elastic IP address, you can mask the failure of an instance or software by rapidly remapping the address to another instance in your account.
Read more here.
After you read the docs, go here.
Click Allocate New Address, then system will allocate one IP address for you. Log it as [Elastic-IP]
After you get the ip, choose the ip, click Actions - Associate Address。
Click the text bot of Instance, choose the EC2 VM we created before. Then Associate.
https://ap-northeast-1.console.aws.amazon.com/ec2/v2/home?region=ap-northeast-1#Instances
Click Connect to get instructions.
Type the following commands, line by line.
sudo apt-get update # update package info
sudo apt-get upgrade # upgrade the system
sudo apt-get install python3-pip python-pip galternatives language-pack-en git # install some essencial packages
To set the hostname,
-
Edit /etc/hostname , make the name change, save the file.
sudo echo "[hostname]" > /etc/hostname
-
You should also make the same changes in /etc/hosts file.
-
Run sudo /etc/init.d/hostname restart or sudo service hostname restart.
In this example [hostname] has been set to mail-aws-test.xiaoxing.us
Reboot to let the system up-to-date:
sudo reboot