Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You will be prompted for your MySQL root user credentials. Any existing files and database will be removed from the server. The backed-up files will be restored to the server, the daemon reinstalled and configured, the database restored and the daemon started.

Uninstalling

To uninstall Open-AudIT and delete all data  perform the following steps (after copying and extracting the tarball as above):

Run the script by entering the command

Code Block
languagebash
./install.pl uninstall=y

The script will offer to provide a backup of the existing files and data (as per above) and then confirm that you do wish to uninstall Open-AudIT. If you answer 'y', the files will be deleted, the daemon removed and the database and database user dropped.

Checking Dependencies

To check the dependencies are installed without actually installing perform the following steps (after copying and extracting the tarball as above):

...

The script will run, check the dependencies are installed and inform you if they are or provide information on which packages are not and offer the commands for you to install them.

Uninstalling

To uninstall Open-AudIT and delete all data  perform the following steps (after copying and extracting the tarball as above):

Installing Dependencies

The check dependencies option above should inform you which packages are missing from your system. To install these packages perform the following

Installing Dependencies for RedHat 6 / Centos 6 servers

Ensure your package manager is up to date

Code Block
languagebash
yum update

You will need an external repo to install some items. Enable the repo

Code Block
languagebash
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Install the missing dependencies by copying and pasting the output from the script "yum install package1 package2 etc etc".

If you have not already, download the appropriate 'winexe' package from the repository at http://download.opensuse.org/repositories/home:/ahajda:/winexe/

Install itRun the script by entering the command

Code Block
languagebash
yum install winexe

SELinux is know to cause some issues.

...

Disable it by

Code Block
languagebash
sed -i -e 's/SELINUX=/#SELINUX=/g' /etc/selinux/config
echo "SELINUX=disabled" >> /etc/selinux/config
setenforce 0

Configure IP Tables to allow the Apache traffic

Code Block
languagebash
sed -i 's/\*filter$/*filter\n-A INPUT -m state --state NEW -p tcp --dport 443 -j ACCEPT/' /etc/sysconfig/iptables
sed -i 's/\*filter$/*filter\n-A INPUT -m state --state NEW -p tcp --dport 80 -j ACCEPT/' /etc/sysconfig/iptables
/etc/init.d/iptables restart

Configure PHP (substituting $TIMEZONE from as below).

You will need to ensure your PHP timezone is set correctly. You can check which time zones PHP supports at http://www.php.net/manual/en/timezones.php You can find out your server's timezone by

Code Block
languagebash
cat /etc/sysconfig/clock | grep ZONE | cut -d"\"" -f2

Set your PHP defaults 

Code Block
languagebash
sed -i -e 's/memory_limit/;memory_limit/g' /etc/php.ini
echo "memory_limit = 512M" >> /etc/php.ini
sed -i -e 's/max_execution_time/;max_execution_time/g' /etc/php.ini
echo "max_execution_time = 300" >> /etc/php.ini
sed -i -e 's/max_input_time/;max_input_time/g' /etc/php.ini
echo "max_input_time = 600" >> /etc/php.ini
sed -i -e 's/error_reporting/;error_reporting/g' /etc/php.ini
echo "error_reporting = E_ALL" >> /etc/php.ini
sed -i -e 's/display_errors/;display_errors/g' /etc/php.ini
echo "display_errors = On" >> /etc/php.ini
sed -i -e 's/upload_max_filesize/;upload_max_filesize/g' /etc/php.ini
echo "upload_max_filesize = 10M" >> /etc/php.ini
# Get a valid dat/time string from http://www.php.net/manual/en/timezones.php
sed -i -e 's/date.timezone/;date.timezone/g' /etc/php.ini
echo "date.timezone = <TIMEZONE_FROM_ABOVE>" >> /etc/php.ini

If you have had to install MySQL and Apache, configure and start the daemons

Code Block
languagebash
chkconfig --levels 235 mysqld on
service mysqld start
echo "ServerName <YOUR_SERVER>" >> /etc/httpd/conf/httpd.conf
chkconfig --levels 235 httpd on
chsh -s /bin/bash apache
service httpd start

Lastly, set the SUID for the nmap binary (so we can use the apache front end to run scripts which call nmap).

Code Block
languagebash
chmod u+s /usr/bin/nmap

The script will offer to provide a backup of the existing files and data (as per above) and then confirm that you do wish to uninstall Open-AudIT. If you answer 'y', the files will be deleted, the daemon removed and the database and database user dropped.

...