- README.md: Documentation explaining how to install and activate the Cacti server.
- install.sh: A shell script that automates the installation process. It includes:
- Updating system packages
- Installing dependencies (
snmp,php-snmp,rrdtool,librrds-perl, etc.) - Installing Apache, MariaDB, PHP, and required extensions (
php-mysql,php-xml,php-mbstring,php-gd,php-gmp,php-intl) - Configuring PHP (
memory_limit,max_execution_time,date.timezone) - Tuning MariaDB for Cacti performance (buffer pool, I/O threads, etc.)
- Creating the Cacti database and user (
cactiuser/cactiuser) - Downloading and extracting the latest Cacti release
- Importing the Cacti schema into MariaDB
- Setting permissions and cron jobs for polling
- Configuring Apache VirtualHost so
/cactiis served directly
-
Clone the repository
git clone https://github.com/sohag1192/install-cacti-on-Ubuntu.git cd install-cacti-on-Ubuntu -
Make the script executable
chmod +x install.sh
-
Run the script as root
sudo ./install.sh
- You’ll be prompted for the MariaDB root password during database setup.
- The script sets timezone to Asia/Dhaka by default (you can adjust inside
install.sh).
-
Access Cacti Web UI
- Open your browser and go to:
http://<your-server-ip>/ - Default login:
admin/admin(you’ll be asked to change the password).
- Open your browser and go to:
After running the script, you’ll have a fully configured Cacti monitoring server on Ubuntu, with Apache serving /cacti as the default web root.
-
Navigate to Cacti plugins directory
cd /var/www/html/cacti/plugins -
Download WeatherMap plugin
git clone https://github.com/Cacti/plugin_weathermap.git weathermap
-
Set permissions
chown -R www-data:www-data /var/www/html/cacti/plugins/weathermap chmod -R 755 /var/www/html/cacti/plugins/weathermap
-
Enable plugin in Cacti
- Log in to Cacti web UI as admin.
- Go to Console → Configuration → Plugins.
- You should see WeatherMap listed.
- Click Install and then Enable.
-
Verify PHP modules
- WeatherMap requires
gdandpcrePHP modules. - Install if missing:
sudo apt-get install php-gd php-pcre -y sudo systemctl restart apache2
- WeatherMap requires
-
Create maps
- After enabling, you’ll see a WeatherMap Editor menu in Cacti.
- Use it to draw network maps, add links, icons, and configure data sources (SNMP, RRDTool, etc.).
- Works with Cacti 1.x upwards.
- Maps can be customized with icons, backgrounds, colors, and labels.
- Output can be embedded in dashboards or exported for reports.