cPanel

Amazon AWS Instance Management


Overview

After you create an instance with the cPanel & WHM Amazon Machine Image™ (AMI), you can manage that instance from within the Amazon Web Services™ (AWS) Management Console. This document describes common instance-management tasks that your cPanel & WHM instance may require.

Note:
  • For more information about AWS instance management, read Amazon’s® Working with the AWS Management Console documentation.
  • AWS systems may encounter package conflicts when the system attempts to update certain libraries (generally, libstdc++ libraries). These errors occur due to the way in which AWS manages packages. To resolve this issue, use the yum remove or rpm -e commands to remove the conflicting package.
  • For video tutorials about this process, view the cPanel and Amazon AWS playlist on our YouTube channel.

Access your instance for the first time

Note:
  • To improve security for your system, the cPanel & WHM AMI automatically runs the /usr/local/cpanel/upcp script after the instance initializes. This script may alter the AMI’s version number. Also, the WHM interface may display a license error if you click any update links while the update script runs as a background task.
  • New instances may require several minutes to initialize. Until the initialization process finishes, the Status Checks column of the EC2™ Management Console will display Initializing and an hourglass icon.

To access a new instance, perform the following steps:

  1. Sign in to your AWS account.

  2. From the Services menu in the top-left corner, select EC2 under Compute. The EC2 Management Console will appear.

  3. In the left-side menu under Instances, click Instances. The list of instances will appear.

  4. In the list of instances, or at the bottom of the interface in the Description tab, locate the following values:

    • Public DNS (IPv4) — The public DNS address for the instance.

      Important:

      You must set the hostname correctly before you can license the server.

    • Key Name (Key pair name in the Description tab) — The name of the key pair that you used when you created the instance.

  5. To connect to the instance via SSH, run the following command, where example represents the key pair name and IPADDRESS represents the public DNS address:

    ssh -i "~/.ssh/example.pem" centos@IPADDRESS
  6. To escalate to the root account, run the sudo su command.

  7. To change the root user’s password, run the passwd command. The system will prompt you to enter a new password.

  8. Enter the desired password and press Enter. The system will prompt you to confirm the password.

  9. Reenter the desired password and press Enter. A confirmation message will appear.

  10. If you wish to access WHM in your browser, perform the following additional steps:

    1. Navigate to the following address, where IPADDRESS represents the public DNS address:

      https://IPADDRESS:2087
      Important:

      The cPanel & WHM AMI’s cPanel-provided security group only allows connections via HTTPS.

    2. Use the root password to log in to the WHM interface as the root user.

More:

For more information, read our How to Access the Command Line and How to Log in to Your Server or Account documentation.

Manage instances

Important:
  • We strongly recommend that you stop unused instances to avoid unnecessary costs.
  • If you stop an instance, Amazon retains the instance’s basic information, but removes some data. For example, when you restart the instance, AWS will generate a new DNS hostname and IP address.

To start, stop, reboot, or terminate an instance, perform the following steps:

  1. Sign in to your AWS account.

  2. From the Services menu in the top-left corner, select EC2 under Compute. The EC2 Management Console will appear.

  3. In the left-side menu under Instances, click Instances. The list of instances will appear.

  4. Select the desired instance from the list.

    Note:

    To update multiple instances, select all of the desired instances.

  5. At the top of the list of instances, click Actions. The Actions menu will display.

  6. Select the desired setting from the Instance State menu:

    • Start — Restart the instance, which you must have previously stopped.

    • Stop — Pause the instance and retain some, but not all, of its data.

    • Reboot — Reboot the instance.

    • Terminate — Permanently delete the instance.

      Warning:

      When you terminate an instance, the system will delete the instance’s data.

      • Termination will not delete EBS volumes unless you enable the Delete on Termination setting.
      • You cannot restore a terminated instance.

      A confirmation message will appear. Confirm your action. The system may require several minutes in order to stop or terminate the instance.

The Instance State column in the list of instances displays the instance’s state and the following status icons:

  • A green icon — The system has successfully started the instance.

  • A yellow icon — An action is in progress.

  • A red icon — The system has successfully stopped or terminated the instance.

    Important:

    After you terminate an instance, that instance will only remain in the list of instances until you refresh the list.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *