How to Install WP Squared on Amazon AWS
Overview
This document explains how to launch a WP Squared instance on the Amazon Web Services™ (AWS) cloud service. Follow this procedure to launch an instance using the WP Squared Amazon Machine Image™ (AMI).
We recommend that you read Amazon’s AWS documentation before you begin this process.
Launch an Amazon AWS instance
Create a key pair
If your AWS account does not include at least one key pair, you must create one before you can launch your instance. To do this, perform the following steps:
- Sign in to your AWS account.
- Click View all services.
- Click EC2 under Compute. The EC2 Dashboard will appear.
- In the left menu under Network & Security, click Key Pairs. The Key pairs interface will appear.
- Click Create key pair. The Create key pair interface will appear.
- Enter a name for the key pair in the Name text box. Do not change any default settings.
- Click Create key pair. The list of key pairs will refresh to display the new key pair, and your browser will automatically download the new key pair’s
.pemfile.
After you create the new key pair, it will automatically appear in the list of key pairs during the instance launch process.
Add a key pair
To access the instance via SSH, you must first add the key pair to your local system. To do this, perform the following steps for your computer’s operating system:
MacOS
On a macOS® computer that uses the default download folder, perform the following steps, where example represents the key pair’s name:
- Run the following command to move the key file to your SSH directory:
mv ~/Downloads/example.pem ~/.ssh - Run the following command to modify the permissions for the
.pemfile:chmod 600 ~/.ssh/example.pem - Run the following command to add the key pair:
ssh-add ~/.ssh/example.pem
An Identity added message will appear.
Windows
On a Windows® computer that runs the PuTTY SSH client and uses the default download folder, perform the following steps:
- From the Windows Start menu, open PuttyGen.
- Under Conversions, click Import.
- Navigate to the PuTTY Key Generator interface and click Open.
- Enter an optional passphrase in the Key passphrase and Confirm passphrase text boxes.
- Click Save private key and save the key as a
.ppkfile. - From the Windows Start menu, open PuTTY.
- In the Session interface, from the Saved Sessions menu, select your preferred authorization session and click Load.
- Navigate to the Auth interface under the SSH category.
- Click Browse, select the private key file to upload, and click Open.
Navigate to the AMI
Navigate to the cPanel AWS Marketplace listing and choose one of the WP Squared AMIs.
Then, click View purchase options.
WebPros International, LLC only supports AMIs that list cPanel or WebPros International, LLC as the seller. You can find seller information immediately below the AMI listing title.
Subscribe and select version
Review the pricing details and the terms and conditions, then click Subscribe.
The subscription process takes a few minutes. You will receive a notification both on the webpage and via email when the subscription process is complete.
Once the subscription process is complete, click Launch your software. Then, under Launch method, select One-click launch from AWS Marketplace.
In the Version menu, select the version of WP Squared to run.
Verify region settings
Under Region, ensure that AWS automatically selected the correct region. To select a different region, click Region and select a region.
We strongly recommend that you host interconnected Amazon servers within the same availability zone.
Select an instance type
Under Instance type, select the instance type that you wish to use. Your EC2 instance type determines the rate at which AWS bills you.
- We recommend that you select the m7a.medium instance type.
- Make certain that you select an instance type that includes appropriate resources for the type of system that you wish to run. If you will host a large number of websites or multimedia content, you must choose an instance type that exceeds our minimum system requirements.
- We strongly recommend that you do not install WP Squared on a server that relies on snapshot data (for example, an Amazon EC2™ Spot instance). When this kind of server reverts to snapshot data, WP Squared detects the action as a uniqueness change. This behavior causes the server’s WP Squared license to lock and disables the server.
Configure VPC and subnet settings
To configure your VPC and subnet settings, perform the following steps:
- Under VPC, verify the Virtual Private Cloud (VPC) that the system selected.
- To change this setting, select the desired VPC from the menu.
- To create a new VPC, click Create VPC.
- Under Subnet Settings, verify the subnet that the system selected.
- To change the subnet, select the appropriate subnet from the menu.
- To create a new subnet, click Create subnet.
For more information about VPC and subnet settings, read Amazon’s VPCs and Subnets documentation.
Configure security settings
Under Security Group, verify the new instance’s port and security settings.
- We strongly recommend that you create a new security group. The new group will use rules that WebPros International, LLC created to meet security requirements and improve security for your system.
- We recommend that only advanced users select the default security group. You may experience connection issues if you select this group.
To create a new security group, perform the following steps:
- Click Create security group. The Create vendor-recommended security group interface appears.
- Enter a name for the security group in the Name text box.
- Enter a description in the Description text box.
- Click Create security group.
Select a key pair
Select the desired key pair from the Key Pair menu. If you do not have a key pair, follow the steps in the Create a key pair and Add a key pair sections of this document.
Launch the instance
After you have verified all your settings, click Launch under One-click launch. A notification text box and configuration details will appear.
In the notification text box, click View instance on EC2 to navigate to the EC2 Dashboard. This interface allows you to launch EC2 instances and perform EC2 management tasks.
New instances may require several minutes to initialize.
Assign an elastic IP address
If you stop and restart your instance, Amazon will assign a different IPv4 address to the instance. WP Squared requires a permanent IP address for all installations. Therefore, you must assign an elastic IP address to the instance to set a permanent address for the server.
Due to networking requirements, you cannot run an IPv6-only WP Squared server. You must have at least one IPv4 address.
To assign an elastic IP address to the instance, perform the following steps:
- In the left sidebar, navigate to the Network & Security menu and click Elastic IPs. The Elastic IP addresses interface will appear.
- Click Allocate Elastic IP address.
- Click Allocate. A success message will appear.
- Click Associate this Elastic IP address.
- Under Resource type, select Instance.
- In the Instance menu, select the new instance that you just created.
- In the Private IP menu, select the appropriate private IP address.
- Make sure that the Allow this Elastic IP address to be reassociated checkbox is not checked.
- Click Associate. A success message will appear.
Log in via SSH and set the root password
The first time you access the server, you must set its root password. To log in to the server via SSH and promote yourself to the root user, run the following commands, where IPADDRESS represents the server’s public (elastic) IP address:
Log in via macOS
To log in from a macOS computer and promote yourself to the root user, run the following commands:
| |
Log in via Windows
To log in from a Windows computer, perform the following steps:
- From the Windows Start menu, open PuTTY.
- In the Session interface, enter the hostname or IP address of the server in the Host Name (or IP address) text box (for example,
192.0.2.0). - Enter the port number in the Port text box (for example,
22). - Select the SSH protocol.
- In the Saved Sessions menu, select your preferred authorization session and click Load.
- Click Open.
Set the root password
After you log in, you must set the root password so you can access WP Squared. To set the root user’s password, perform the following steps:
- Enter the
passwdcommand. - Enter a password.
- Enter the password again.
The system will set the root password.
Create a WP Squared Account
To create a WP Squared account, perform the following actions:
- Run the
/usr/local/cpanel/scripts/whmlogincommand in your terminal window. The output will resemble the following example:1https://198.51.100.1:2087/cpsess1234567890/login/?session=root%3aAqI0aGGAFWI_Mab_%3acreate_user_session%2c31cd420f0fd6aca696a2890f580f2f0a - Copy and paste the URL output in your browser to log in to WHM as the
rootuser. - Read and accept the legal documents that appear.
- Navigate to the Create an Account interface and provide the necessary information to create a new account.
- Click Create .
- Once you create the account, click Go To WP Squared in the top right corner. The WP Squared website setup interface appears.Note:
You can also click on the WP Squared icon (
) in WHM’s List Accounts interface to launch WP Squared.
The first time you launch WP Squared, the wizard will walk you through setting up your first website.
You must have a valid license to use WP Squared.
Fix hostname issues
Newly-installed servers without a fully-qualified domain name (FQDN) as a hostname will automatically receive one from WebPros International, LLC. The hostname will be a subdomain of wp2.host. We encourage you to replace the automatically-issued hostname with an existing or new domain.
If you change your hostname after you launch your instance, AWS will reset it to the original hostname each time that the instance reboots. To resolve this issue, run the following command:
printf 'preserve_hostname: true\nmanage_etc_hosts: false\n' > /etc/cloud/cloud.cfg.d/99-preserve-hostname.cfg