本小節將帶您瞭解如何通過Plesk執行最重要的主機任務。在教程結束時您將會創建一個功能性的網站,添加了資料庫和郵件帳戶,同時還學會了如何管理 DNS 記錄以及備份網站。

第 1 步. 創建您的第一個網站

若要設定您的第一個網站,您需要按照下面的步驟操作:

  1. 註冊一個域名。
  2. 在 Plesk 中添加一個域名。
  3. 創建您的網站。

註冊一個域名

考慮把域名作為貴公司的地址。您的客戶將可以通過它線上找到您,因此要選擇一個好的域名。最佳域名應簡短、方便輸入和記憶。域名示例: 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 發佈網站,請執行下列步驟:

  1. 下載一個 FTP 用戶端程式。您可以選擇任何一個喜歡的 FTP 用戶端。如果您不知道選擇哪個 FTP 用戶端,您可以使用 FileZilla:
  2. 使用 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.
  3. 如果您啟用了防火牆,那麼請將 FTP 設定為“被動模式”。請參閱您的 FTP 用戶端文檔瞭解如何進入被動模式。
  4. 上傳您的網站檔與目錄至 httpdocs 目錄。如果您使用 CGI 腳本,可把這些腳本放置 cgi-bin 目錄裡。

要使用檔案管理員發佈網站,請執行下列步驟:

  1. 轉到 網站與域名 > 域名 > 檔案管理員 然後轉到 httpdocs 目錄。

  2. 點擊 image upload button 按鈕然後執行以下操作:

    • 如要上傳單個文件,請點按 上傳文件,找到然後選擇您要上傳的文件。

    • 若要上傳單個檔、多個檔或有檔的目錄,請點按 上傳目錄 然後將檔或目錄拖放到虛線框。

    • 若不從您的電腦而要從其它的網站或 FTP 伺服器上傳檔,請點按 通過 URL 導入檔,指定檔的 URL,然後點按 導入。例如,URL 可以是 https://example.com/image.pngftps://user:password@example.com/example.tar

      備註: 檔案管理員支援通過以下協議進行檔導入:HTTP、HTTPS、FTP 和 FTPS。根據協定,URL 路徑中的用戶名和密碼可以是備選的或是強制性的。

    image 77044

    您已上傳文件。若是存檔,您還有兩個步驟。

  3. 點按與存檔相對應的行,然後點按 提取文件。若目錄包含其名稱與打包在存檔中檔的名稱相匹配的檔,請選擇“替換現有檔” 核取方塊。解壓檔將會替換目錄中的檔。

  4. 點按 確定

    備註: 檔案管理員可以從以下格式的存檔提取檔: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:

  1. Go to Websites & Domains and click Git.
  2. In the Git Repositories on <your domain>, click Add Repository.
  3. Set up the Git repository.

image 77102

Learn more about deploying a website using Git.

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:

  1. Go to Websites & Domains and click Add Domain.
  2. In the Adding New Domain menu, select Sitejet Builder.
  3. Enter the rest of your website’s information, then click Add Domain. Sitejet Builder’s Choose a template interface will open.
  4. Edit the website using the Sitejet Website Builder (CMS).

Using Sitejet Builder on a website that already exists:

  1. Go to Websites & Domains, and find the domain name of the website you want to edit.
  2. Select the domain card, then select the 「Get Started」 tab.
  3. Click Create Website.
  4. Select the template that best suits your website’s needs.
  5. Edit the website using the Sitejet Website Builder (CMS).

image 77045

警示: 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:

  1. Go to Applications and click Install next to the application you want to install.
  2. Set up the CMS of your choice.

image 77046

Learn more about using content management systems.

Note that installing a CMS following the instructions above means that a database will be created for your website automatically. Proceed to the next step to learn how to create an email account in Plesk.

第 2 步. 創建資料庫

資料庫是用於存儲資料的關聯式結構。在現代的 web 主機中資料庫是必不可少的,大部分流行的 CMS 需要資料庫才能運行。Plesk 支援 MySQL、MSSQL 和 PostgreSQL 資料庫伺服器,能夠讓您添加、移除和存取資料庫,以及管理資料庫使用者。

如果您的網站不需要資料庫,請進入 下一個步驟 瞭解如何在 Plesk 中創建郵件帳戶。

要創建資料庫和資料庫使用者,請執行以下操作:

  1. 進入 資料庫 > 添加資料庫
  2. Enter the required information.

image 77047

Learn more about creating and managing database.

Step 3. Create an Email Account

郵件服務能夠讓互聯網使用者彼此發送郵件資訊。Plesk 能夠用作郵件伺服器。還能夠讓您創建郵件帳戶和管理它們,包括執行眾多通用的郵件相關的操作。此類操作包括更改郵件帳戶的密碼,啟用自動回復,等等。

如果您不需要創建郵件帳戶,請進入 下一個步驟 瞭解如何在 Plesk 中添加自訂 DNS 記錄。

若要創建一個郵件帳戶,請如下操作:

  1. 轉到 郵件 > 創建電郵地址
  2. Enter the required information.

image 77099

Learn more about creating and managing email accounts.

第 4 步. 添加自訂 DNS 記錄

DNS 記錄幫助域名解析且幫助存取者線上到達您的網站。當在 Plesk 中創建一個域名時,則會自動添加所有必要的 DNS 記錄。然後,Plesk 還能夠讓您添加自訂 DNS 記錄,下面將對此進行闡述。

如果您不需要創建自訂 DNS 記錄,請進入 下一個步驟 瞭解如何備份您的網站。

若要添加自訂 DNS 記錄到域名的 DNS 區域,請轉入 網站與域名 標籤 > DNS 設定 > 添加記錄

To add a custom DNS record to a domain’s DNS zone:

  1. Go to Websites & Domains and find the domain name of the website for which you want to add a custom DNS record.
  2. Select the domain card and, on the 「Hosting & DNS」 tab, click DNS.
  3. Click Add Record.

image 77100

Learn more about configuring DNS records.

第 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:

  1. Go to Websites & Domains and find the domain name of the website for which you want to manage backups.
  2. Select the domain card and, on the 「Dashboard」 tab, click Backup & Restore.
  3. Click Back Up.

image 77051

Learn more about managing backups.

第 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:

  1. Click your user name at the top of the page and click Edit Profile. image 77052
  2. Enter the required information to change the password and click OK or Apply.
  3. 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.

image 77053

我們的教程到此結束。我們希望對您有所幫助,更希望您能夠進一步瞭解 Plesk 和瞭解所有能夠幫助您更輕鬆管理 web 主機帳戶的方式。接下來的資源很有幫助:

  • 本指南的 Plesk 功能詳解 部分輔助教程進一步擴展闡述各個功能。
  • Plesk 客戶指南 包含有關 web 主機客戶可用的所有 Plesk 功能的完整資訊。
  • Plesk 客戶指南 包含有關伺服器管理員可用的所有 Plesk 功能的完整資訊。