{"id":53,"date":"2023-09-28T21:56:44","date_gmt":"2023-09-28T14:56:44","guid":{"rendered":"http:\/\/nitirat.ddns.net\/wordpress\/?p=53"},"modified":"2024-05-07T21:26:03","modified_gmt":"2024-05-07T14:26:03","slug":"how-to-install-loganalyzer-with-rsyslog-on-ubuntu-16-04-lts-ubuntu-18-04-lts","status":"publish","type":"post","link":"http:\/\/nitirat.ddns.net\/wordpress\/?p=53","title":{"rendered":"How to install Loganalyzer with rsyslog on Ubuntu 16.04 LTS \/ Ubuntu 18.04 LTS"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">1.\/ Install Prerequisites<\/h2>\n\n\n\n<p>\u2013 In order for LogAnalyzer to function correctly, on the rsyslog server, you need to install a LAMP Stack.<br><br>\u2013 we need also to install the&nbsp;<strong>rsyslog-mysql<\/strong>&nbsp;package, use the below comand to install it:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@loganalyzer ~]# apt-get install rsyslog-mysql\n<\/pre>\n\n\n\n<p>\u2013 Just click no, because we are going to create the Syslog databse manually<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-Loganalyzer-on-ubuntu18-Rsyslog-mysql.png\"><img decoding=\"async\" src=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-Loganalyzer-on-ubuntu18-Rsyslog-mysql.png\" alt=\"\" class=\"wp-image-2669\"\/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">2.\/ Configure Rsyslog Database<\/h2>\n\n\n\n<p>\u2013 Create the&nbsp;<strong>Syslog<\/strong>&nbsp;database:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@loganalyzer ~]# mysql -u root -p\nmysql&gt; CREATE DATABASE Syslog;\n<\/pre>\n\n\n\n<p>\u2013 Create a user to access the&nbsp;<strong>Syslog<\/strong>&nbsp;database:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; GRANT ALL ON Syslog.* TO 'rsyslog'@'localhost' IDENTIFIED BY 'Password';\nmysql&gt; FLUSH PRIVILEGES;\nmysql&gt; exit\n<\/pre>\n\n\n\n<p>\u2013 Import the default database schema offered by&nbsp;<strong>Rsyslog<\/strong>&nbsp;using the below command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@loganalyzer ~]# mysql -u rsyslog -D Syslog -p &lt; \/usr\/share\/dbconfig-common\/data\/rsyslog-mysql\/install\/mysql\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">3.\/ Configure Loganalyzer Users Database<\/h2>\n\n\n\n<p>\u2013 Create the Loganalyzer Users database:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@loganalyzer ~]# mysql -u root -p\nMariaDB [(none)]&gt; CREATE DATABASE loganalyzer;\n<\/pre>\n\n\n\n<p>\u2013 Create a user to access the Loganalyzer Users database:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; GRANT ALL ON loganalyzer.* TO 'loganalyzer'@'localhost' IDENTIFIED BY 'Password';\nmysql&gt; FLUSH PRIVILEGES;\nmysql&gt; exit\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">4.\/ Configure Rsyslog Server<\/h2>\n\n\n\n<p>\u2013 Take a backup of the&nbsp;<strong>rsyslog.conf<\/strong>&nbsp;before editing it<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@loganalyzer ~]# cp \/etc\/rsyslog.conf \/etc\/rsyslog.conf.org\n[root@loganalyzer ~]# vi \/etc\/rsyslog.conf\n<\/pre>\n\n\n\n<p>\u2013 Find and uncomment the following lines to make your server to listen on the udp and tcp ports.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[...]\n# provides UDP syslog reception\nmodule(load=\"imudp\")\ninput(type=\"imudp\" port=\"514\")\n[...]\n# provides TCP syslog reception\nmodule(load=\"imtcp\")\ninput(type=\"imtcp\" port=\"514\")\n[...]\n<\/pre>\n\n\n\n<p>\u2013 To configure Rsyslog to output logs to database, edit the&nbsp;<strong>mysql.conf<\/strong>&nbsp;file as below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@loganalyzer ~]# vi \/etc\/rsyslog.d\/mysql.conf\n[..]\n# Load the MySQL Module\n$ModLoad ommysql\n#*.* :ommysql:Host,DB,DBUser,DBPassword\n*.* :ommysql:127.0.0.1,Syslog,rsyslog,Password\n<\/pre>\n\n\n\n<p>\u2013 Make the following changes if the server version is&nbsp;<strong>Ubuntu 18.04 Lts<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">### Configuration file for rsyslog-mysql\n### Changes are preserved\n\nmodule (load=\"ommysql\")\n*.* action(type=\"ommysql\" server=\"localhost\" db=\"Syslog\" uid=\"rsyslog\" pwd=\"Password\")\n<\/pre>\n\n\n\n<p>\u2013 Save and restart the&nbsp;<strong>rsyslog<\/strong>&nbsp;service<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@loganalyzer ~]# systemctl restart rsyslog\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">5.\/ Install LogAnalyzer<\/h2>\n\n\n\n<p>\u2013 Download LogAnalyzer package from the&nbsp;<a href=\"http:\/\/loganalyzer.adiscon.com\/downloads\/\" rel=\"noreferrer noopener\" target=\"_blank\">official website<\/a><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@loganalyzer ~]#  cd \/tmp\n[root@loganalyzer ~]#  wget http:\/\/download.adiscon.com\/loganalyzer\/loganalyzer-4.1.6.tar.gz\n[root@loganalyzer ~]# tar -xzvf loganalyzer-4.1.6.tar.gz\n<\/pre>\n\n\n\n<p>\u2013 Create the LogAnalyzer Directory under the apache web directory:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@loganalyzer ~]# mkdir \/var\/www\/html\/loganalyzer\n<\/pre>\n\n\n\n<p>\u2013 Copy the installation files into loganalyzer directory using the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@loganalyzer ~]# cp -r \/tmp\/loganalyzer-4.1.6\/src\/* \/var\/www\/html\/loganalyzer\n<\/pre>\n\n\n\n<p>\u2013 Create a blank configuration file named&nbsp;<strong>config.php<\/strong>&nbsp;in loganalyzer directory and setup write permission to www-data user using the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@loganalyzer ~]# cd \/var\/www\/html\/loganalyzer\n[root@loganalyzer ~]# touch config.php\n[root@loganalyzer ~]# chown www-data:www-data config.php\n[root@loganalyzer ~]# chmod 666 config.php\n<\/pre>\n\n\n\n<p>\u2013 Finally, change all files owner to www-data<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@loganalyzer ~]# chown www-data:www-data -R \/var\/www\/html\/loganalyzer\/\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">4.\/ start LogAnalyzer web installer<\/h2>\n\n\n\n<p>After completing above steps open following url in your favorite web browser to start LogAnalyzer web installer.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">http:\/\/rsyslog_server_ip\/loganalyzer\n<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-0-Loganalyzer.png\"><img decoding=\"async\" src=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-0-Loganalyzer.png\" alt=\"\" class=\"wp-image-2672\"\/><\/a><\/figure>\n\n\n\n<p>\u2013 Just click&nbsp;<strong>Next<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-1-Loganalyzer.png\"><img decoding=\"async\" src=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-1-Loganalyzer.png\" alt=\"\" class=\"wp-image-2673\"\/><\/a><\/figure>\n\n\n\n<p>Make sure&nbsp;<strong>config.php<\/strong>&nbsp;is writable and click&nbsp;<strong>Next<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-2-Loganalyzer.png\"><img decoding=\"async\" src=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-2-Loganalyzer.png\" alt=\"\" class=\"wp-image-2674\"\/><\/a><\/figure>\n\n\n\n<p>\u2013 Fill the database details for loganalyzer, with the loganlyzer database name, user and password created in third step and click Next.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-3-Loganalyzer.png\"><img decoding=\"async\" src=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-3-Loganalyzer.png\" alt=\"\" class=\"wp-image-2675\"\/><\/a><\/figure>\n\n\n\n<p>\u2013 Just click&nbsp;<strong>Next<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-4-Loganalyzer.png\"><img decoding=\"async\" src=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-4-Loganalyzer.png\" alt=\"\" class=\"wp-image-2676\"\/><\/a><\/figure>\n\n\n\n<p>\u2013 Just click&nbsp;<strong>Next<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-5-Loganalyzer.png\"><img decoding=\"async\" src=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-5-Loganalyzer.png\" alt=\"\" class=\"wp-image-2677\"\/><\/a><\/figure>\n\n\n\n<p>\u2013 Create an&nbsp;<strong>Administrator account<\/strong>&nbsp;and click&nbsp;<strong>Next<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-6-Loganalyzer.png\"><img decoding=\"async\" src=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-6-Loganalyzer.png\" alt=\"\" class=\"wp-image-2679\"\/><\/a><\/figure>\n\n\n\n<p>\u2013 Fill the&nbsp;<strong>Rsyslog database<\/strong>&nbsp;details created in second step and click&nbsp;<strong>Next<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-7-Loganalyzer.png\"><img decoding=\"async\" src=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-7-Loganalyzer.png\" alt=\"\" class=\"wp-image-2680\"\/><\/a><\/figure>\n\n\n\n<p>\u2013 click&nbsp;<strong>Finish<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-8-Loganalyzer.png\"><img decoding=\"async\" src=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-8-Loganalyzer.png\" alt=\"\" class=\"wp-image-2681\"\/><\/a><\/figure>\n\n\n\n<p>\u2013 Login to&nbsp;<strong>LogAnalyzer<\/strong>&nbsp;using the user created in the step number 6<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-8-1-Loganalyzer.png\"><img decoding=\"async\" src=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-8-1-Loganalyzer.png\" alt=\"\" class=\"wp-image-2684\"\/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-9-Loganalyzer.png\"><img decoding=\"async\" src=\"https:\/\/yallalabs.com\/wp-content\/uploads\/2018\/08\/Install-rsyslog-with-Loganalyzer-on-ubuntu18-Step-9-Loganalyzer.png\" alt=\"\" class=\"wp-image-2682\"\/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>1.\/ Install Prerequisites \u2013 In order for LogAnalyzer to function correctly, on the rsyslog server, you need to install a LAMP Stack. \u2013 we need also to install the&nbsp;rsyslog-mysql&nbsp;package, use the below comand to install it: [root@loganalyzer ~]# apt-get install rsyslog-mysql \u2013 Just click no, because we are going to create the Syslog databse manually [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":119,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[6],"tags":[],"class_list":["post-53","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu"],"_links":{"self":[{"href":"http:\/\/nitirat.ddns.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/53","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/nitirat.ddns.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nitirat.ddns.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nitirat.ddns.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nitirat.ddns.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=53"}],"version-history":[{"count":1,"href":"http:\/\/nitirat.ddns.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/53\/revisions"}],"predecessor-version":[{"id":54,"href":"http:\/\/nitirat.ddns.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/53\/revisions\/54"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/nitirat.ddns.net\/wordpress\/index.php?rest_route=\/wp\/v2\/media\/119"}],"wp:attachment":[{"href":"http:\/\/nitirat.ddns.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=53"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nitirat.ddns.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=53"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nitirat.ddns.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=53"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}