Linux监控系统linux-dash安装和使用小结

1. 概况

Linux-dash是一个低开销的、基于Web的Linux服务器监控系统。

Linux-dash的界面采用了widget布局,它直观地展示了Linux服务器的当前整体概况,包括内存和磁盘使用情况、网络、安装软件、用户、运行进程等。

Linux-dash不是最先进的监控工具,它的优点在于容易部署,使用轻便。

2. 环境准备

我的操作系统环境是CentOS 6.4,已经预装了Apache 2.2.15。

如果系统没有安装Apache,就需要进行安装:

# yum install -y httpd

同样,如果系统没有安装PHP,就需要进行安装:

# yum install -y php

我的PHP版本是:5.3.3。

如果后续希望从外部浏览器访问,还需要设置防火墙。

最简单方法就是直接关闭防火墙:

# service iptables stop

# chkconfig iptables off

3. 安装linux-dash

下载linux-dash源码:

# cd /var/www/html

# git clone https://github.com/afaqurk/linux-dash.git

启动HTTP服务:

# service httpd start

4. 使用linux-dash

浏览器直接访问:http://10.111.121.38/linux-dash

就可以查看到Linux服务器的当前整体概况了,非常方便实用。


5. 设置密码保护

因为涉及到系统敏感信息,所以最好为该页面设置密码保护。

① 首先,编辑Apache配置文件,并新增如下内容:

# vi /etc/httpd/conf/httpd.conf

<Directory /var/www/html/linux-dash>

Options FollowSymLinks

AllowOverride All

Order allow,deny

allow from all

</Directory>

② 接下来,在linux-dash目录下新建.htaccess文件,并新增如下内容:

# vi /var/www/html/linux-dash/.htaccess

AuthType Basic

AuthName "Restricted Files"

AuthUserFile /var/www/html/linux-dash/.htpasswd

Require valid-user

③ 然后,为testuser这个用户设置密码:

# sudo htpasswd -c /var/www/html/linux-dash/.htpasswd testuser

④ 最后,重启HTTP服务:

# service httpd restart

再次访问linux-dash页面时,就需要输入正确的用户名和密码,才能够查看到Linux服务器的当前整体概况了。


参考资料:

1.《How To Install Linux Dash on Ubuntu 14.04》, https://www.digitalocean.com/community/tutorials/how-to-install-linux-dash-on-ubuntu-14-04
  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值