站长视角
用户至上

一个可以让用户执行测试命令的Web界面:LookingGlass一键安装脚本

LookingGlass大家可能都有点熟悉,因为很多主机商给的测试界面就是用LookingGlass搭建的,可以允许公众用户代表你的VPS服务器执行一些网络命令,比如hostmtrpingtraceroute、下载速度测试等,可以让人很清楚的知道VPS服务器的网络情况,这里整了个一键脚本,顺便说下手动安装教程。

截图

一个可以让用户执行测试命令的Web界面:LookingGlass一键安装脚本

脚本安装

Github地址:https://github.com/telephone/LookingGlass

脚本适用于Debian 8、9系统,且为纯净无Web环境的系统,本脚本自动签发SSL证书,运行前请先解析好域名到服务器。

运行命令:

wget https://www.moerats.com/usr/shell/LookingGlass_install.sh && bash LookingGlass_install.sh

期间会要求你输入域名,及LookingGlass配置信息。

请输入你的LookingGlass域名信息: lg.moerats.com  #输入你的域名

Do you wish to install LookingGlass? (y/n): y  #选择y开始安装
Enter your website name (Header/Logo) []:Vultr JP  #设置名称
Enter the public URL to this LG (including http://) []: https:lg.moerats.com  #输入域名网站
Enter the servers location []: Tokyo, Japan  #输入VPS服务器所在地
Enter the test IPv4 address []: 108.61.126.*  #输入服务器IP
Enter the test IPv6 address (Re-enter everytime this script is run) []:  #输入IPV6,没有就跳过
Enter the size of test files in MB (Example: 50MB 100MB 1000MB) []:  #输入测试文件大小,可同时输入多个
Do you wish to enable rate limiting of network commands? (y/n): n  #选择n
Would you like to choose a different theme? (y/n): y  #输入y选择其他主题
Enter the name of the theme (case sensitive) [bootstrap]:  #直接Enter默认
Enter the username of your webserver (E.g. www-data): root  #选择root
Enter the user group of your webserver (E.g. www-data): root  #选择root

最后等待完成后,打开域名即可。

如果获取SSL证书失败,提示Failed to connect to get.acme.sh port 443: Connection refused,可能是get.acme.sh抽风打不开,这时候我们可以从Github上安装acme.sh

apt-get install git socat netcat -y
git clone https://github.com/Neilpang/acme.sh.git
cd ./acme.sh
./acme.sh --install

然后再运行脚本即可。

手动安装

该方法适用于任何系统,特别是已经装了Web网站环境的。

1、安装Web环境
如果你已经安装了Web网站环境,则跳过这一步,没有就安装。

#请进入相应的安装界面进行操作,只需要安装Nginx、PHP。
宝塔面板:https://www.bt.cn/bbs/thread-1186-1-1.html
OneinStack:https://oneinstack.com/auto

2、安装LookingGlass
添加域名,然后进入网站根目录。将LookingGlass源码下到根目录。

#进入网站目录
cd /www/xx.com
#PHP5.x下载
wget https://www.moerats.com/usr/down/LookingGlass_php5.zip
#PHP7.x下载
wget https://www.moerats.com/usr/down/LookingGlass_php7.zip

#解压,如果是5.x,就将7改成5
unzip LookingGlass_php7.zip && mv LookingG/* ..
#开始配置LookingGlass
cd LookingGlass && bash configure.sh

步骤参考上面,然后打开域名或IP即可。

赞(2)
版权声明:本文采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权, 转载请注明出处。
文章名称:《一个可以让用户执行测试命令的Web界面:LookingGlass一键安装脚本》
文章链接:https://www.sshce.com/13258.html
【声明】:国外主机测评仅分享信息,不参与任何交易,也非中介,所有内容仅代表个人观点,均不作直接、间接、法定、约定的保证,读者购买风险自担。一旦您访问国外主机测评,即表示您已经知晓并接受了此声明通告。
【关于安全】:任何 IDC商家都有倒闭和跑路的可能,备份永远是最佳选择,服务器也是机器,不勤备份是对自己极不负责的表现,请保持良好的备份习惯。
香港110M(含10M CN2)大带宽独服限量促销,香港E3-8G-1T硬盘-3IP,月付仅799!

登录

找回密码

注册