Introduction
Open-AudIT and Open-AudIT Enterprise can be uninstalled as separate items. Opmantek software packages use shared libraries so if you have other Opmantek products installed on the same server as Open-AusIT Enterprise, you should disable (as opposed to uninstall) Open-AudIT Enterprise.
Assumptions
You are using a standard Open-AudIT and Open-AudIT Enterprise install. If you have changed items such as database name, passwords, etc you will need to adjust the commands below.
Uninstalling Open-AudIT
Database
To remove the database from the server, type the below commands.
mysql -u root -popenauditpassword -e "drop database openaudit;"
Open-AudIT can also store attachment data. If you have any attachments, they will be deleted in the next step.
Program Files
To remove all Open-AudIT program files, run the below commands. Note the two apache web directory commands. One will work on Debian based systems, the other will work on RedHat based systems. It is safe to run both.
rm -rf /usr/local/open-audit rm -rf /var/www/html/open-audit rm -rf /var/www/open-audit
Prerequisites
If you wish to remove all the prerequisites installed by Open-AudIT, run the command below. Note that this will remove programs such as Apache, MySQL, etc from your server.
Debian Based
apt-get purge mysql-server apache2 apache2-utils libapache2-mod-proxy-html libapache2-mod-php5 openssh-client php5 php5-ldap php5-mcrypt php5-mysql php5-snmp nmap zip wget curl sshpass screen smbclient logrotate libtime-modules-perl
RedHat Based
rpm -e mysql mysql-server httpd php php-cli php-mysql php-ldap php-mbstring php-mcrypt php-process php-snmp php-xml nmap zip curl wget sshpass screen samba-client logrotate perl-Time-modules
To remove the extra repository on RedHat based systems, installed by Open-AudIT run the command.
rm -f /etc/yum.repos.d/epel*
Uninstalling Open-AudIT Enterprise
Other Opmantek Software Installed
As advised above, if you have other Opmantek software installed should should not uninstall the Open-AudIT Enterprise program files. To prevent Open-AudIT Enterprise being available on the server you should edit the file /usr/local/omk/conf/opCommon.nmis. Find the attribute omkd => load_applications and remove Open-AudIT from the list. This will prevent Open-AudIT from being available on the server.
No Other Opmantek Software Installed
If no other Opmantek software is installed, you can safely uninstall Open-AudIT Enterprise and it's data by running the below commands. Note the two apache config commands. One will work on Debian based systems, the other will work on RedHat based systems. It is safe to run both.
service omkd stop rm -f /etc/init.d/omkd rm -f /etc/apache2/sites-enabled/04omk-proxy.conf rm -f /etc/httpd/conf.d/04omk-proxy.conf rm -rf /usr/local/omk