Install & Configure IT Operational Portal Using ITop On Red Hat or Cent OS

Install & Configure IT Operational Portal Using ITop On Red Hat or Cent OS

Install & Configure IT Operational Portal Using iTop On Red Hat or CentOS: A Complete DevOps Guide

If you manage IT infrastructure, you know the pain of scattered documentation—servers in spreadsheets, incidents in email threads, and SLAs tracked on sticky notes. iTop (IT Operational Portal) solves this by giving you a single, open-source web application that documents assets, tracks tickets, and enforces ITIL processes without locking you into rigid workflows. In this guide, I’ll walk you through installing iTop on Red Hat Enterprise Linux (RHEL) or CentOS—exactly how I’ve done it for production environments—with real-world context, pitfalls, and verification steps.

By the end, you’ll have a fully functional iTop instance with:

  • A searchable CMDB for servers, network devices, and applications
  • Incident and request management with SLA tracking
  • Change and problem management modules
  • Automated impact analysis and data federation

Let’s start with the prerequisites.

Prerequisites

Before running a single command, ensure your environment meets these requirements:

Server Specifications

  • OS: RHEL 7/8 or CentOS 7/8 (64-bit). This guide uses CentOS 7.9, but commands are identical for RHEL.
  • CPU: 2+ vCPUs (4+ recommended for production)
  • RAM: 4GB minimum (8GB+ for 50+ concurrent users)
  • Disk: 20GB+ (SSD preferred; iTop’s database grows with asset data)
  • Network: Static IP or resolvable hostname (e.g., itop.yourdomain.com)

Software Dependencies

iTop requires:

  • Apache 2.4+ (or Nginx, though this guide uses Apache)
  • MySQL 5.7+ or MariaDB 10.2+ (MySQL 8.0+ requires minor tweaks; see Troubleshooting)
  • PHP 7.2+ (PHP 8.x is not officially supported as of iTop 2.7)
  • EPEL repository (for PHP extensions)

Permissions

  • Root or sudo access to install packages and configure services
  • Firewall rules to allow HTTP (80) and HTTPS (443)
  • SELinux in permissive mode (or properly configured; see Troubleshooting)

Pre-Flight Check

Run these commands to verify your system:

# Check OS version
cat /etc/redhat-release

# Check disk space
df -h /var

# Check memory
free -h

# Check network
ip a | grep inet

If any checks fail, address them before proceeding.

Step 1: Install EPEL Repository

iTop’s PHP dependencies aren’t in the default RHEL/CentOS repositories. The Extra Packages for Enterprise Linux (EPEL) repo provides them. Install it with:

# yum -y install epel-release

Why this matters: Without EPEL, you’ll hit "No package php-mbstring available" errors later. The -y flag auto-confirms prompts, which is safe here but avoid it for interactive commands (like mysql_secure_installation).

Step 2: Install and Configure Apache

iTop is a PHP application, so it needs a web server. Apache is the most common choice for RHEL/CentOS. Install it with:

# yum -y install httpd httpd-devel mod_ssl wget

Start Apache and enable it to run at boot:

# systemctl restart httpd
# systemctl enable httpd

Key notes:

  • httpd-devel is needed for PHP modules (e.g., mod_php).
  • mod_ssl enables HTTPS (you’ll configure this later).
  • wget is used to download iTop.

Verify Apache is running:

# systemctl status httpd

Expected output:

● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2023-10-02 10:00:00 UTC; 5s ago

If you see failed, check logs with journalctl -xe.

Step 3: Install and Secure MySQL

iTop stores all data in MySQL. Install it with:

# yum -y install mysql mysql-server mysql-devel

Start MySQL and enable it at boot:

# systemctl restart mysqld
# systemctl enable mysqld

Secure MySQL by running:

# mysql_secure_installation

Follow the prompts to:

  1. Set a root password (use a strong one; you’ll need it for iTop setup).
  2. Remove anonymous users.
  3. Disallow root login remotely.
  4. Remove the test database.
  5. Reload privileges.

Critical: If you skip mysql_secure_installation, your MySQL instance will be vulnerable to attacks. In production, also consider:

  • Binding MySQL to 127.0.0.1 (edit /etc/my.cnf).
  • Setting innodb_file_per_table=1 for better performance.

Step 4: Install PHP and Required Extensions

iTop 2.7 requires PHP 7.2–7.4. Install PHP and its extensions with:

# yum -y install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel \
  php-xml php-imap php-ldap php-mbstring php-odbc php-pear php-xmlrpc php-soap \
  php-cli graphviz

Extension breakdown:

  • php-mysql: MySQL connectivity.
  • php-gd: Image processing (for graphs/charts).
  • php-mbstring: Multibyte string support (for UTF-8).
  • php-mcrypt: Encryption (deprecated in PHP 7.2+ but still required by iTop).
  • graphviz: For impact analysis diagrams.

After installation, verify PHP is working:

# php -v

Expected output:

PHP 7.4.33 (cli) (built: Oct 18 2022 10:00:00) ( NTS )

Step 5: Adjust PHP Settings

iTop needs specific PHP settings to handle large file uploads and long-running scripts. Edit /etc/php.ini:

# vi /etc/php.ini

Update these values (add them if missing):

post_max_size = 32M
upload_max_filesize = 32M
max_execution_time = 300
memory_limit = 256M
date.timezone = UTC

Why these values?

  • post_max_size: Allows large CSV imports (e.g., bulk asset uploads).
  • max_execution_time: Prevents timeouts during database migrations.
  • date.timezone: Avoids PHP warnings in logs.

Save the file (:wq in vi) and restart Apache:

# systemctl restart httpd

Step 6: Download and Extract iTop

Download the latest stable iTop release (2.7.4 as of this writing) to /var/www/html:

# yum -y install zip unzip
# cd /var/www/html
# wget https://downloads.sourceforge.net/project/itop/itop/2.7.4/iTop-2.7.4-4833.zip
# unzip iTop-2.7.4-4833.zip
# mv web itop
# rm -rf iTop-2.7.4-4833.zip INSTALL LICENSE README

Notes:

  • The web directory contains iTop’s PHP files. We rename it to itop for cleaner URLs.
  • Always check the iTop SourceForge page for the latest version. Replace the URL in the wget command accordingly.

Step 7: Set Directory Permissions

iTop needs write access to several directories for configuration, logs, and data. Create them and set permissions:

# mkdir /var/www/html/itop/conf
# mkdir /var/www/html/itop/data
# mkdir /var/www/html/itop/env-production
# mkdir /var/www/html/itop/log
# chmod 777 /var/www/html/itop/conf/
# chmod 777 /var/www/html/itop/data/
# chmod 777 /var/www/html/itop/env-production/
# chmod 777 /var/www/html/itop/log/

Security warning: 777 permissions are not secure for production. After installation, tighten them:

# chown -R apache:apache /var/www/html/itop/
# find /var/www/html/itop/ -type d -exec chmod 755 {} \;
# find /var/www/html/itop/ -type f -exec chmod 644 {} \;
# chmod 750 /var/www/html/itop/conf/
# chmod 750 /var/www/html/itop/data/
# chmod 750 /var/www/html/itop/env-production/
# chmod 750 /var/www/html/itop/log/

Step 8: Run the iTop Web Installer

Open a web browser and navigate to:

http://<your-server-ip>/itop

You’ll see the iTop installer. Follow these steps:

Step 8.1: Welcome Screen

  • Click Continue.

Step 8.2: Installation Type

  • Select Install a new iTop.
  • Click Next.

Step 8.3: License Agreement

  • Check I accept the agreement.
  • Click Next.

Step 8.4: MySQL Configuration

Enter your MySQL details:

  • Server Name: localhost
  • Login: root (or a MySQL user with CREATE DATABASE privileges)
  • Password: The MySQL root password you set earlier.
  • Database: Select Create a new database and enter itopdb.

Click Next.

Step 8.5: Administrator Account

Set up the iTop admin account:

  • Login: admin (change this in production!)
  • Password: Passw0rd (use a strong password in production)
  • Language: English (or your preferred language).

Click Next.

Step 8.6: Sample Data

Choose whether to populate the database with demo data:

  • For production: Select Do not populate the database with demo data.
  • For testing: Select Populate the database with demo data.

Click Next.

Step 8.7: Configuration Modules

Select the modules you need. For a full ITIL setup, choose:

  • Service Management for Enterprises
  • ITIL Compliant Tickets Management (check User Request Management and Incident Management)
  • ITIL Change Management
  • Problem Management and Known Errors Management

Click Next after each selection.

Step 8.8: Finalize Installation

  • Review your settings.
  • Click Install.

After installation completes, click Enter iTop to log in with your admin credentials.

Common Pitfalls and Troubleshooting

1. MySQL 8.0+ Compatibility Issues

Symptom: "Authentication plugin 'caching_sha2_password' cannot be loaded" during iTop installation.

Fix: MySQL 8.0+ uses caching_sha2_password by default, but iTop expects mysql_native_password. Run these commands in MySQL:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_password';
FLUSH PRIVILEGES;

2. SELinux Blocking Access

Symptom: "403 Forbidden" or "Permission denied" errors when accessing iTop.

Fix: Temporarily set SELinux to permissive mode:

# setenforce 0

For a permanent fix, create a custom SELinux policy:

# yum -y install policycoreutils-python
# grep httpd /var/log/audit/audit.log | audit2allow -M my_iTop_policy
# semodule -i my_iTop_policy.pp

3. PHP Extensions Missing

Symptom: "PHP extension 'gd' is missing" during installation.

Fix: Install the missing extension and restart Apache:

# yum -y install php-gd
# systemctl restart httpd

4. Database Connection Failures

Symptom: "Could not connect to MySQL server" during iTop setup.

Fix: Verify MySQL is running and the credentials are correct:

# systemctl status mysqld
# mysql -u root -p -e "SHOW DATABASES;"

If MySQL isn’t running, start it:

# systemctl start mysqld

How to Verify Your iTop Installation

After installation, verify everything works:

1. Check the Web Interface

  • Log in to http://<your-server-ip>/itop with your admin credentials.
  • Navigate to Admin Tools > System > Status. All checks should show OK.

2. Test Database Connectivity

  • Go to Admin Tools > Data Administration > Database Schema.
  • Click Check Database. No errors should appear.

3. Verify Logs

Check iTop’s logs for errors:

# tail -f /var/www/html/itop/log/error.log

Expected output: No recent errors (e.g., "PHP Fatal Error" or "MySQL connection failed").

4. Test Email Notifications (Optional)

  • Go to Admin Tools > Notifications > Email Test.
  • Enter your email and click Send Test Email.
  • If emails fail, check /var/log/maillog and configure SMTP in Admin Tools > Notifications > Email Settings.

Key Takeaways

  • iTop is flexible but opinionated: It follows ITIL best practices but lets you customize workflows. Start with the "Service Management for Enterprises" module for a balanced setup.
  • MySQL 8.0+ requires tweaks: Use mysql_native_password for compatibility, or stick to MySQL 5.7/MariaDB 10.2 for simplicity.
  • Permissions are critical: Use 777 during installation, then tighten to 750 for directories and 644 for files. Run chown -R apache:apache to avoid "Permission denied" errors.
  • SELinux is your friend (but a pain): Set it to permissive during installation, then create a custom policy to re-enable it securely.
  • Backup early: iTop’s database (itopdb) and /var/www/html/itop/conf directory contain all your data. Back them up before going live.

FAQ

1. How do I upgrade iTop to a newer version?

Answer: Upgrading iTop involves:

  1. Back up your database and /var/www/html/itop/conf directory.
  2. Download the new version and extract it to a temporary directory.
  3. Run the web installer and select Upgrade an existing iTop.
  4. Follow the prompts to migrate your database.

Pro tip: Test the upgrade in a staging environment first. Some modules (e.g., "Change Management") may require manual adjustments.

2. Can I use PostgreSQL instead of MySQL?

Answer: No. iTop only supports MySQL/MariaDB. If you’re using PostgreSQL for other applications, run a separate MySQL instance for iTop.

3. How do I integrate iTop with Active Directory or LDAP?

Answer: iTop supports LDAP authentication. Configure it in:

  • Admin Tools > User Accounts > LDAP Configuration.

Key settings:

  • LDAP Server: ldap://your-ad-server:389
  • Base DN: dc=yourdomain,dc=com
  • Login Attribute: sAMAccountName (for AD) or uid (for OpenLDAP).

Troubleshooting: Use ldapsearch to test connectivity before configuring iTop:

# yum -y install openldap-clients
# ldapsearch -x -H ldap://your-ad-server -b "dc=yourdomain,dc=com" -D "cn=admin,dc=yourdomain,dc=com" -W

4. How do I automate iTop backups?

Answer: Use a cron job to back up the database and configuration files:

# crontab -e

Add this line to run daily at 2 AM:

0 2 * * * /usr/bin/mysqldump -u root -p'YourMySQLPassword' itopdb | gzip > /backups/itopdb_$(date +\%Y\%m\%d).sql.gz && tar -czf /backups/itop_conf_$(date +\%Y\%m\%d).tar.gz /var/www/html/itop/conf

Pro tip: Store backups off-server (e.g., S3 or a NAS) and test restores regularly.

Final Thoughts

iTop is a powerful tool for IT operations, but its flexibility means you’ll spend time configuring it to match your workflows. Start with the core modules (CMDB, Incident Management, and Service Management), then expand as needed. If you hit snags, the iTop documentation and community forums are excellent resources.

Now, go document your infrastructure—before the next outage!

🛒 Recommended gear on Amazon

Disclosure: some links above are affiliate links — if you buy through them I may earn a small commission at no extra cost to you. Thanks for supporting the channel!

Post a Comment

Previous Post Next Post