如何在Digital Ocean VPS上安装cpanel / whm

by Michael Umanah

迈克尔·乌曼纳(Michael Umanah)

如何在Digital Ocean VPS上安装cpanel / whm (How to install cpanel/whm on a Digital Ocean VPS)

介绍 (Introduction)

In this article, I will be taking us through a step by step process of installing a cpanel/whm on a digital ocean VPS. Note that these steps can be used to install a cpanel/whm on any VPS, but for this post, I will be using a Digital Ocean VPS.

在本文中,我将逐步指导我们在数字海洋VPS上安装cpanel / whm。 请注意,这些步骤可用于在任何VPS上安装cpanel / whm,但是对于本帖子,我将使用Digital Ocean VPS。

Choosing a reliable hosting platform to use in hosting your projects can be a daunting task. I actually spent a good amount of time going through reviews and features before I finally agreed to go with Digital Ocean.

选择一个可靠的托管平台来托管您的项目可能是一项艰巨的任务。 在我最终同意使用Digital Ocean之前,我实际上花费了大量时间进行评论和功能。

为什么选择数字海洋 (Why Digital Ocean)
  • They have one of the best prices for their VPS — it’s as low as $5 per month.

    他们的VPS价格是最好的之一-每月低至5美元。
  • Nice admin UI

    不错的管理界面
  • Very responsive support

    响应Swift的支持
  • High performing servers.

    高性能服务器。
我们为什么要安装cpanel / whm (Why are we installing cpanel/whm)

Cpanel is a web-based server control panel that makes site management a piece of cake. It includes lots of features such as creating mails, server security, domain management, database, and so on, that simplify the work of a DevOps. You can see a demo of how it works by following this link.

Cpanel是基于Web的服务器控制面板,使站点管理变得轻而易举。 它包含许多功能,例如创建邮件,服务器安全性,域管理,数据库等,这些功能简化了DevOps的工作。 通过单击此链接,可以查看有关其工作原理的演示。

在Digital Ocean建立帐户 (Setting up an account with Digital Ocean)

First of all, you need to open an account with Digital Ocean. Signing up with this link, https://bit.ly/2JvuZ2V, will get a $10 credit deposited in your account for you to use, and it will also give me some referral credit. It’s really not much, but it’s better than nothing.

首先,您需要在Digital Ocean开设一个帐户。 使用此链接https://bit.ly/2JvuZ2V进行注册 ,将会获得10美元的信用额度存入您的帐户供您使用,并且还会给我一些推荐信用额度。 确实不多,但总比没有好。

If you’re a student or know someone who is, sign up to Github’s Student Pack, and you’ll get $50 extra to use on your Digital Ocean account.

如果您是学生或认识某人,请注册Github的学生包,您将获得$ 50的额外使用费,用于您的Digital Ocean帐户。

创建一个小滴 (Creating a droplet)

Once you are logged into your dashboard, go to the top right corner and click on the create button on the drop down, then select droplets.

登录仪表板后,请转到右上角,然后单击下拉菜单中的“创建”按钮,然后选择液滴。

Droplet is the name given to Digital Ocean servers, which you will use in installing and setting up the cpanel.

Droplet是Digital Ocean服务器的名称,您将在安装和设置面板时使用它。

It will then take you to a screen for you to choose an image. Click on centOS. We choose that because WHM/cPanel runs on a CentOS server.

然后将带您到一个屏幕,供您选择图像。 点击centOS。 我们之所以选择它,是因为WHM / cPanel在CentOS服务器上运行。

Scrolling down, you can choose the size of the droplet that you want. You can choose any configuration that you are okay with, but bear in mind that the minimum configuration for installing a cpanel as stated on the cpanel website is 1gb ram and 20gb disk space.

向下滚动,您可以选择所需液滴的大小。 您可以选择任何可以的配置,但请记住,如cpanel网站上所述,安装cpanel的最低配置是1gb ram和20gb磁盘空间。

You can also choose a block storage for your data back up.

您也可以选择块存储来备份数据。

Scrolling down, you will be asked to choose a datacenter Region. If you’re targeting a specific country with most of your websites, it’s helpful to have a local server close to where most of your users will be accessing your websites.

向下滚动,将要求您选择一个数据中心区域。 如果您将大多数网站定位到特定国家/地区,那么将本地服务器放置在大多数用户将要访问您网站的位置附近会很有帮助。

Further down, you can select additional options. Here I typically go with Private Networking, IPv6, and Monitoring.

再往下,您可以选择其他选项。 我通常在这里使用专用网络,IPv6和监视。

Make sure your hostname is HOSTNAME.YOURDOMAIN.COM

确保您的主机名是HOSTNAME.YOURDOMAIN.COM

Once you finalize, Digital Ocean will start creating your droplet and email you the SSH keys, giving you root access to your server.

完成确定后,Digital Ocean将开始创建您的Droplet并通过电子邮件向您发送SSH密钥,从而使您可以根访问服务器。

在小滴上安装Cpanel。 (Installing Cpanel on your droplet.)

Once you get the email, it means your server is now ready and you can start installing the cpanel/whm on it. You need to take note of the following things in the mail:

收到电子邮件后,这意味着您的服务器现已准备就绪,您可以开始在其上安装cpanel / whm了。 您需要在邮件中注意以下事项:

  • Droplet Name

    液滴名称
  • Droplet IP Address

    液滴IP地址
  • Droplet Username (which is going to be root)

    Droplet用户名(将是root)
  • Droplet Password (which you will be asked to changed on first login)

    Droplet密码(首次登录时将要求您更改)

We need to be able access our server remotely to run a few commands on it.

我们需要能够远程访问我们的服务器以在其上运行一些命令。

For Mac users, you can do this easily by using the terminal. Open up the terminal on your Mac, and type the following command.

对于Mac用户,您可以使用终端轻松完成此操作。 在Mac上打开终端,然后键入以下命令。

ssh root@162.345.323.09

The number above should be the droplet IP address that was sent to your email.

上面的数字应该是发送到您的电子邮件的Droplet IP地址。

It will then prompt you for the password which you can copy and paste, and then click enter.

然后,它将提示您输入可以复制和粘贴的密码,然后单击Enter。

Note that when typing or pasting the password, the field won’t show — so just click on enter after pasting it.

请注意,在输入或粘贴密码时,该字段不会显示-因此只需在粘贴后单击Enter。

For Windows users, I recommend using PuTTY (which you can download here). It’s a free software which you can use to gain shell access to a server.

对于Windows用户,我建议使用PuTTY(您可以在此处下载)。 它是一个免费软件,可用于获取对服务器的Shell访问。

After installing PuTTY and opening it, this is what you will see.

安装PuTTY并将其打开后,您将看到。

All you have to add here is your Host Name (or Droplet IP address) and click Open.

您只需在此处添加主机名(或Droplet IP地址),然后单击“打开”。

You’re going to log in as “root,” and then copy and paste the password you took note of earlier on.

您将以“ root”身份登录,然后复制并粘贴之前记下的密码。

Note: To copy and paste on Windows, simply right-click on your mouse and press enter. PuTTY doesn’t show your password for security reasons, but it’s there.

注意:要在Windows上复制和粘贴,只需右键单击鼠标并按Enter。 为了安全起见,PuTTY不会显示您的密码,但是它在那里。

By default, Digital Ocean is going to ask you to reset your password. Simply enter your current password, then your desired password, and press enter.

默认情况下,Digital Ocean将要求您重设密码。 只需输入当前密码,然后输入所需的密码,然后按Enter。

安装cPanel (Installing cPanel)

Installing cpanel is quite easy, we will just be running few commands on our server. We begin by preparing our server for cpanel installation by running the following command to install perl.

安装cpanel非常容易,我们将在服务器上运行几个命令。 首先,通过运行以下命令安装perl,为准备进行cpanel安装准备服务器。

sudo yum install perl

After installing perl, we need to take one more preliminary step. cPanel is very picky about making sure that server that it is installed on has a Fully Qualified Domain Name. To that effect, we need to provide it with a valid hostname. You can input a temporary one and then correct it once cPanel is installed.

安装perl之后,我们需要采取进一步的初步步骤。 cPanel对于确保安装在其上的服务器具有完全合格的域名非常挑剔。 为此,我们需要为其提供有效的主机名。 您可以输入一个临时的,然后在安装了cPanel后进行更正。

hostname  host.example.com

Note: the last command should be your own hostname.

注意:最后一个命令应该是您自己的主机名。

We are now done with the pre-installation, and so we will start the actual cpanel installation. We start by installing screen and wget.

现在我们已经完成了预安装,因此我们将开始实际的cpanel安装。 我们首先安装屏幕和wget。

sudo yum install screen wget

Once screen and wget are installed, we can start a new screen session by typing this.

安装好screen和wget后,我们可以通过键入以下内容来启动新的屏幕会话。

screen

After opening screen, we can then start installing cpanel using this command.

打开屏幕后,我们可以使用此命令开始安装cpanel。

wget -N http://httpupdate.cPanel.net/latest

Once this is done, we can start the script by typing the command.

完成此操作后,我们可以通过键入命令来启动脚本。

sh latest

The script might take 1 -3 hours to execute, so you just have to be patient until it’s done.

该脚本可能需要1 -3个小时来执行,因此您必须耐心等待直到完成。

设置新的cpanel帐户。 (Setting Up your new cpanel account.)

Wow, we finally have cpanel installed on the server. The next thing is to configure the basic settings on it.

哇,我们终于在服务器上安装了cpanel。 接下来是在其上配置基本设置。

访问您的服务器 (Accessing your server)

To access your server, go to https://YOUR DROPLET IP:2087 on your browser and enter your username and root password.

要访问服务器,请在浏览器上转到https://您的DROPLET IP:2087 ,然后输入用户名和root密码。

eg: https://162.345.323.09:2087

Once you are logged in, we need to now add the basic features to WHM and agree to their license terms.

登录后,我们现在需要向WHM添加基本功能并同意其许可条款。

Next, enter your contact email, and move on to the next step. You don’t have to change the other settings.

接下来,输入您的联系电子邮件,然后继续下一步。 您无需更改其他设置。

Skip the next step.

跳过下一步。

Make sure your Nameserver Configuration is set to BIND, and scroll down to select your nameservers.

确保将名称服务器配置设置为BIND,然后向下滚动以选择名称服务器。

Leave your FTP Server settings to be set to Pure-FTPD — this is the default setting on all cPanel systems. Once you’re done, move to the next step.

将您的FTP服务器设置保留为Pure-FTPD-这是所有cPanel系统上的默认设置。 完成后,转到下一步。

Select Use filesystem quotas and click Finish.

选择使用文件系统配额,然后单击完成。

And you’re done! WHM is now installed. Ready for you to start creating accounts and adding your domains.

大功告成! 现在已安装WHM。 准备开始创建帐户和添加域。

Cpanel / Whm许可证 (Cpanel/whm license)

To use cpanel/whm on your server, you will need to pay for a license. But since you are installing the cpanel on a new server with a new IP address, you will have a free trial for 15 days. After that, you will have to add a license or else you will be locked out of the whm.

要在服务器上使用cpanel / whm,您需要支付许可证费用。 但是,由于您将cpanel安装在具有新IP地址的新服务器上,因此您可以免费试用15天。 之后,您将必须添加许可证,否则您将被拒之门外。

Purchasing a VPS whm/cpanel license from cpanel will cost you $20 per month. But if you need to save some bucks, you can follow this link to buy the same license for just 15 dollars per month from “buy cpanel,” which is an authorized reseller for cpanel.

从cpanel购买VPS whm / cpanel许可证每月将花费您20美元。 但是,如果您需要节省一些费用,则可以单击此链接,以每月15美元的价格从“购买cpanel”(这是cpanel的授权经销商)购买相同的许可证。

After clicking on the link, remember to select the whm/cpanel VPS license, and then you can add any addon that you like. Then proceed to making your payment.

单击链接后,请记住选择whm / cpanel VPS许可证,然后可以添加所需的任何插件。 然后继续进行付款。

It’s really that easy. If you encounter any issue or suggestions while installing it, you can just add a comment and I will surely get back to you.

真的很容易。 如果您在安装时遇到任何问题或建议,只需添加一条评论,我一定会尽快回复您。

翻译自: https://www.freecodecamp.org/news/how-to-install-cpanel-whm-on-a-digital-ocean-vps-8146eb83f70a/

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值