Menu

iTop install on Ubuntu 22-04 LTS

Les
2024-01-13
2024-05-28
  • Les

    Les - 2024-01-13

    Hi,
    I am trying to install iTop on my Ubuntu 22-04 LTS server follwoing this instructions:

    https://www.itophub.io/wiki/page?id=latest:install:start

    sudo apt-get update
    sudo apt-get install apache2 mariadb-server php7.4 php7.4-mysql php7.4-ldap php7.4-cli php7.4-soap php7.4-json graphviz php7.4-xml php7.4-gd php7.4-zip php7.4-fpm php7.4-mbstring acl
    
    wget https://sourceforge.net/projects/itop/files/latest/download -O /tmp/itop.zip
    sudo unzip /tmp/itop.zip "web/*" -d /var/www/html/itop
    sudo mv /var/www/html/itop/web/*  /var/www/html/itop
    sudo rmdir /var/www/html/itop/web
    sudo setfacl -dR -m u:"www-data":rwX /var/www/html/itop/data /var/www/html/itop/log
    sudo setfacl -R -m u:"www-data":rwX /var/www/html/itop/data /var/www/html/itop/log
    sudo mkdir /var/www/html/itop/conf /var/www/html/itop/env-production /var/www/html/itop/env-production-build
    sudo chown www-data: /var/www/html/itop/conf /var/www/html/itop/env-production /var/www/html/itop/env-production-build
    

    However when I try to acess http://myserver/itop/setup/wizard.php

    I am getting this error

    Run(); } else { SetupUtils::ExitMaintenanceMode(false); // Force initializing the setup $oWizard->Start(); SetupUtils::CreateSetupToken(); } 
    

    also if I tr to go to

    http://myserver/itop/

    I am getting this

    Error: Unable to read the configuration file: '$sConfigFile'. Please check the access rights on this file.
    
    "; } else if (is_writable($sConfigFile)) { require_once (APPROOT.'setup/setuputils.class.inc.php'); if (SetupUtils::IsInReadOnlyMode()) { echo "
    
    Warning: the application is currently in maintenance, please wait.
    "; echo "
    
    Click here to ignore this warning and continue to run iTop in read-only mode.
    "; } else { echo <<Security Warning: the configuration file '{$sConfigFile}' should be read-only.
    
    Please modify the access rights to this file.
    
    Click here to ignore this warning and continue to run iTop.
    HTML; } } else { header("Location: $sStartPage"); } } else { // Config file does not exist, need to run the setup wizard to create it header("Location: $sSetupPage"); } 
    

    Any help much appreciated!

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2024-01-14

    It seems it's rendering PHP code, so it looks like you haven't properly installed Apache2 for some reason?

    Also, if you're starting from scratch: I suggest using the highest compatible PHP version already. No point in still using the old PHP 7.4.

     
  • Name

    Name - 2024-05-26

    I registered specifically to write an answer. The installation was carried out on a clean Ubuntu system, according to the instructions from the official ITOP website "Quick install on Ubuntu 20.04". I wonder what could have gone wrong? As a result, when I try to start the installation, I do not receive an installation page, but a PHP code - ~~~
    "<?php
    /
    * Copyright (C) 2010-2023 Combodo SARL
    *
    * This file is part of iTop.
    *
    * iTop is free software; you can redistribute it and/or modify
    * it under the terms of the GNU Affero General Public License as published by
    * the Free Software Foundation, either version 3 of the License, or
    * (at your option) any later version.
    *
    * iTop is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    * GNU Affero General Public License for more details.
    *
    * You should have received a copy of the GNU Affero General Public License
    /

    /*
    * Simple redirection page to check PHP requirements
    *
    * @see https://github.com/composer/composer/blob/master/doc/07-runtime.md#platform-check Composer's platform_check
    *
    * @since 3.0.0 NВ°3253
    /

    require_once('../lib/autoload.php');

    echo <<<HTML
    <!DOCTYPE html>

    <title>iTop setup - Checking minimum requirements</title> <meta http-equiv="refresh" content="0; url=wizard.php"> <script> document.location = "wizard.php"; </script>

    Redirecting to setup launch page...

    HTML
    "
    ~~~
    It is obvious that the instructions on the site are outdated, and the latest versions of itop contain changes that lead to errors when trying to install... even on the specified versions of ubuntu (as the version is pulled out to be a new one, and not the one that was at the time the instructions were written)

     

    Last edit: Name 2024-05-26
    • Jeffrey Bostoen

      Jeffrey Bostoen - 2024-05-28

      Sounds as if PHP is simply not enabled on your web server.

       

Log in to post a comment.