标签:kth admin httpd服务 出现 blank rest theme pre 数据
MariaDB主机 | 192.168.142.128/24 |
HOST1 | 192.168.142.135/24 |
HOST2 | 192.168.142.141/24 |
yum -y install mariadb mariadb-server httpd php php-mysql php-gd
#安装mysql服务端, httpd服务端, php --> php-gd 是 loganalyzer 需要使用的
systemctl start mariadb
GRANT ALL ON Syslog.* TO ‘sysloguser‘@‘192.168.142.%‘ INDENTIFIED BY ‘123456‘; FLUSH PRIVILEGES;
建立 rsyslog 数据库账号并授权;
vim /etc/my.cnf ###添加如下项目 skip_name_resolve = on innodb_file_per_table = on ####保存退出, 重启服务 systemctl restart mariadb
yum -y install rsyslog-mysql mariadb
# 安装mysql模块, 安装mysql客户端
mysql -usysloguser -p123456 -h192.168.142.128
# 测试是否可以连接上 --> 如果连接失败, 在mariadb服务器端重做授权; 检查服务器的防火墙和selinux是否关闭
查看rsyslog-mysql 这个包相关文件等:
[root@host1 ~]# rpm -ql rsyslog-mysql
/usr/lib64/rsyslog/ommysql.so --> rsyslog模块
/usr/share/doc/rsyslog-8.24.0/mysql-createDB.sql --> 此sql脚本即为上文提到的, rsyslog-mysql这个包提供的 建库脚本
mysql -usysloguser -h192.168.142.128 -p < /usr/share/doc/rsyslog-8.24.0/mysql-createDB.sql
检查库建立是否成功:
vim /etc/rsyslog.conf ####MODULES#### $ModLoad ommysql --> 加载ommysql模块以支持功能 ####RULES#### *.info;mail.none; :ommysql:192.168.142.128,Syslog,sysloguser,123456
MariaDB [(none)]> use Syslog
MariaDB [Syslog]> SELECT * FROM SystemEvents\G;
-21-[root@vm]16:07 ~ # mysql -usysloguser -h192.168.142.128 -p Enter password: ERROR 1045 (28000): Access denied for user ‘sysloguser‘@‘vm‘ (using password: YES)
-44-[root@vm]16:18 ~/loganalyzer-4.1.6 # ls ChangeLog contrib COPYING doc INSTALL src -45-[root@vm]16:18 ~/loganalyzer-4.1.6 # cp -r ./src /var/www/html/log -46-[root@vm]16:20 ~/loganalyzer-4.1.6 # cd /var/www/html/log -47-[root@vm]16:20 /var/www/html/log # ls admin chartgenerator.php cron export.php include js reportgenerator.php statistics.php userchange.php asktheoracle.php classes css favicon.ico index.php lang reports.php templates BitstreamVeraFonts convert.php details.php images install.php login.php search.php themes -48-[root@vm]16:20 /var/www/html/log # cd - /root/loganalyzer-4.1.6 -49-[root@vm]16:20 ~/loganalyzer-4.1.6 # ls ChangeLog contrib COPYING doc INSTALL src -50-[root@vm]16:20 ~/loganalyzer-4.1.6 # cp ./contrib/*.sh /var/www/html/log -51-[root@vm]16:21 ~/loganalyzer-4.1.6 # cd - /var/www/html/log -52-[root@vm]16:21 /var/www/html/log # ls admin chartgenerator.php convert.php details.php images install.php login.php search.php templates asktheoracle.php classes cron export.php include js reportgenerator.php secure.sh themes BitstreamVeraFonts configure.sh css favicon.ico index.php lang reports.php statistics.php userchange.php -53-[root@vm]16:21 /var/www/html/log # chmod +x *.sh -54-[root@vm]16:21 /var/www/html/log # ./configure.sh -55-[root@vm]16:21 /var/www/html/log # ./secure.sh -56-[root@vm]16:21 /var/www/html/log # chmod -x *.sh -57-[root@vm]16:21 /var/www/html/log # touch config.php;chmod 666 config.php
在第三步(Step 3),可以勾选, 并使用mysql做 loganalyzer 的用户数据库; 我们这里做测试就直接跳过了
标签:kth admin httpd服务 出现 blank rest theme pre 数据
原文地址:https://www.cnblogs.com/gettolive/p/9193228.html