Now that we have rsyslog working on Orange JeOS it sure would be nice to get phpLogCon working so that we could see the logs via a web browser. Because my application of rsyslog is firewall specific, it deals with a ton of traffic. So much traffic in fact, that I don’t wanna mess with MySql back end. MySql tends to slow things down too much. So, I set up rsyslog to store it’s data to /var/log/syslog and I’m going to set up phpLogCon to pick it up from there. Here’s the play by play:
- yum install httpd php php-gd
- edit /etc/httpd/conf/httpd.conf and set the “Servername” variable to the name or IP of your machine.
- service httpd start
- chkconfig httpd on
- Allow httpd (port 80) in iptables with ”iptables -I RH-Firewall-1-INPUT 3 -p tcp -m tcp --dport 80 --tcp-flags SYN,RST,ACK SYN -j ACCEPT”
- wget http://www.phplogcon.org/Downloads-req-getit-lid-54.phtml
- cd ~
- tar –zxvf phplogcon-2.6.2.tar.gz
- cd phplogcon-2.6.2
- mkdir /var/www/html/syslog
- cp –a src/* /var/www/html/syslog
- cp contrib/configure.sh /var/www/html/syslog
- cd /var/www/html/syslog
- chmod 777 configure.sh
- ./configure.sh (This will create a file called config.php)
- rm configure.sh
- chmod 666 config.php
- chcon –Rv –type=httpd_sys_content_t /var/www/html/syslog (Note: This changes the selinux config to allow the syslog folder to work with the httpd daemon.)
- chcon –Rv –type=httpd_sys_content_t /var/log/syslog
- chmod 644 /var/log/syslog
- Browse (on another computer) to http://yourservername/syslog . You should see this screen:
Click the word “here” above to begin the configuration.
Now click the Next button.
Again, click the Next button
I took the defaults above to get started. Click the Next button.
The defaults were fine again. Click Next
- Finish up with a “chmod 644 config.php”
We’re done. Now click the word “here” in the above screen and you should see you syslog data.
Good luck and happy logging!
No comments:
Post a Comment