Plesk 教程
本小节将带您了解如何通过Plesk执行最重要的主机任务。在教程结束时您将会创建一个功能性的网站,添加了数据库和邮件帐户,同时还学会了如何管理 DNS 记录以及备份网站。
第 1 步. 创建您的第一个网站
若要设置您的第一个网站,您需要按照下面的步骤操作:
- 注册一个域名。
- 在 Plesk 中添加一个域名。
- 创建您的网站。
注册一个域名
考虑把域名作为贵公司的地址。您的客户将可以通过它在线找到您,因此要选择一个好的域名。最佳域名应简短、方便输入和记忆。域名示例: example.com 。可以通过一个域名注册商注册域名。您的主机提供商通常也能帮您实现域名注册。Web 主机服务通常与域名注册服务绑定,反之亦然。
注解: 如果您是 web 主机客户,请务必在您的名下通过您的主机提供商注册域名。否则,您将来要更改主机提供商时可能会遇到麻烦。
在 Plesk 中添加域名
如果您是 web 主机客户,您的提供商很有可能已经为您添加了第一个域名。如果没有,请联系您的提供商。如果您是使用高级用户视图的 web admin,在 Plesk 初始化设置的过程中您已经配置您的第一个订阅。在 Plesk 中添加一个域名能够让您上传内容,使用 Sitejet Builder,或安装内容管理系统。
You can add more domains, but for the purpose of this section, your first domain will suffice.
创建您的网站
There are several ways to create the content for your website. Each has its advantages and disadvantages. Here are some of the most used options:
- Employ a professional designer and upload content. This option guarantees you will get exactly what you want. However, it is also the most expensive one. The web designer will provide you with the files you will need to upload to your hosting account. You can do it using FTP or File Manager. To learn how to do this, see the Upload Content section.
- Deploy a website using Git. You can also collaborate with a web designer and use the Git version control system for maintaining your website. You will link and synchronize your website to a remote or local repository that your web designer can maintain. To learn how to do this, see the Deploy using Git section.
- Use Sitejet Builder. The Sitejet Builder tool that comes bundled with Plesk enables you to create websites using a web interface. Sitejet Builder’s Content Management System (CMS) provides a visual editor and template set that allows you to create web pages, add content, and edit settings such as your website’s name, keywords, and icons. You can use one of the provided templates to create a professional-looking website in a matter of minutes. To learn how to do this, see the Create your Website in Sitejet Builder section.
- Use a content management system. Content management systems (CMS for short) are third-party applications that enable you to create and maintain a website. They are highly versatile, and come with a large number of optional add-ons. CMS offer a greater degree of customization compared to Sitejet Builder, but demand more technical knowledge from the user. To learn how to use a CMS, see the Install a Content Management System section.
选项 A. 上传内容
如果您已经为网站编码,或者雇请了一名 web 设计师来帮您做,在网站上线前您需要上传网站内容到 Plesk。Plesk 配备使用 FTP 或文件管理器上传内容的选项。下面的说明阐述如何使用两者 - 选择最适合您的方案。
要通过 FTP 发布网站,请执行下列步骤:
- 下载一个 FTP 客户端程序。您可以选择任何一个喜欢的 FTP 客户端。如果您不知道选择哪个 FTP 客户端,您可以使用 FileZilla:
- 您可以在此处下载 FileZilla: https://filezilla-project.org/download.php?type=client
- 您可以在此处找到 FileZilla 文档: https://wiki.filezilla-project.org/Documentation
- 使用 FTP 客户端连接到服务器上的订阅。若要连接,您需要以下信息:
- FTP 服务器地址 FTP 地址应为 ftp://your-domain-name.com ,其中 your-domain-name.com 是站点的互联网地址。
- FTP username. This is identical to your system user name. Note that the system user name may differ from the username that you use for logging in to Plesk. To find what your system user name is, go to Websites & Domains > Hosting & DNS > Hosting. You will find it under Username. You can change your system user name if you wish.
- FTP password. This is identical to your system user password. If you do not know what your system user password is, go to Websites & Domains > Hosting & DNS > Hosting. You can reset the password under Password.
- 如果您启用了防火墙,那么请将 FTP 设置为“被动模式”。请参阅您的 FTP 客户端文档了解如何进入被动模式。
- 上传您的网站文件与目录至
httpdocs
目录。如果您使用 CGI 脚本,可把这些脚本放置cgi-bin
目录里。
要使用文件管理器发布网站,请执行下列步骤:
-
转到 网站与域名 > 域名 > 文件管理器 然后转到
httpdocs
目录。 -
点击
按钮然后执行以下操作:
-
如要上传单个文件,请点击 上传文件,找到然后选择您要上传的文件。
-
若要上传单个文件、多个文件或有文件的目录,请点击 上传目录 然后将文件或目录拖放到虚线框。
-
若不从您的电脑而要从其它的网站或 FTP 服务器上传文件,请点击 通过 URL 导入文件,指定文件的 URL,然后点击 导入。例如,URL 可以是
https://example.com/image.png
或ftps://user:password@example.com/example.tar
。注解: 文件管理器支持通过以下协议进行文件导入:HTTP、HTTPS、FTP 和 FTPS。根据协议,URL 路径中的用户名和密码可以是备选的或是强制性的。
您已上传文件。若是归档文件,您还有两个步骤。
-
-
点击与存档相对应的行,然后点击 提取文件。若目录包含其名称与打包在存档中文件的名称相匹配的文件,请选择“替换现有文件” 复选框。解压文件将会替换目录中的文件。
-
单击 确定 。
注解: 文件管理器可以从以下格式的存档提取文件:ZIP、RAR、TAR、TGZ 和 TAR.GZ。
It is possible that the website you have uploaded requires a database to function. To learn how to create a database, see the Create a database section.
Option B. Deploy using Git
Plesk allows you to integrate with Git – the most popular source code management system used by web developers. You can manage Git repositories and automatically deploy websites from these repositories to a target public directory. And you can use Git as a transport for initial publishing and further updates.
To deploy a website using Git:
- Go to Websites & Domains and click Git.
- In the Git Repositories on <your domain>, click Add Repository.
- Set up the Git repository.
Option C. Create your Website in Sitejet Builder
Sitejet Builder’s Content Management System (CMS) provides a visual editor and template set that allows you to create web pages, add content, and edit settings such as your website’s name, keywords, and icons.
Sitejet Builder is free and installed by default. If you do not see its icon on the “Adding New Domain” drawer or on the “Get Started” tab, your subscription does not have the “Access to Sitejet Builder” permission. Contact your hosting provider to resolve this issue.
Creating a website with Sitejet Builder:
- Go to Websites & Domains and click Add Domain.
- In the Adding New Domain menu, select Sitejet Builder.
- Enter the rest of your website’s information, then click Add Domain. Sitejet Builder’s Choose a template interface will open.
- Edit the website using the Sitejet Website Builder (CMS).
Using Sitejet Builder on a website that already exists:
- Go to Websites & Domains, and find the domain name of the website you want to edit.
- Select the domain card, then select the “Get Started” tab.
- Click Create Website.
- Select the template that best suits your website’s needs.
- Edit the website using the Sitejet Website Builder (CMS).
警告: Publishing a Sitejet Builder website will remove the files in the document root of your website and replace them with your Sitejet Builder files. We strongly recommend creating a backup of your website’s contents before you publish your Sitejet Builder changes to prevent issues.
在 Sitejet Builder 中创建网站意味着您不需要数据库。进入 下一个步骤 了解如何在 Plesk 中创建邮件帐户。
Option D. Install a Content Management System
To create a website using a CMS:
- Go to Applications and click Install next to the application you want to install.
- Set up the CMS of your choice.
Learn more about using content management systems.
请注意根据上面的说明安装 CMS 表示将会为您的网站自动创建一个数据库。进入 下一个步骤 了解如何在 Plesk 中创建邮件帐户。
第 2 步. 创建数据库
数据库是用于存储数据的关系结构。在现代的 web 主机中数据库是必不可少的,大部分流行的 CMS 需要数据库才能运行。Plesk 支持 MySQL、MSSQL 和 PostgreSQL 数据库服务器,能够让您添加、移除和访问数据库,以及管理数据库用户。
如果您的网站不需要数据库,请进入 下一个步骤 了解如何在 Plesk 中创建邮件帐户。
要创建数据库和数据库用户,请执行以下操作:
- 进入 数据库 > 添加数据库 。
- Enter the required information.
Step 3. Create an Email Account
邮件服务能够让互联网用户彼此发送邮件信息。Plesk 能够用作邮件服务器。还能够让您创建邮件帐户和管理它们,包括执行众多通用的邮件相关的操作。此类操作包括更改邮件帐户的密码,启用自动回复,等等。
如果您不需要创建邮件帐户,请进入 下一个步骤 了解如何在 Plesk 中添加自定义 DNS 记录。
若要创建一个邮件帐户,请如下操作:
- 转到 邮件 > 创建电子邮件地址 。
- Enter the required information.
第 4 步. 添加自定义 DNS 记录
DNS 记录帮助域名解析且帮助访问者在线到达您的网站。当在 Plesk 中创建一个域名时,则会自动添加所有必要的 DNS 记录。然后,Plesk 还能够让您添加自定义 DNS 记录,下面将对此进行阐述。
如果您不需要创建自定义 DNS 记录,请进入 下一个步骤 了解如何备份您的网站。
若要添加自定义 DNS 记录到域名的 DNS 区域,请转入 网站与域名 标签 > DNS 设置 > 添加记录 。
To add a custom DNS record to a domain’s DNS zone:
- Go to Websites & Domains and find the domain name of the website for which you want to add a custom DNS record.
- Select the domain card and, on the “Hosting & DNS” tab, click DNS.
- Click Add Record.
第 5 步. 备份您的网站
It is always recommended to keep a backup copy of your websites in case their configuration or content gets damaged or lost.
如果您不需要备份网站,请进入 下一个步骤 了解如何更改密码和注销 Plesk。
To access the backup function:
- Go to Websites & Domains and find the domain name of the website for which you want to manage backups.
- Select the domain card and, on the “Dashboard” tab, click Backup & Restore.
- Click Back Up.
第 6 步. 更改您的密码和注销
If you are a web hosting customer, it is likely that the password you use to log in to Plesk was set up for you by your hosting provider.
To change your login password:
- Click your user name at the top of the page and click Edit Profile.
- Enter the required information to change the password and click OK or Apply.
- After you change the password, you must log out of Plesk and log in again with the new credentials. Click your user name at the top of the page, then click Log out.
我们的教程到此结束。我们希望对您有所帮助,更希望您能够进一步了解 Plesk 和了解所有能够帮助您更轻松管理 web 主机帐户的方式。接下来的资源很有帮助:
- 本指南的 Plesk 功能详解 部分辅助教程进一步扩展阐述各个功能。
- Plesk 客户指南 包含有关 web 主机客户可用的所有 Plesk 功能的完整信息。
- Plesk 客户指南 包含有关服务器管理员可用的所有 Plesk 功能的完整信息。