pfSense安装离线软件包

因为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

  1. haproxy18-1.8.25.txz
  2. pfSense-pkg-haproxy-0.60_6.txz
  3. lua53-5.3.5_3.txz(在后面的安装过程当中,提示要有这个依赖包)

上传软件包

导航到系统诊断>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.
相关文章
相关标签/搜索