lemp wp_在阿里云上使用LEMP安装WordPress的5个步骤

lemp wp

This article was created in partnership with Alibaba Cloud. Thank you for supporting the partners who make SitePoint possible.

本文是与阿里云合作创建的。 感谢您支持使SitePoint成为可能的合作伙伴。

WordPress is one of the most popular content management systems (CMS) in the market, owing to the fact that it is completely free to use and extremely versatile. Typically, you would deploy WordPress on a LAMP stack, regardless of the type of website, as WordPress is based on MySQL and PHP.

WordPress是市场上最受欢迎的内容管理系统(CMS)之一,这是因为WordPress是完全免费使用且功能极为丰富的。 通常,无论网站是什么类型,您都将WordPress部署在LAMP堆栈上,因为WordPress基于MySQL和PHP。

In this article however, we will discover how to deploy a WordPress website on a LEMP stack. We have chosen NGINX as our web server instead of the more popular Apache because it is much faster, more scalable and secure for a single site.

但是,在本文中,我们将发现如何在LEMP堆栈上部署WordPress网站。 我们选择NGINX作为我们的Web服务器,而不是比较流行的Apache,因为它对于单个站点而言更快,更可扩展且更安全。

By completing the steps in this article, you should expect a fresh WordPress site running on an Alibaba Cloud Elastic Compute Service (ECS) instance, running a highly performant LEMP Stack.

通过完成本文中的步骤,您应该期望在运行高性能LEMP堆栈的阿里云弹性计算服务 (ECS)实例上运行的全新WordPress网站。

This article assumes that you already have an account on Alibaba Cloud. If you don't have one yet, just sign up and enjoy the $300 new user free credit.

本文假定您已经在阿里云上拥有一个帐户。 如果您还没有,只需注册即可享受$ 300的新用户免费信用

步骤1:置备并保护Ubuntu 16.04服务器 (Step 1: Provision and Secure an Ubuntu 16.04 Server)

In the first step, we will create an Alibaba Cloud ECS instance running Ubuntu 16.04. This step is pretty straightforward, it mostly involves purchasing an ECS instance from the Alibaba Cloud console, selecting your preferred configurations, and running some Linux commands.

第一步,我们将创建一个运行Ubuntu 16.04的阿里云ECS实例。 此步骤非常简单,主要涉及从阿里云控制台购买ECS实例,选择首选配置以及运行一些Linux命令。

However, to improve security, we will also be securing the server by creating a superuser and disabling root login. We will then configure the Ubuntu UFW (Uncomplicated FireWall) on the server.

但是,为了提高安全性,我们还将通过创建超级用户并禁用root登录来保护服务器的安全。 然后,我们将在服务器上配置Ubuntu UFW(不复杂的防火墙)。

Read the detailed steps here.

在此处阅读详细步骤

This provides a versatile foundation upon which we will complete our LEMP stack, which we will do in the next step.

这提供了一个通用的基础,我们将在此基础上完成我们的LEMP堆栈,这将在下一步中进行。

步骤2:完成LEMP堆栈 (Step 2: Completing the LEMP Stack)

In this step, we will complete a modern LEMP stack for our WordPress website. Specifically, we will be setting up our LEMP stack with a highly-performant combination of NGINX, MariaDB, and PHP7. This setup is widely regarded as the optimum foundation for a modern WordPress site.

在此步骤中,我们将为WordPress网站完成现代LEMP堆栈。 具体来说,我们将使用NGINX,MariaDB和PHP7的高性能组合来建立LEMP堆栈。 此设置被广泛认为是现代WordPress网站的最佳基础。

Read the detailed steps here.

在此处阅读详细步骤

At present, we can only visit our site by entering the server IP address in a web browser, so we will fix that in the next step by configuring a domain name to serve our site, and securing everything with an SSL certificate. After that, we will move on to installing WordPress on our LEMP stack.

目前,我们只能通过在网络浏览器中输入服务器IP地址来访问我们的网站,因此我们将在下一步中解决此问题,方法是配置一个域名来为我们的网站提供服务,并使用SSL证书保护所有内容。 之后,我们将继续在LEMP堆栈上安装WordPress。

步骤3:配置域并加密SSL (Step 3: Configuring a Domain and Let's Encrypt SSL)

In the third step, we will run through Domain Management for our site, adding DNS records, and installing a Let’s Encrypt SSL certificate. In the previous two steps, we provisioned and secured our Ubuntu 16.04 server installation, and then completed the LEMP stack with NGINX, MariaDB, and PHP7. However, we will need to configure a domain to make our server publicly accessible. Additionally, we will secure our WordPress site with an SSL certificate so it can only be accessed via HTTPS.

在第三步中,我们将对站点进行域管理,添加DNS记录,并安装“让我们加密SSL”证书。 在前两个步骤中,我们调配并保护了Ubuntu 16.04服务器的安装,然后使用NGINX,MariaDB和PHP7完成了LEMP堆栈。 但是,我们将需要配置一个域以使我们的服务器可公开访问。 此外,我们将使用SSL证书保护WordPress网站,以便只能通过HTTPS访问它。

Read the detailed steps here.

在此处阅读详细步骤

Your ECS instance should now have a secured and highly performant LEMP stack installed, with a domain configured, and a secure SSL certificate protecting visitors' information.

现在,您的ECS实例应已安装安全且高性能的LEMP堆栈,并配置了域,并具有保护访问者信息的安全SSL证书。

步骤4:在阿里云ECS实例上安装WordPress (Step 4: Installing WordPress on Your Alibaba Cloud ECS Instance)

In the fourth step, we will be installing WordPress via both by using wget/curl and the WordPress Command Line (WP-CLI). This is where you have a decision to make, as this tutorial is going to show you two different ways to install WordPress.

在第四步中,我们将同时使用wget/curl和WordPress命令行(WP-CLI)来安装WordPress。 这是您要决定的地方,因为本教程将向您展示两种不同的安装WordPress的方法。

Installing using curl and editing config files using nano is the common way. It is a trusty and reliable method, and worth going through in case you need to fall back on this method in the future. The alternative to curl is using WP-CLI, an awesome command line interface for WordPress. It's an incredible time saver, and, once you get used to it, you can use it to manage all your WordPress sites with an efficient workflow.

常见的方式是使用curl安装和使用nano编辑配置文件。 这是一种可靠且可靠的方法,值得一读,以防将来需要使用该方法。 curl的替代方法是使用WP-CLI,这是WordPress的出色命令行界面。 这是一个令人难以置信的节省时间的方法,一旦习惯了它,就可以使用它通过高效的工作流程来管理所有WordPress网站。

Read the detailed steps here.

在此处阅读详细步骤

步骤5:使用DirectMail处理WordPress交易电子邮件 (Step 5: Using DirectMail for WordPress Transactional Email)

In the previous steps we secured an Alibaba Ubuntu 16.04 ECS instance, installed a LEMP stack, configured our DNS and nameservers, and installed WordPress. So do we have a fully functional WordPress site? Well, not so fast.

在前面的步骤中,我们保护了阿里巴巴Ubuntu 16.04 ECS实例,安装了LEMP堆栈,配置了DNS和名称服务器,并安装了WordPress。 那么,我们有功能齐全的WordPress网站吗? 好吧,不是那么快。

One of the things with cloud hosting, with any provider, is that while you get a fast server you don't have things like email functionality automatically configured and provided by the hosting provider. Right now, our WordPress site can't send transactional emails for it to be fully functional.

对于任何提供商,云托管的一件事就是,当您获得一台快速服务器时,托管提供商不会自动配置和提供诸如电子邮件功能之类的东西。 目前,我们的WordPress网站无法发送交易电子邮件,因为它无法正常运行。

Alibaba Cloud’s DirectMail service is the perfect choice for this functionality. In this step, we will setup DirectMail as the SMTP provider for our WordPress application's transactional emails.

阿里云的DirectMail服务是此功能的理想选择。 在此步骤中,我们将DirectMail设置为WordPress应用程序的交易电子邮件的SMTP提供程序。

Read the detailed steps here.

在此处阅读详细步骤

结论 (Conclusion)

By following the steps above, we have successfully installed WordPress on a highly performant LEMP stack using an Alibaba Cloud ECS instance. Our WordPress application is also equipped with email functionality; we can subscribe new users, send email notifications, and change passwords by email.

按照上述步骤,我们已使用阿里云ECS实例成功将WordPress安装在高性能LEMP堆栈上。 我们的WordPress应用程序还配备了电子邮件功能; 我们可以订阅新用户,发送电子邮件通知以及通过电子邮件更改密码。

To make sure Alibaba Cloud DirectMail is correctly set up as the SMTP provider for our WordPress site, you can just visit your inbox and check to make sure you received the email.

为确保将阿里云DirectMail正确设置为我们的WordPress网站的SMTP提供程序,您只需访问您的收件箱并检查以确保您已收到电子邮件。

That’s it! We now have WordPress up and running and fully functional on an Alibaba Cloud stack. For more tutorials, visit the official Getting Started page on Alibaba Cloud.

而已! 现在,我们已经在阿里云堆栈上启动并运行了WordPress,并且功能全面。 有关更多教程,请访问阿里云上的官方入门页面

翻译自: https://www.sitepoint.com/5-steps-to-installing-wordpress-with-lemp-on-alibaba-cloud/

lemp wp

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值