提供的产品配置

可在 Amazon Lightsail 上可实现下面的 Plesk 配置。

Plesk 组件组
Plesk Hosting Stack on Ubuntu 推荐组合 *(默认安装 Fail2Ban、ModSecurity、Plesk Firewall 和 **WordPress Toolkit)

注解: *The Recommended components set includes all components necessary for web hosting (including the web server, a mail server, a database server, and so on), plus the most popular and widely used features. For more information about Plesk Hosting Stack on Ubuntu, see the topic Plesk Web Admin SE.

注解: **Plesk Hosting Stack on Ubuntu 中的 WordPress Toolkit 只提供基本的功能。若要使用 WordPress 高级功能,请将您的 Plesk 许可证升级为 Web Pro or Web Host Edition

在 Amazon Lightsail 上安装 Plesk

若要在 Amazon Lightsail 上安装 Plesk,请如下操作:

  1. 登录现有的 AWS 帐户或创建一个帐户

    注解: 如果您正尝试访问 Amazon Lightsail 而看到 403 HTTP 错误,请 创建一个要访问 Lightsail 的 IAM 策略并将其附加到新的或现有的用户

  2. 进入 Lightsail 点击 创建实例。

    image 79175

  3. 在 “实例地址” 下点击 更改地区和区域 并选择一个 地区 。如果您计划托管小型企业网站,我们建议您选择最靠近其地理位置的区域,这样有利于降低本地访客访问时的页面加载时间。

  4. 在 “挑选您的实例镜像” > “Apps + OS” 标签下,选择 Plesk Hosting Stack on Ubuntu

    image 79441

  5. (备选)点击 + 添加启动脚本 以添加第一次启动时将在您的实例上运行的 shell 脚本。

  6. Lightsail uses SSH keys for authentication. To use an existing SSH key, click Change SSH key pair and select the SSH key you have uploaded earlier. You can also create or upload a new key pair or use the default one.

  7. 选择您的实例方案。Plesk Hosting Stack on Ubuntu 以每月 10 美元的 Lightsail 方案起售。

  8. 在 “命名您的实例” 下,给您的实例一个可识别的名称,并指定您要部署的实例数量。

    image 79038

  9. Click Create instance.

    You have created the Plesk instance on Lightsail. Wait a while until Plesk is configured to log in to it.

    注解: 不要重新启动实例,或者将静态IP地址分配给它,直到该实例完全部署完成为止。该部署可能会花费一些时间。如果您登录到正在进行部署的Plesk实例,您将看到维护屏幕。一旦部署完成,维护屏幕就会被移除,Plesk就可以使用了。

  10. Assign a static IP address to your instance and then restart it.

    Lightsail assigns a public IPv4 address to your instance by default. This IP address changes each time you start or stop the instance. After you assign a static IP address, it replaces the default public one and stays the same when you start or stop your instance.

    Watch the video tutorial

Accessing Plesk for the First Time

注解: When you create a Lightsail instance with Plesk, all the necessary ports are automatically opened in the Amazon Lightsail Firewall (TCP 22, UDP 53, TCP 53, TCP 80, TCP 443, TCP 8443, and TCP 8447).

To log in to Plesk on Lightsail for the first time:

  1. Access the instance command line via SSH. You can do so using the following:

    • Your own SSH client, for example PuTTY on Windows or Terminal on Linux and macOS. If you go with this option, you will need the instance user name and IPv4 address. To see them, go to Lightsail > Instances, click your instance name, and scroll down to the “Use your own SSH client” section.

      image lightsail ip

      PuTTY is a free popular SSH client for Windows. However, PuTTY does not work with the standard .pem format of SSH keys. If you use PuTTY, you will need to convert the key downloaded from Lightsail to the PuTTY-specific format.

      Watch the video tutorial

      Unlike Windows, Linux and macOS have the command-line Terminal application available by default. If you use Terminal, you will need to set the specific permissions for the key downloaded from Lightsail and place the key in the designated folder.

      Watch the video tutorial

    • The Lightsail browser-based SSH client. To use the client, locate your Plesk instance and click the image terminal icon icon on it.

      image terminal icon big

  2. Run the following command to generate one-time login links:

    sudo plesk login
    
  3. Plesk will generate two login links: one with the instance hostname and the other one with the instance IPv4 address. Open the link with the hostname in your browser (for example, https://eloquent-ishizaka.192-0-2-1.plesk.page/login?secret=KgG2POCJYtWoBc2EHoJzV6ThQpxkMjwuj7hv-9LP8LLbSc-J).

    注解: If the link with the hostname does not work for any reason, open the second link with the IP address (for example, https://192.0.2.1/login?secret=hlHH450sx%2FAlSJHj1VWJC2qKxK6gqVxtsMkYG6bf6wc%3D). In this case, you will see the “Your connection is not private” warning in your browser. Ignore the warning and proceed. It is safe to do so because the connection to your Plesk server is actually secure and encrypted with a self-signed SSL/TLS certificate.

  4. You will be redirected to the Plesk welcome screen. Provide your contact name and email address; read and accept the End-User License Agreement; set an administrator password.

    注解: To log in to Plesk next time, use that password and the admin username.

  5. Click Enter Plesk to log in to Plesk.

Once brief initializing is finished, Plesk will be completely ready to work. You can start with creating your first website.

Next Steps

我们还建议配置服务器在独立的DNS区域保留子域名的DNS记录。要实现此目的,请使用以下命令:

/usr/local/psa/bin/server_pref -u -subdomain-dns-zone own

注解: The private IP address of the server is detected automatically. To avoid connectivity issues, do not register your instance’s public IP address in Plesk. Only the private IP address must be registered.