In previous article we have already configure Rsyslog with MySQL database. In this article we will help you to setup web interface for viewing the logs using LogAnalyzer with Rsyslog and MySQL.
Below are few configuration details which we used in part-1 to setup Rsyslog with MySQL.
Rsyslog MySQL Database: Syslog
Rsyslog MySQL Username: rsyslog
Rsyslog MySQL Password: Password
Let’s start the setup of LogAnalyzer on your Linux system with rsyslog database using the following steps.
Step 1 – Download LogAnalyzer Source
Download the LogAnalyzer latest version from its official download site or use the following command to download 4.1.7 (Current latest version) version and extract it.
# cd /tmp
# wget http://download.adiscon.com/loganalyzer/loganalyzer-4.1.7.tar.gz
# tar xzf loganalyzer-4.1.7.tar.gz
After extracting copy the required files to web server default document root as below.
# cp -r loganalyzer-4.1.7/src/* /var/www/html/loganalyzer
# cp -r loganalyzer-4.1.7/contrib/* /var/www/html/loganalyzer/
We need to allow execute permissions to the configure.sh and secure.sh files:
# cd /var/www/html/loganalyzer/
# chmod +x configure.sh secure.sh
Step 2 – Create Config File
Now create a blank configuration file named config.php in loganalyzer directory and setup write permission to apache user.
# cd /var/www/html/loganalyzer
# sh configure.sh
This will create a blank config.php file with write access:
Step 3 – Start Loganalyzer Web Installer
After completing all the above steps open following url in web browser to start LogAnalyzer web installer.
Now follow the installer steps as per below given screen shots.
Just click Next.
Verify the file permission and make sure config.php is writable and click Next.
Fill the database and other required details for loganalyzer, we can also use the same database used for Rsyslog and click Next.
In this step installer will create database table. We just need to click Next.
Tables has been created successful. Please check the list below for possible error If any exist and Just click Next.
Now add the information of an Administrator account and click Next.
Fill the Rsyslog database details and click Next.
LogAnalyzer installation has been completed. We just need to click Finish.
Login using Administrator credentials in LogAnalyzer.
Now you are successfully access the loganalyzer.
We hope this tutorial was enough Helpful. If you need more information, or have any questions, just comment below and we will be glad to assist you!