使用网页浏览器远程监控Linux服务器性能
您是否正在寻找快速服务器统计监控脚本?如果是,那么这篇文章适合您。在这里,我们将解释Linux-dash,这是一个用PHP编写的、内存高效、低资源、易于安装的服务器统计监控脚本。
一个互联网静态网页允许您根据需要重新排列各种小部件。此脚本显示服务器的驻留记录,包括RAM、CPU、磁盘空间、网络连接、已安装程序、正在运行的进程等等。
Linux Dash 功能
Linux Dash 功能应如下所示:
- 这是一个轻量级且响应迅速的基于Web的服务器资源监控界面
- 易于在安装了Apache和PHP的服务器上安装
- 易于重新组织各种小部件
- 它支持各种Apache版本
安装前提条件
要使用Linux-Dash,需要预先安装工具和软件包。
- 安装了Apache的Linux操作系统
- PHP和PHP-json扩展
- Linux中的git安装
- 一个unzip实用工具
安装Apache、PHP和PHP模块
要在Linux系统中安装Apache,请使用以下命令:
$ sudo apt-get install apache2 apache2-utils
示例输出应如下所示:
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: apache2-bin apache2-data libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap Suggested packages: apache2-doc apache2-suexec-pristine apache2-suexec-custom The following NEW packages will be installed: apache2 apache2-bin apache2-data apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap 0 upgraded, 8 newly installed, 0 to remove and 44 not upgraded. Need to get 1,349 kB of archives. After this operation, 5,591 kB of additional disk space will be used. Do you want to continue? [Y/n] y .....
要在Linux系统中安装PHP,请使用以下命令:
$ sudo apt-get install php5 curl php5-curl php5-json
示例输出应如下所示:
Reading package lists... Done Building dependency tree Reading state information... Done curl is already the newest version. curl set to manually installed. The following extra packages will be installed: libapache2-mod-php5 php5-cli php5-common php5-readline Suggested packages: php-pear php5-user-cache The following NEW packages will be installed: libapache2-mod-php5 php5 php5-cli php5-common php5-curl php5-json php5-readline 0 upgraded, 7 newly installed, 0 to remove and 44 not upgraded. Need to get 4,893 kB of archives. After this operation, 20.6 MB of additional disk space will be used. Do you want to continue? [Y/n] y .....
要启动apache2,请使用以下命令:
$ sudo service apache2 start
示例输出应如下所示:
$ sudo service apache2 start * Starting web server apache2 *
下载和安装Linux-Dash
请注意,在下载Linux-Dash之前,请确保在您的Linux系统上安装了**git**软件包。
$ sudo apt-get install git-all
示例输出应如下所示:
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: cvs cvsps emacs emacs24 emacs24-bin-common emacs24-common emacs24-common-non-dfsg emacsen-common fgetty gawk git git-arch git-bzr git-cvs git-daemon-run git-doc git-el git-email git-gui git-man git-mediawiki git-svn gitk gitweb imagemagick-common libclass-factory-util-perl libclass-load-perl libclass-singleton-perl libcommon-sense-perl libdata-optlist-perl libdatetime-format-builder-perl libdatetime-format-iso8601-perl libdatetime-format-strptime-perl libdatetime-locale-perl libdatetime-perl libdatetime-timezone-perl libdbd-sqlite3-perl libdbi-perl libencode-locale-perl liberror-perl libfile-listing-perl libfont-afm-perl libgif4 libhtml-form-perl ......
要从**git**下载Linux Dash,请使用以下命令:
$ sudo git clone https://github.com/afaqurk/linux-dash.git
示例输出应如下所示:
Cloning into 'linux-dash'... remote: Counting objects: 3214, done. remote: Compressing objects: 100% (5/5), done. remote: Total 3214 (delta 0), reused 0 (delta 0), pack-reused 3209 Receiving objects: 100% (3214/3214), 3.33 MiB | 302.00 KiB/s, done. Resolving deltas: 100% (1890/1890), done. Checking connectivity... done.
以上命令将Linux-dash压缩文件下载到主目录。解压Linux-dash文件,并将内容复制并粘贴到/var/www/目录。现在,从任何一个Web浏览器打开本地主机。示例输出应如下所示:
系统基本信息应如下所示:
系统网络信息应如下所示:
基本账户信息应如下所示:
恭喜!现在,您知道“如何使用Web浏览器远程监控Linux服务器性能”。我们将在下一篇文章中学习更多关于这些类型命令的知识。继续关注!
广告