00:00
从这节课开始呢,我们就来学习第七章sheding fair proxy,那么sheding fair proxy在前面第二章的学习当中,我们知道它呢实际上是一个数据代理的一个角色,和faird b不同,Faird bc呢是以一个包的形式集成在Java应用程序当中的,而proxy呢是独立的一个应用程序,需要独立安装,所以这节课呢,我们先来看一下setting fair proxy如何安装在我们的服务器当中,那么它一共有三种获取方式,第一种方式呢是直接获取二进制发布包。解压启动就可以了,第二种呢是使用docker的形是安装,第三种呢是helpm的形式,那我们呢,将会讲解两种常见的方式,第一种是二进制的形式,第二种呢是docker的形式,好,这堂课我们先来说一下二进制发布包的形式,首先呢,我们需要访问的官方网。
01:05
好,我们打开浏览器。还是像之前一样访问she fair的官方网站?那么在这个地方呢,有一个快速入门,快速入门当中呢,有一个she fair proxy,那么这个里面呢,给我们提供了三种形式的安装方式,我们先来看二进制发布包的形式。那么这个是二进制发布包的一个启动和使用的一个步骤,那当然了,第一件事情呢,我们要做的其实是下载,所以呢,我们需要点击这个下载菜单,然后在这个地方呢,下载proxy的二进制包。那么你点击这个T这个链接就可以下载二进制包了,但是这个地方显示的是5.1.0的版本,而我们现在讲解的呢,是5.1.1的版本哈,所以呢,我们可以在这个地方点击全部版本。
02:02
好,那么在这个地方呢,找到5.1.1。所以你需要下载的是这个文件。把它下载下来就可以了,当然我在资料当中呢,也给大家提供了已经下载好的。这个二进制包,所以呢,你也可以直接使用这个,那这个二进制包呢,它既可以运行在Linux操作系统上,又可以运行在Windows操作系统上,所以如果你想把它运行在Linux操作系统上的话呢,那么你就把它上传到Linux系统上的某一个目录当中,比如说OPT目录,然后进入OPT目录,使用这个命令呢,对二进制包进行解压就可以了,那如果是在Windows系统上进行解压呢?我来给大家进行一个演示。我们右键大家尽量不要用7Z这种东西解压哈,因为它解压出来的文件名呢,尤其是那个炸包呢,它容易丢失后缀,比如说有一些炸包呢,它后面的后缀呢或缺失啊,比如说本来应该是ABC点炸,结果呢,它的文件名就变成了ABC.ga或者是ab.GA或者甚至是ABC等等等等,总之呢,用7Z解压这种文件呢,会。
03:20
有一些问题,那么如果你在Windows解压的话呢,建议大家用win IR,那我们把它解压到当前文件夹。夹完了之后呢,我们把它打开,这个呢就是she fair proxy的一个目录了,那么在这个目录当中呢,有这样的一些子目录,首先B里面呢有启动程序,那么这个呢是在Windows系统当中的启动程序,这个呢是在linus系启统当中的启动程序,那么在Windows系统当中关闭服务的话,我们直接把服务窗口关闭就好了,在linus系统当中关闭服务呢,我们用这个stop命令好,然后接下来呢是conig,这里面呢是一些核心的配置文件,后面呢我们会讲解,然后呢是内部,内部里面呢是整个应用程序运行的时候呢,需要的一些依赖好。
04:14
接下来呢,在启动之前,我们还要做两件事情,第一件事情呢,就是把我们的MYL驱动添加到应用程序的ext内部目录中,所以呢,我们需要创建一个ET内部目录。那么在这个位置。然后呢,把。给大家准备好的买驱动。放到这个ext内部目录里面。接下来我们还要修改config下面的server配置好。我们找到con目录,找到里面的server,那很显然这是一个服务器的核心配置。
05:02
我们把它。在ID plus当中打开。这里面有个我们把它放开。Ity,这个是用户认证相关的配置,那这块是users,我们配置可以登录到X代理服务器上的用户名,那么这个里面给了我们两个示例啊,比如说我们用root这个用户,那这个意思呢,就是在任何服务器上百分号都可以访问这个代理服务器,那这呢是它的密码,所以这是用户名,这是密码,这呢是在任何远程服务器上都可以访问。那provider后面我们把type放开,意思呢,就是当前的这个用户呢,拥有所有的访问权限,好,然后接下来呢,我们在。下面这个props这个位置可以看到呢,有非常多的属性,那么我们呢,配置circle show等于true,目的呢就是为了打印,然后接下来我们就可以启动这个应用程序了,但是建议大家在启动应用程序之前呢,把这个目录呢放在一个非中文目录下啊,我们把它剪切出去,我放在D盘直接。
06:24
然后呢,我打开B目录,进入到CMD。命令行窗口当中,我们执行start.bat它的默认端口号呢是3307,当然了,如果你想去修改它的默认端口号,比如说我想修改成3321,那么直接追加到启动命令行之后就可以了,如果不追加的话呢,那么就是3307,那么我们回车。那现在呢,他已经在3321这个端口上启动了。
07:00
好,当你看到successfully的时候呢,就说明这个服务器呢已经启动成功了,然后呢,我们来进行一个访问,我们打开一个命令行窗口,那么我们访问fairx呢,就像访问买一样,直接使用和访问买一样的命令去访问就好了,所以这块是买circle。杠H,那么我的本机的IP地址是127.0.0.1啊,我还有一个IP地址呢,也是在当前的虚拟局域网内的IP地址是192.168。点100.1啊,因为这个IP地址呢,和我的虚拟机的IP地址呢,在一个局域网内,所以我也可以用这个地址。杠P是指定端口号3321。杠u root杠小P指定密码好,密码呢是root。
08:04
好,那么当你看到买circle这个命令提示符的时候呢,就说明我们已经成功的访问到了fair proxy的服务器当中,那么我们可以使用一个show data basis一个命令呢,查看一下默认的数据库表,好,那么我们的sheding fair proxy呢,已经安装并启动成功了,那目前为止这个proxy服务呢,有一个问题就是如果我们使用S要直接进行一个客户端的连接的话呢,它没有办法连接,必须得下载特定版本的S,那这块呢,我就不去下载了,我们直接呢,其实最方便的方式呢,还是用命令行的方式来访问。
我来说两句