Linux‎ > ‎Internet‎ > ‎

MySAR

This tutorial assumes you are using an RH style distro i.e CentOS / Fedora / Red Hat.

Packages:
httpd
mysql
mysql-server
perl-DBD-MySQL
perl-DBI
php
php-mysql
php-pear
MySAR:
http://giannis.stoilis.gr/software/mysar/
Configure services:
chkconfig --levels 3 httpd on
chkconfig --levels 3 mysqld on
/etc/init.d/httpd start
/etc/init.d/mysqld start

Installation:
tar xzvf mysar-*.tar.gz -C /usr/local
cd /usr/local
mv mysar webreports
chown -R apache:apache webreports
cd webreports/etc
mv config.ini.sample config.ini
cd /var/www/html/
ln -s /usr/local/webreports/www webreports
chown apache:apache webreports
At this point you can browse to http://your-server/webreports/install. Accept the defaults and once
completed remove the install directory by doing:
MySAR installation - Technical Support - SYNAQ Wiki http://wiki.synaq.com/display/Technical/MySAR+inst...
1 of 2 08/27/2008 08:54 AM
rm -rf /usr/local/webreports/www/install
Crontab settings:
* * * * * /usr/local/webreports/bin/mysar-resolver.php > /usr/local/webreports/log/mysarresolver.
log 2>&1
0 0 * * * /usr/local/webreports/bin/mysar-maintenance.php > /usr/local/webreports
/log/mysar-maintenance.log 2>&1
* * * * * /usr/local/webreports/bin/mysar-importer.php > /usr/local/webreports/log/mysarimporter.
log 2>&1
Password protecting the site with apache:
You need to configure Apache to accept htaccess authentication.
Change "AllowOverride None" in your httpd.conf to read:
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride Options FileInfo AuthConfig Limit
Restart Apache services.
Now you can configure htaccess by:
touch /usr/local/webreports/www/.htaccess
The contents of the file should look as follows:
AuthType Basic
AuthName "Password Required"
AuthUserFile /usr/local/webreports/www/.htpasswd
Require valid-user
You can add a user by doing:
htpasswd -c /usr/local/webreports/www/.htpasswd admin
Replace admin with any name you desire.

Comments