宝塔linux面板环境-安装LookingGlass网络测试程序详细教程

教程大全LookingGlass,LookingGlass安装,LookingGlass报错,测速,网络测试

今天帮一个网友测服务器的网络,装了下LookingGlass,然后发现还没有写过LookingGlass的安装教程。特此写一下。

本教程环境:

宝塔linux面板(nginx+PHP5.6)

操作系统:centos 6.9

github地址:LookingGlass

搭建好之后如图:

说明:该程序在测试时候会测试完才显示测试结果,所以你填入IP,点击后面的测试后会一直停在那。慢慢等结果即可。

另外,做路由追踪类似的测试时候,如果后面都是相同的空结果,他会省略掉后面信息。如下图,后面路由全是空的,它就自动省略了,如果最后有结果的话会显示的。

教程开始:

1.下载程序并上传到网站目录并解压

解压后默认文件是在LookingGlass-master目录内,将目录内的程序文件全部移到网站根目录

移动后目录结构如下图:

2.链接SSH开始安装

链接SSH后进入网站的LookingGlass目录内。

示例:

cd /www/wwwroot/134.122.135.13/LookingGlass

3.运行安装脚本

bash configure.sh

4.设置LookingGlass

1.开始会先下载一些基本依赖程序,然后问你是否要安装LookingGlass?

Do you wish to install LookingGlass? (y/n):

我们输入y,回车开始安装。

2.装了一会会问测速网站要显示的名字

Enter your website name (Header/Logo) []:

这个自己输入吧,建议英文

3.又让你输入网站地址,这个地址是包括http的地址

Enter the public URL to this LG (including http://) []:

比如输入:http://134.122.135.13

4.输入服务器所在地

Enter the servers location []:

自己输,输入后会在测速网站的下图位置显示。

5.输入服务器IP

Enter the test IPv4 address []:

就是你装这个程序的服务器的IP。

6.输入IPV6地址,没有的话直接回车跳过

Enter the test IPv6 address (Re-enter everytime this script is run) []:

7.输入测试文件大小

Enter the size of test files in MB (Example: 50MB 100MB 1000MB) []:

可以输入单个,比如100MB

也可以输入多个,比如100MB 1000MB中间用空格隔开即可,输入完回车

8.是否要启用网络速度的限制?

Do you wish to enable rate limiting of network commands?

输入y就是要限制,这里我们输入n不限制速度。

9.输入主题名称

Enter the name of the theme (case sensitive) [cerulean]:

这个不用输入,直接回车下一步。

10.输入服务器用户名

Enter the username of your webserver (E.g. www-data):

我们输入www用户

11.输入服务器的用户组

Enter the user group of your webserver (E.g. www-data):

这个也输入www即可。回车后就开始自动安装设置了。无需其他操作。

以上几步的截图:

不好意思,前面几步的我忘截图了。

安装完毕后即可关闭SSH。

5.设置PHP禁用函数

此程序会使用proc_get_status()函数和proc_open()两个函数,在网站对应的PHP版本中从禁用函数里删掉即可。

如果你不删除,在实际使用时就会报下面两个错误:

Warning: proc_get_status() has been disabled for security reasons in /www/wwwroot/134.122.135.13/LookingGlass-master/LookingGlass/LookingGlass.php on line 261

Warning: proc_open() has been disabled for security reasons in /www/wwwroot/134.122.135.13/LookingGlass-master/LookingGlass/LookingGlass.php on line 184

Unauthorized request

6.关闭nginx的GZIP压缩

防止测速文件传输时被nginx压缩导致测速结果错误。

Posted by 柴郡猫