This migration is certainly possible, but it's hard to tell you exactly what needs to happen without knowing exactly how Nagios is set up on your Fedora box in the first place.
What I'd like to offer you is a set of full installation instructions for Ubuntu - this way you can stand up a Nagios box on Ubuntu and work on getting your data to it from your Fedora box.
Installation instructions (for Ubuntu 14.04 and above):
Log in as the super user:
Install all pre-requisite packages:
Code: Select all
apt-get --ignore-missing install wget build-essential apache2 php5-gd libgd2-xpm-dev libapache2-mod-php5 unzip m4 automake libtool gettext apache2-utils
Change to the tmp directory, and download Nagios Core and Nagios Plugins:
Code: Select all
cd /tmp
wget https://github.com/NagiosEnterprises/nagioscore/archive/master.tar.gz -O nagioscore.tar.gz
wget https://github.com/nagios-plugins/nagios-plugins/archive/master.tar.gz -O nagiosplugins.tar.gz
Add the appropriate user and group for the Nagios process (we recommend 'nagios' and 'nagcmd'), and assign 'nagios' and apache to the nagcmd group:
Code: Select all
useradd nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G nagcmd www-data
Run the following commands to unpack the Nagios Core and Nagios Plugins source code into tmp:
Code: Select all
tar xzf nagioscore.tar.gz
tar xzf nagiosplugins.tar.gz
Change to the Nagios Core directory:
Run the configure command to get the source code ready for compilation:
Code: Select all
./configure --with-command-group=nagcmd --with-nagios-group=nagios --with-mail=/usr/bin/sendmail
Compile and install:
Code: Select all
make all
make install
make install-init
make install-config
make install-commandmode
Complete the installation:
Code: Select all
/usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/sites-enabled/nagios.conf
cp -R contrib/eventhandlers /usr/local/nagios/libexec
chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
a2enmod rewrite
a2enmod cgi
Run the Nagios verification command to ensure the install completed properly:
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Start Nagios:
Ubuntu 14
Ubuntu 15
Code: Select all
/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
Add a default user for web interface access, and start apache (we recommend calling the user 'nagiosadmin'):
Code: Select all
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
/etc/init.d/apache2 restart
Change to the Nagios Plugins directory to compile and install the plugins:
Code: Select all
cd /tmp/nagios-plugins-master/
./tools/setup
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
Register the Nagios service and Apache to be run upon system startup:
Code: Select all
ln -s /etc/init.d/apache2 /etc/rcS.d/S99apache2
ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios