Google提供了许多工具和服务来改善和帮助全球各地的人们。谷歌云平台(Google Cloud Platform)是为人们设计的产品之一,他们喜欢探索更多的东西,而不仅仅是在谷歌搜索(Google Search)中寻找结果。我们可以通过多种方式使用Google Cloud Platform,其中之一就是在 Google Cloud Platform 上安装 WordPress。(installing WordPress on Google Cloud Platform.)– 该平台将作为服务器工作,您可以安装WordPress等应用程序。
Google Cloud Platform是Google用于其产品的云计算服务。第一个 365 天试用的费用为 300 美元。在此期间,您可以构建您的网站并在Google的服务器上运行它。在此期限之后,您需要根据软件和您为运行您的网站所包含的功能支付费用。
现在,如果您是初学者,对WordPress CMS(WordPress CMS)没有太多信息或知识,您可以选择此云服务器来托管您的网站并开始学习。这项服务是免费的,但您需要一张合适的信用卡(Credit Card)来创建一个帐户。
(Install WordPress)在谷歌云平台上(Google Cloud Platform)安装 WordPress
在开始之前,您应该知道拥有域不是强制性的。您将被分配一个可用作WordPress站点的 IP 地址。但是,您始终可以将域映射到您的服务器并使用域而不是 IP 地址。
要开始使用,请前往cloud.google.com并为自己创建一个帐户(create an account)。您需要输入您的姓名、地址和信用卡详细信息。根据该网站,谷歌(Google)将在一年后要求付款,而不是立即从您的卡中扣除。
接下来,打开控制台(Console)。您可以前往console.cloud.google.com/start,也可以单击当前页面上的控制台按钮。(Console)
现在,您需要一个项目。所以点击选择一个项目(Select a project)按钮。
您将收到一个弹出窗口,您必须在其中单击plus (+) 。在此之后,您需要输入项目名称 - 项目 ID 将自动创建。之后,可能需要一些时间来设置一些东西。
在屏幕上看到详细信息框后,单击左侧的Cloud Launcher选项。(Cloud Launcher )
在下一个屏幕上,您会发现一些可以安装在您刚刚创建的虚拟机上的应用程序。由于WordPress是一个博客CMS,您可以点击博客和 CMS(Blog & CMS )选项,也可以使用搜索框搜索WordPress 。现在,尝试查找WordPress(Google 点击部署)(WordPress (Google Click to Deploy))。
单击此选项后,您将看到一个按钮LAUNCH ON COMPUTE ENGINE。
单击(Click)它,片刻之后,您应该会找到一些类似的选项-
在这里,您可以看到部署(Deployment)名称、服务器(Server)位置或区域、机器(Machine)类型、RAM、管理员(Admin)电子邮件、磁盘(Disk)类型(SSD或标准(Standard))、磁盘(Disk)大小等。
除了这些选项,您还应该选中Allow HTTP Traffic和Allow HTTPS Traffic复选框。
点击Deploy按钮后,您需要等待几分钟才能完成安装。完成后,您将看到您的站点 IP 和所有其他详细信息,如下所示:
如果您单击 IP 地址,它将打开您新安装的WordPress站点。
将域添加到 Google Cloud Platform
如前所述,拥有域是可选的。如果您有一个域,并且希望将该域与WordPress安装一起添加到您的Google Cloud Platform,则需要按照以下步骤操作。
在仪表板上,(Dashboard,)单击VPC 网络(VPC Network)并选择外部 IP 地址(external IP addresses)。
在Type列中,您将看到Ephemeral。单击(Click)下拉菜单并选择静态(Static)。接下来,您需要为其保留一个名称。
完成该部分后,您必须启用Google Cloud DNS API。为此,请单击APIs & services并选择Library。在下一页上,搜索Google Cloud DNS并单击启用(Enable )按钮。
现在,返回仪表板(Dashboard)并转到Compute Engine > VM Instances。在此屏幕上,您将看到外部 IP(External IP)。将其复制到记事本(Notepad)中,因为您在下一步中需要它。供您参考,这是与您的站点地址相同的 IP。
接下来,转到网络服务(Network services)>云 DNS(Cloud DNS)。在此页面上,单击创建区域(CREATE ZONE )按钮。在这里,您必须输入以下详细信息:
- 区域名称:任何你想要的。
- DNS名称:您的域名没有WWW。
- 描述:用于快速识别区域的小描述。不过,这是可选的。
最后,您需要创建两个A 记录(A records),以便您可以打开您的域,无论是否有 www。为此,请单击添加记录设置(ADD RECORD SET )按钮并输入以下详细信息-
- DNS 名称:留空
- 资源记录类型:A
- 生存时间:5
- TTL 单位:分钟
- IPv4 地址(IPv4 Address):输入您之前复制的外部 IP 地址。
之后,再次单击添加记录设置(ADD RECORD SET)按钮。但这一次,在DNS 名称(DNS Name)框中输入 www 并使用与创建先前 A 记录相同的详细信息。
添加所有记录后,它应该如下所示 -
现在,您需要将NS 记录(NS records)添加到您的域注册商帐户。为此,请打开域注册商(Domain Registrar)帐户并相应地输入 NS 记录。不要从上面的图像中复制,因为它对你来说会有所不同。这些记录取决于您选择的服务器。
添加 NS 记录后,可能需要一些时间来传播。您可以查看此网站(this website)以了解您的DNS传播是否完成
重要笔记:(Important Notes:)
- 很少有人声称此Cloud DNS页面在(Cloud DNS)Firefox或Safari中不起作用。但是,如果您遇到任何此类问题,请尝试使用Google Chrome的(Google Chrome)隐身(Incognito)模式。
- 如果您选择Google Click to Deploy版本的WordPress,您可能无法使用FTP帐户。因此,很难从WordPress安装目录下载任何文件。您应该选择其他几个管理工具附带的“ WordPress Certified by Bitnami”。(WordPress)
希望(Hope)您可以按照这些步骤在Google Cloud Platform上安装(Google Cloud Platform)WordPress ,而不会出现任何错误。
相关阅读:(Related reads:)
- 如何在 Microsoft Azure 上安装和设置 WordPress(How to install & setup WordPress on Microsoft Azure)
- 如何使用 Microsoft IIS 托管 WordPress 博客
- 使用 Microsoft WebMatrix 创建 WordPress 网站
- 如何在 Windows PC 上安装 WordPress。
How to install WordPress on Google Cloud Platform
Google рrovides a lot of tools and services to improνe and help people around the globe. Google Cloud Platform is one оf the products that is made for people, who love to explorе something more other than јust looking for results in Google Sеarch. There are mаny ways we can make use оf Google Cloud Platform – and one of them is installing WordPress on Google Cloud Platform. – The platform will work as a server, and you can install an application such as WordPress.
Google Cloud Platform is a cloud computing service that Google uses for their products. It costs $300 for the first 365 days trial. In that period, you can build your site and run it on Google’s server. After this period, you need to pay a fee based on the software and the features you have included to run your site.
Now, if you are a beginner, who doesn’t have much information or knowledge about the WordPress CMS, you can opt for this cloud server to host your website and start learning along the way. This service is free, but you need a proper Credit Card to create an account.
Install WordPress on Google Cloud Platform
Before getting started, you should know that having a domain is not mandatory. You will be assigned an IP address that would work as a WordPress site. However, you can always map a domain to your server and use the domain instead of the IP address.
To get started, head over to cloud.google.com and create an account for yourself. You need to enter your name, address and the credit card details. According to the website, Google will ask for the payment after one year instead of debiting your card right away.
Next, open the Console. You can either head over to console.cloud.google.com/start or you can click on the Console button on the current page.
Now, you need a Project. So click on Select a project button.
You will receive a popup, where you have to click on the plus (+) sign. After this, you need to enter a project name – and a project ID will be created automatically. Following that, it may take a couple of moments to set up a few things.
After you see a detailed information box on your screen, click on the Cloud Launcher option on the left-hand side.
On the next screen, you will find some apps those can be installed on the virtual machine that you have just created. As WordPress is a blog CMS, you can click on the Blog & CMS option, or you can search for WordPress using the search box. Now, try to find WordPress (Google Click to Deploy).
After clicking on this option, you will see a button LAUNCH ON COMPUTE ENGINE.
Click on it, and a couple of moments later, you should find some options like these-
Here, you can see the Deployment name, Server location or Zone, Machine type, RAM, Admin email, Disk type (SSD or Standard), Disk size, etc.
Apart from these options, you should also select the checkbox of Allow HTTP Traffic and Allow HTTPS Traffic.
After hitting the Deploy button, you need to wait for few minutes for the installation to complete. After finishing, you will see your site IP and all the other details as follows:
If you click on the IP address, it will open your newly installed WordPress site.
Add domain to Google Cloud Platform
As mentioned before, having a domain is optional. If you have a domain and you want to add that domain to your Google Cloud Platform alongside the WordPress installation, you need to follow the following steps.
On the Dashboard, click on VPC Network and select external IP addresses.
In the Type column, you will see Ephemeral. Click on the drop-down menu and select Static. Next, you need to reserve a name for it.
Having done that part, you have to enable Google Cloud DNS API. To do this, click on APIs & services and select Library. On the next page, search for Google Cloud DNS and click on the Enable button.
Now, come back to the Dashboard and go to Compute Engine > VM Instances. On this screen, you will see the External IP. Copy it to your Notepad since you need it in the next step. For your information, this is the same IP as your site address.
Next, go to Network services > Cloud DNS. On this page, click on CREATE ZONE button. Here, you have to enter these details:
- Zone name: anything that you want.
- DNS name: your domain name without WWW.
- Description: a small description to identify the zone quickly. This is optional, though.
Finally, you need to create two A records so that you can open your domain with and without www. To do this, click on ADD RECORD SET button and enter the following details-
- DNS name: let it be blank
- Resource Record Type: A
- TTL: 5
- TTL Unit: minutes
- IPv4 Address: enter your external IP address that you copied earlier.
After that, again click on the ADD RECORD SET button. But this time, enter www in the DNS Name box and use the same details you have used to create the previous A record.
After adding all the records, it should look like this-
Now, you need to add NS records to your domain registrar account. To do so, open the Domain Registrar account and enter the NS records accordingly. Do not copy from the above image since it would be different for you. These records depend on the server you choose.
After adding the NS records, it may take some time to propagate. You can check out this website to find out if your DNS propagation is done or not
Important Notes:
- Few people claimed that this Cloud DNS page is not working in Firefox or Safari. However, if you get any such a problem, try using the Incognito mode of Google Chrome.
- If you choose Google Click to Deploy version of WordPress, you may not be able to use an FTP account. It would, therefore, be difficult to download any file from your WordPress installation directory. You should choose “WordPress Certified by Bitnami” that comes with several other management tools.
Hope you can follow these steps and install WordPress on Google Cloud Platform without any error.
Related reads: