在Mac上安裝Umbraco CMS

在Mac上安裝Umbraco CMS
How to install .Net CMS Umbraco on MAC

1) 安裝 dotnet SDK

下載並安裝 .NET 6.0 SDK (v6.0.301) https://dotnet.microsoft.com/en-us/download

2) 安裝 Visual Studio 2022 for mac

下載並安裝 Visual Studio 2022 for mac (v17.0)  https://visualstudio.microsoft.com/vs/mac/

3) 安裝 Umbraco 模板包

打開終端輸入命令: dotnet new -i Umbraco.Templates

Install Umbraco Template
.net Install Umbraco Template

4) 請求信任HTTPS開發證書

輸入命令: dotnet dev-certs https --trust,如果證書未被信任,在Run website的時候MAC OS 會不斷彈窗提示請求授權。

.net trusting the HTTPS development certificate
Trusting the HTTPS development certificate

5) 建立 Umbraco 項目並運行

打開「File」菜單,選擇「New Project...」 創建新項目。

Go to File > New Project ...

在項目模板選擇清單中選擇「Umbraco Project」 模板後,按下「Continue」按鈕。

Go to Web and Console > App Section, and select Umbraco Project, navigate to the next step by clicking Continue.

配置項目,如無特殊需求,這裡保留默認值即可。配置完成後按下「Continue」按鈕。

You are able to specify some project parameters like Target framework. The rest are optional.

繼續配置項目,設定項目名稱、存儲路徑等,然後按下「Create」按鈕,這樣Umbraco 項目就創建好了。

Solution Name 不能設置為 Umbraco, 這將導致命名空間衝突(namespace conflict)。
You will be able to give your project and solution a name.Refrain from naming your solution Umbraco, as this will cause a namespace conflict with the CMS itself. You can then click the Create button and your Umbraco Project will be ready for you.

點擊 ▶️ 按鈕運行 Umbraco CMS 網站,打開瀏覽器訪問站點 https://localhost:44330/

管理後台登陸地址:https://localhost:44330/umbraco#/login

You can now run the site like you would normally in Visual Studio.

延伸閱讀:

Y Cheung

Y Cheung

Blogger, Programer & Traveler.
Shanghai