最近由於項目須要,要找一款在線客服系統,折騰快一個星期,竟然找到一個寶藏,能夠直接下載私有化部署,經常使用功能比較齊全,可貴的是界面簡潔。把安裝部署過程分享一下。數據庫
這是第二篇,咱們開始配置服務器主程序json
![](http://static.javashuo.com/static/loading.gif)
下載升訊威在線客服系統:
https://go.shengxunwei.com/?linkid=dc259ced-59bc-47e3-91ab-ec43c081f647api
安裝部署比較簡單,準備好服務器,1個小時就搞定了,分4個步驟。瀏覽器
- 建立數據庫
- 配置服務器主程序
- 配置服務器資源站點
- 配置發佈客服端程序
===服務器
配置服務器主程序
確認已經將壓縮包中的「Resource」目錄和「Server」目錄拷貝到服務器上。
在本示例中,咱們把「Resource」目錄和「Server」目錄放在「C:\wwwroot\」下,其中「Server」文件夾爲服務器主程序。app
路徑中的文件夾名稱儘可能只使用英文構成,不要包含特殊字符和空格。網站
![](http://static.javashuo.com/static/loading.gif)
配置參數
- 找到「Server」目錄下的「appsettings.json」。
![](http://static.javashuo.com/static/loading.gif)
- 用記事本打開,找到「DefaultConnection」節點,配置數據庫鏈接。
最簡單經常使用的鏈接字符串配置格式爲
Server=服務器地址;database=數據庫名稱;Integrated Security=false;user id=sa;password=密碼3d
- Server 後面配置數據庫引擎地址,若是數據庫安裝在服務器上的,直接使用一個英文點號「.」便可。若是使用的是雲數據庫服務,填寫服務端提供給你的鏈接地址。
- database 後面配置數據庫名稱,如「KF」。
- password 後面配置安裝數據庫引擎時,輸入的 sa 帳戶密碼。
![](http://static.javashuo.com/static/loading.gif)
- 找到「Environment」節點,配置其下的幾個子節點中的信息。
- TcpIpAddress:填寫服務器 IP 地址。
- TcpPort:填寫給客服系統開放的通訊端口,如 9527。
- ResourceAddress:填寫靜態資源站點所使用的域名,注意不須要「/」結尾。
- HostAddress:填寫服務器主程序所使用的域名,注意不須要「/」結尾。
![](http://static.javashuo.com/static/loading.gif)
- 找到「Baidu」節點,在「AK」中配置「百度地圖開放平臺」所申請的應用程序 AK,用於根據訪客的 IP 地址判斷地域。
![](http://static.javashuo.com/static/loading.gif)
創建 IIS 站點
- 啓動 IIS,選擇服務器節點後,點擊「模塊」,確認已經包含了「AspNetCoreModuleV2」。
![](http://static.javashuo.com/static/loading.gif)
- 右擊「網站」節點,點擊「添加網站」。
![](http://static.javashuo.com/static/loading.gif)
- 在「添加網站」界面中,輸入「網站名稱」、「物理路徑」、「主機名」。點擊「肯定」。
- 主機名爲 kf-api 開頭的域名,如 kf-api.shengxunwei.com。
- IP 地址無需選擇。
- 若是已經導入了 SSL 證書,能夠將「類型」切換爲「https」,並選擇對應的證書。
![](http://static.javashuo.com/static/loading.gif)
- 在 IIS 中,選擇「應用程序池」,找到剛纔新建的「Server」。
![](http://static.javashuo.com/static/loading.gif)
- 雙擊「Server」,在彈出的界面中,選擇「無託管代碼」,點擊「肯定」。
![](http://static.javashuo.com/static/loading.gif)
- 點擊右側的「正在回收」,在彈出的窗口中,取消全部勾選,點擊「下一步」。
![](http://static.javashuo.com/static/loading.gif)
- 點擊「完成」。
![](http://static.javashuo.com/static/loading.gif)
- 點擊右側的「高級設置」,在彈出的窗口中,找到「閒置超時(分鐘)」,修改數值爲「0」。
![](http://static.javashuo.com/static/loading.gif)
初始化
- 在瀏覽器中訪問你的主程序域名,進入「Status」命令,如「kf-api.shengxunwei.com/Status」,看到相似如圖信息,表示安裝部署成功。
![](http://static.javashuo.com/static/loading.gif)
- 進入「Status/Setup」命令,初始化數據。
![](http://static.javashuo.com/static/loading.gif)
至此,服務器主程序安裝完畢。blog