CentOS   发布时间:2022-04-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了centos 7 配置 loganalyzer大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

0. 准备工作 操作系统:Centos 7.x loganalyzer 服务端:192.168.10.74 loganalyzer 客户端:192.168.10.71 systemctl stop firewalld.service  systemctl disable firewalld.service setenforce 0  sed -i '/SELINUX/s/enforcing/dis

0. 准备工作

操作系统:Centos 7.x

loganalyzer 服务端:192.168.10.74

loganalyzer 客户端:192.168.10.71


systemctl stop firewalld.service

systemctl disable firewalld.service

setenforce 0

sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config


1. 安装lamp环境并测试

yum -y install httpd PHP PHP-gd PHP-mcrypt PHP-MysqL mariadb-devel mariadb-server

systemctl start httpd.service

systemctl enable httpd.service

#创建测试页面

echo -e "<?PHP\nPHPinfo();\n?>" >/var/www/html/index.PHP

#进浏览器输入http://192.168.10.74

#如果不能显示测试页面,请返回重新检查以前步骤

#如果能显示测试页面删除index.PHP继续向下走

rm -f /var/www/html/index.PHP



2. 数据库的安全初始化

systemctl start mariadb.service

systemctl enable mariadb.service

MysqL_secure_installation

#Enter current password for root (enter for nonE):

#Change the root password? [Y/n]

#以下2步是让你输入密码,其它地方回车就可以了

#New password:

#Re-enter new password:

#Remove anonymous users? [Y/n]

#Disallow root login remotely? [Y/n]

#Remove test database and access to it? [Y/n]

#Reload privilege tables Now? [Y/n]



3. 创建数据库用户并授权

yum -y install rsyslog-MysqL

MysqL -uroot -p < /usr/share/doc/rsyslog-7.4.7/MysqL-createdb.sql

MysqL -uroot -p

grant all on Syslog.* to rsysloguser@127.0.0.1 identified by 'rsyslogpwd';

grant all on Syslog.* to rsysloguser@localhost identified by 'rsyslogpwd';

flush privileges;

quit


4. 服务端配置

vi /etc/rsyslog.conf

#去掉注释

$ModLoad immark # immark是模块名,支持日志标记

$ModLoad imudp # imupd是模块名,支持udp协议

$UDPServerRun 514 #允许514端口接收使用UDP和TCP协议转发过来的日志

#添加以下信息

$ModLoad omMysqL

*.* :omMysqL:localhost,Syslog,rsysloguser,rsyslogpwd

#重启服务

systemctl restart rsyslog.service



6. 客户端配置

vi /etc/rsyslog.conf

#在文件结尾处增加内容

*.* @192.168.10.74:514

#重启服务

systemctl restart rsyslog.service


7. loganalyzer准备工作

wget http://download.adiscon.com/loganalyzer/loganalyzer-4.1.5.tar.gz

tar xf loganalyzer-4.1.5.tar.gz

cp -a loganalyzer-4.1.5/src/ /var/www/html/log

cp -a loganalyzer-4.1.5/contrib/*.sh /var/www/html/log/

cd /var/www/html/log

chmod +x configure.sh secure.sh

./configure.sh

./secure.sh

chmod 666 config.PHP

chown -R apache.apache *


8. 进浏览器输入http://192.168.10.74/log/ 进行安装

centos 7 配置 loganalyzer

centos 7 配置 loganalyzer

centos 7 配置 loganalyzer

centos 7 配置 loganalyzer

centos 7 配置 loganalyzer

centos 7 配置 loganalyzer

centos 7 配置 loganalyzer

centos 7 配置 loganalyzer

centos 7 配置 loganalyzer

在客户端安装一个程序包测试一下吧!!!!!!

centos 7 配置 loganalyzer

我的天“涯”,貌似,可能,好像,也许,大概是成功了……

centos 7 配置 loganalyzer

大佬总结

以上是大佬教程为你收集整理的centos 7 配置 loganalyzer全部内容,希望文章能够帮你解决centos 7 配置 loganalyzer所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。