1. 程式人生 > >Racktables(一)的資產管理軟件安裝配置

Racktables(一)的資產管理軟件安裝配置

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

關閉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

三.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;
 }

[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

重啟服務
/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;

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進入安裝界面,同時選擇繼續。如下所示。
技術分享圖片
技術分享圖片

下一步進入到環境檢測界面,如果不需要用到snmp協議和LDAP extension可以忽略該提示,如果沒有問題選擇繼續。如下圖所示:

技術分享圖片
繼續下一步出現報錯:
提示按要求建立配置文件,主要是設定racktables的數據庫連接。如下圖所示
技術分享圖片

touch /var/www/html/it/wwwroot/inc/secret.php
chmod 666 /var/www/html/it/wwwroot/inc/secret.php
繼續
技術分享圖片

技術分享圖片
繼續提示報錯
技術分享圖片
給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

技術分享圖片
技術分享圖片
技術分享圖片
技術分享圖片
技術分享圖片
技術分享圖片
技術分享圖片

到此處安裝完成
安裝過程參考博文:
http://blog.51cto.com/waringid/1379486

Racktables(一)的資產管理軟件安裝配置