CentOS 7上安装部署RackTables多功能网络监控管理工具

1.介绍

Racktables是一个用来管理机房资产的开源工具,可以用来管理成百上千台的服务器及更多的IP和MAC地址。适用于机房和数据中心的服务器管理。

2.安装配置

安装教程参考:
https://github.com/RackTables/racktables/blob/maintenance-0.20.x/README.md

2.1.安装mariaDB

yum -y install MariaDB-server MariaDB-client  #yum安装MariaDB
systemctl start mariadb                #启动mariaDB
mysql_secure_installation                  #初始化安装

由于一开始安装MariaDB数据库后, root用户默认密码为空, 所以只需要按Enter键

Enter current password for root (enter for none):
#是否设置root用户的新密码
Set root password? [Y/n] y
#录入新密码
New password:
#确认新密码
Re-enter new password:
#是否删除匿名用户,生产环境建议删除
Remove anonymous users? [Y/n] y
#是否禁止root远程登录,根据自己的需求选择
Disallow root login remotely? [Y/n] n
#是否删除test数据库
Remove test database and access to it? [Y/n] y
#是否重新加载权限表
Reload privilege tables now? [Y/n] y

2.2. 启用 Unicode in the MySQL server

需要配置MariaDB对UTF-8中文的编码支持
add character-set-server=utf8 line to [mysqld] section of /etc/mysql/my.cnf file and restart mysqld

#在/etc/my.cnf的配置文件中增加“character-set-server=utf8”,退出保存,然后重新启动mysqld
Systemctl restart mysqld                    #重启mysql

2.3.安装 PHP and Apache httpd

安装php及相关组件,安装apache

yum install httpd php php-mysql php-pdo php-gd php-mbstring php-bcmath

2.4.关闭selinux及防火墙

systemctl stop firewalld            #停止防火墙
systemctl disable firewalld    #关闭防火墙自启动
Vim /etc/selinux/config修改如下行配置
SELINUX=disabled                #修改此参数

2.5.下载文件安装

官方网站:
https://www.racktables.org/
目前最新的版本为.20.14
下载文件

Wget https://jaist.dl.sourceforge.net/project/racktables/RackTables-0.20.14.tar.gz
tar -xvzf RackTables-0.20.14.tar.gz        #解压
cp -r RackTables-0.20.14 /usr/share/        #将文件保存在/usr/share目录下
mv RackTables-0.20.14/ RackTables      #将文件更名为RackTables
mkdir /var/www/html/racktables      #创建指定文件目录
ln -s /usr/share/RackTables/wwwroot/index.php /var/www/html/racktables#指定连接
Systemctl restart httpd                #重启apache

2.6.启动登录

systemctl start httpd #启动apache

在浏览器下访问http://address.to.your.server/racktables/

如下图所示:

这是提示需要执行安装程序,点击here继续

2.7.安装配置

配置一共分为7步,按照提示依次进行。

第一步:

第二步,检查组件

LDAP和https等可以以后再进行安装。

第三步:

提出报错。

网页中提示两条命令,

touch /usr/share/RackTables/wwwroot/inc/secret.php

chmod a=rw /usr/share/RackTables/wwwroot/inc/secret.php

然后网页提示,还需要执行selinux相关配置,可能是setenforce 0

setenforce 0

执行命令后,点击retry,继续。

提示你需要创建数据库,同时填写相关选项。

CREATE DATABASE racktables_db CHARACTER SET utf8 COLLATE utf8_general_ci;

CREATE USER racktables_user@localhost IDENTIFIED BY 'MY_SECRET_PASSWORD';

GRANT ALL PRIVILEGES ON racktables_db.* TO racktables_user@localhost;

填写完毕成功后,会出现如下提示:

第四步:

提示你修改文件的权限,命令如下:

chmod 004 /usr/share/RackTables/wwwroot/inc/secret.php

注意:

经过测试,发现只能将secret.php的权限设置为004,如果设置为400的话http就会出问题,估计是bug

第五步

第六步

设置管理员密码:

第七步

如何使用?

安装完成后,主界面如下图所示:

但是如何使用,需要仔细研究文档

以下是官方的wiki,要想会用,得花段时间

https://wiki.racktables.org/index.php/Main_Page

猜你喜欢

转载自www.linuxidc.com/Linux/2018-04/151979.htm