因爲pfSense的軟件倉庫的服務器位於國外,國內用戶會常常遇到沒法安裝的狀況。本文以安裝haproxy插件爲例,介紹在pfSense上安裝離線軟件包的方法。php
導航到系統>插件管理>可用插件,找到haproxy插件所在的行,查找軟件包名稱和依賴包。能夠看到插件依賴關係的包爲 haproxy18-1.8.25,點擊0.60_6,在轉到的github.com頁面上能夠找到軟件包的名稱爲pfSense-pkg-haproxy,對應軟件版本,則軟件包全名爲pfSense-pkg-haproxy-0.60_6.txz。git
在pfSense的軟件包倉庫下載對應版本的離線軟件包,一些共用的依賴包能夠在FreeBSD的軟件倉庫找到。咱們要下載的軟件包包括:github
導航到系統診斷>SHELL命令,將下載的三個軟件包上傳到pfSense的tmp目錄shell
使用Xshell等軟件,進入pfSense的shell環境,進入上傳文件所在的目錄:服務器
cd /tmp
按照先安裝依賴包,再安裝pfSense軟件包的順序進行安裝,依次執行如下命令:ide
pkg install lua53-5.3.5_3.txz pkg install haproxy18-1.8.25.txz pkg install pfSense-pkg-haproxy-0.60_6.txz
遇到以下提示,一概點"y"this
Proceed with this action? [y/N]:
最後一條命令執行完成後以下所示:lua
[2.4.5-RELEASE][admin@JXGS.201]/tmp: pkg install pfSense-pkg-haproxy-0.60_6.txz Updating pfSense-core repository catalogue... pfSense-core repository is up to date. Updating pfSense repository catalogue... pfSense repository is up to date. All repositories are up to date. Checking integrity... done (0 conflicting) The following 1 package(s) will be affected (of 0 checked): New packages to be INSTALLED: pfSense-pkg-haproxy: 0.60_6 [unknown-repository] Number of packages to be installed: 1 Proceed with this action? [y/N]: y [1/1] Installing pfSense-pkg-haproxy-0.60_6... Extracting pfSense-pkg-haproxy-0.60_6: 100% Saving updated package information... done. Loading package configuration... done. Configuring package components... Loading package instructions... Custom commands... Executing custom_php_install_command()...done. Menu items... done. Services... done. Writing configuration... done.
至此,離線軟件包安裝完畢。插件
導航到系統服務>Haproxy,就能夠進行各項設置了。component
經過這種方式安裝的軟件包,在系統>插件管理>已安裝插件處是沒法查詢的,也就沒法卸載。能夠在shell下,使用如下命令手動刪除:
pkg remove pfSense-pkg-haproxy
命令執行後以下所示:
[2.4.5-RELEASE][admin@JXGS.201]/tmp: pkg remove pfSense-pkg-haproxy Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages (of 0 packages in the universe): Installed packages to be REMOVED: pfSense-pkg-haproxy: 0.60_6 Number of packages to be removed: 1 Proceed with deinstalling packages? [y/N]: y [1/1] Deinstalling pfSense-pkg-haproxy-0.60_6... Removing haproxy components... Menu items... done. Services... done. Loading package instructions... Deinstall commands... done. Syslog entries... done. [1/1] Deleting files for pfSense-pkg-haproxy-0.60_6: 100% Removing haproxy components... Syslog entries... done. Configuration... done.