Racktables(一)的资产管理软件安装配置

一.服务器环境介绍:

Lnmp环境:

[root@file ~]# cat /etc/redhat-release 
CentOS release 6.9 (Final)
[root@file ~]# nginx -v
nginx version: nginx/1.12.0
[root@file ~]# mysql -V
mysql  Ver 14.14 Distrib 5.6.39, for linux-glibc2.12 (x86_64) using  EditLine wrapper
[root@file ~]# /usr/local/php/bin/php -v
PHP 5.5.36 (cli) (built: Dec 29 2017 23:03:56) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
with Zend Guard Loader v3.3, Copyright (c) 1998-2014, by Zend Technologies
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.

关闭iptables,关闭selinux

二.软件包下载:

cd /var/www/html/
wget https://sourceforge.net/projects/racktables/files/RackTables-0.21.1.tar.gz
[root@file html]# mv RackTables-0.21.1 it
[root@file html]# ls
it  RackTables-0.21.1.tar.gz
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.

三.Ngnx以及php-fpm.conf配置文件:

[root@file vhost]# cat /usr/local/nginx/conf/vhost/it.conf

server
{
  listen       8090;
  server_name  192.168.10.233;;
  index index.html index.htm index.php;
  root  /var/www/html/it/wwwroot;
  #limit_conn   crawler  20;    
  #error_page 404
  location ~ .*\.(php|php5)?$
  {
    #fastcgi_pass  unix:/tmp/php-cgi.sock;
    fastcgi_pass  127.0.0.1:9000;
    fastcgi_index index.php;
    include fastcgi.conf;
  }

  location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  {
    expires      30d;
  }
  location ~ .*\.(js|css)?$
  {
    expires      1h;
  }

  location /5998153NginxStatus
  {
    stub_status on;
    access_log   off;
  }
access_log  /home/wwwlogs/access.log;
}
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.

[root@file vhost]# cat /usr/local/php/etc/php-fpm.conf

[global]
pid = /usr/local/php/var/run/php-fpm.pid
error_log = /data/wwwlogs/fpm-err.log
log_level = notice
events.mechanism = epoll
;process.priority = -19

[www]
listen = 127.0.0.1:9000
listen.backlog = 65535
listen.allowed_clients = 127.0.0.1
listen.owner = apache
listen.group = apache
listen.mode = 0666
user = apache
group = apache
pm = dynamic
pm.status_path = /fpmstatus
pm.max_children = 1000
pm.start_servers = 48
pm.min_spare_servers = 24
pm.max_spare_servers = 96

access.format = "%R - %u %t %T \"%m %r%Q%q\" %s %f %d"
access.log = /data/wwwlogs/pool.access.log

request_terminate_timeout = 60
;request_slowlog_timeout = 2
;slowlog = /data/wwwlogs/fpm-slow.log
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.

重启服务
/etc/init.d/php-fpm restart
/etc/init.d/nginx restart

四.配置数据库

grant all on racktables.* to root@localhost;
grant all on racktables.* to root;
grant all on racktables.* to rackuser;
grant all on racktables.* to rackuser@localhost;
set password for rackuser@localhost=password('djjies321');
flush privileges;
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.

MYSQL设置触发器引起的权限问题报错:
You do not have the SUPER Privilege and Binary Logging is Enabled
解决办法:登陆MySQL

SET GLOBAL log_bin_trust_function_creators = 1;
参考地址:
 http://www.jb51.net/article/54635.htm

五.安装racktables

打开浏览器按设置输入地址,例如:http://192.168.10.233:8090进入安装界面,同时选择继续。如下所示。
Racktables(一)的资产管理软件安装配置_Racktables
Racktables(一)的资产管理软件安装配置_管理软件_02

下一步进入到环境检测界面,如果不需要用到snmp协议和LDAP extension可以忽略该提示,如果没有问题选择继续。如下图所示:

Racktables(一)的资产管理软件安装配置_Racktables_03
继续下一步出现报错:
提示按要求建立配置文件,主要是设定racktables的数据库连接。如下图所示
Racktables(一)的资产管理软件安装配置_资产_04

touch /var/www/html/it/wwwroot/inc/secret.php
chmod 666 /var/www/html/it/wwwroot/inc/secret.php
继续
Racktables(一)的资产管理软件安装配置_管理软件_05

Racktables(一)的资产管理软件安装配置_资产_06
继续提示报错
Racktables(一)的资产管理软件安装配置_Racktables_07
给secret.php文件授权apache权限(原因是nginx的启动用户是apache),
secret.php此文件为链接数据库的文件,所以为了安全要去掉执行权限

chown apache.apache /var/www/html/it/wwwroot/inc/secret.php
chmod 400 /var/www/html/it/wwwroot/inc/secret.php
  • 1.
  • 2.

Racktables(一)的资产管理软件安装配置_资产_08
Racktables(一)的资产管理软件安装配置_资产_09
Racktables(一)的资产管理软件安装配置_资产_10
Racktables(一)的资产管理软件安装配置_管理软件_11
Racktables(一)的资产管理软件安装配置_管理软件_12
Racktables(一)的资产管理软件安装配置_管理软件_13
Racktables(一)的资产管理软件安装配置_Racktables_14

到此处安装完成
安装过程参考博文:
 http://blog.51cto.com/waringid/1379486

posted @ 2018-03-25 20:53  勤奋的蓝猫  阅读(14)  评论(0编辑  收藏  举报  来源