{"id":4057,"date":"2019-03-27T21:04:48","date_gmt":"2019-03-27T18:04:48","guid":{"rendered":"https:\/\/kifarunix.com\/?p=4057"},"modified":"2019-10-03T17:05:40","modified_gmt":"2019-10-03T14:05:40","slug":"install-ocs-ng-inventory-on-fedora-30-fedora-29","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-ocs-ng-inventory-on-fedora-30-fedora-29\/","title":{"rendered":"Install OCS-NG Inventory  on Fedora 30\/Fedora 29"},"content":{"rendered":"\n<p>In this guide, we are going to learn how to install OCS-NG Inventory on Fedora 30\/Fedora 29. <a rel=\"noreferrer noopener\" aria-label=\"OCS (Open Computer and Software) Inventory Next Generation (opens in a new tab)\" href=\"https:\/\/wiki.ocsinventory-ng.org\/02.Newbie-documentation\/OCS-Inventory-NG-Basics\/\" target=\"_blank\">OCS (Open Computer and Software) Inventory Next Generation<\/a> is an opensource tool that is used to inventory IT assets. It is deployed in a agent-server architecture where an an OCS NG agent is installed on an asset to be inventory to collect the information about that asset. In cases where an agent cannot be installed like in routers, switches, SNMP can be used to collect asset information.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install OCS-NG Inventory on Fedora 30\/Fedora 29<\/h2>\n\n\n\n<p>In this guide, we are going to install OCS-NG Inventory on Fedora 30\/Fedora 29 by building it from the source code. Hence, ensure that your system meets the following prerequisites before you can proceed to install OCS inventory.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Prerequisites<\/h3>\n\n\n\n<p>OCS-NG Inventory runs over a LAMP\/LEMP Stack. It also requires a number of perl Libraries and PHP extensions. Check the whole list of the required Libraries and modules on <a rel=\"noreferrer noopener\" aria-label=\"prerequisites page (opens in a new tab)\" href=\"https:\/\/wiki.ocsinventory-ng.org\/01.Prerequisites\/Libraries-version\/\" target=\"_blank\">prerequisites page<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Update your system packages<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf update<\/code><\/pre>\n\n\n\n<p>In order to install all the required libraries and modules for OCS Inventory, run the commands below;<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Install Apache Web server<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install httpd -y<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Install MariaDB Database Server<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install mariadb mariadb-server -y<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Install PHP and Required Extensions<\/h4>\n\n\n\n<p>Well, the available PHP version on Fedora 30\/Fedora 29 is PHP 7.3. In this guide, we are going to run OCS Inventory with PHP 7.2. Why do we use PHP 7.2? With PHP 7.3, OCS inventory gave me blank dashboards and stuck on <strong>Processing&#8230; <\/strong>hence the reason why we reverted to using PHP 7.2. If you know how to fix this issue, kindly drop it on the comments section below.<\/p>\n\n\n\n<p>To install PHP 7.2 on Fedora 30\/29, you need to install the Remi repositories.<\/p>\n\n\n\n<p>Fedora 30<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install http:\/\/rpms.remirepo.net\/fedora\/remi-release-30.rpm -y<\/code><\/pre>\n\n\n\n<p>Fedora 29<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install http:\/\/rpms.remirepo.net\/fedora\/remi-release-29.rpm -y<\/code><\/pre>\n\n\n\n<p>Next, install PHP and the required PHP modules from Remi repositories.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf --enablerepo=remi install php72 php72-{php-domxml,php-gd,php-imap,php-ldap,php-mbstring,php-mysqlnd,php-opcache,php-pdo,php-pear,php-pecl-apcu,php-pecl-zip,php-soap,php-xmlrpc,php-gd,php-xml,php-zip,php-fpm,php-bcmath,php-intl}<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Install Perl and Build Tools<\/h4>\n\n\n\n<p>Run the command below to install Perl, perl modules and the required build tools.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install -y make gcc perl-Archive-Zip perl-Compress-Zlib perl-DBD-MySQL perl-DBI perl-Mojolicious perl-Net-IP perl-Plack perl-SOAP-Lite perl-Switch perl-XML-Entities perl-XML-Simple perl-Apache-DBI perl-Digest-SHA1 perl-Apache2-SOAP<\/code><\/pre>\n\n\n\n<p>Allow Apache on FirewallD<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>firewall-cmd --permanent --add-service=http\nfirewall-cmd --reload<\/code><\/pre>\n\n\n\n<p>Start and Enable Apache, MariaDB and PHP-FPM services.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl start httpd mariadb php72-php-fpm\nsystemctl enable httpd mariadb php72-php-fpm<\/code><\/pre>\n\n\n\n<p>To perform initial database security, run the MySQL secure script.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>mysql_secure_installation<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Create OCS Database and Database User<\/h3>\n\n\n\n<p>Login to MariaDB and create OCS database. <strong>ocsweb<\/strong> is the default database used by the OCS inventory.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>mysql -u root -p<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>create database ocsweb;<\/code><\/pre>\n\n\n\n<p>Create OCS database user and grant all the privileges on OCS database. <strong>ocs<\/strong> is the default database user used by OCS inventory. The default password is <strong>ocs<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>grant all on ocsweb.* to ocs@localhost identified by 'P@SSWoRD';<\/code><\/pre>\n\n\n\n<p>Reload the privileges tables and quit database connection.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>flush privileges;\nquit<\/code><\/pre>\n\n\n\n<p>You can check the <strong>ocsdb-import.log<\/strong> for any OCS data import issues.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Download OCS-NG Inventory Server Archive<\/h3>\n\n\n\n<p>Navigate to <a rel=\"noreferrer noopener\" aria-label=\"OCS downloads page (opens in a new tab)\" href=\"https:\/\/ocsinventory-ng.org\/?page_id=1548&amp;lang=en\" target=\"_blank\">OCS downloads page<\/a> and download OCS Server. You can simply run the command below to grab OCS 2.6.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>wget https:\/\/github.com\/OCSInventory-NG\/OCSInventory-ocsreports\/releases\/download\/2.6\/OCSNG_UNIX_SERVER_2.6.tar.gz<\/code><\/pre>\n\n\n\n<p>Once the download is donem extract the archive.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>tar xzf OCSNG_UNIX_SERVER_2.6.tar.gz<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install OCS Inventory<\/h3>\n\n\n\n<p>Navigate to OCS Server source directory and execute the command below to run the installation.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>cd OCSNG_UNIX_SERVER_2.6\/<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sh setup.sh<\/code><\/pre>\n\n\n\n<p>Once the installer run, follow through the prompts to install OCS-NG inventory accordingly. Press <strong>ENTER<\/strong> to accept the defaults.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>+----------------------------------------------------------+\n|                                                          |\n|  Welcome to OCS Inventory NG Management server setup !   |\n|                                                          |\n+----------------------------------------------------------+\n\nTrying to determine which OS or Linux distribution you use\n+----------------------------------------------------------+\n| Checking for Apache web server binaries !\t\t\t\t|\n+----------------------------------------------------------+\n\nCAUTION: If upgrading Communication server from OCS Inventory NG 1.0 RC2 and\nprevious, please remove any Apache configuration for Communication Server!\n\nDo you wish to continue ([y]\/n)?y\nAssuming Communication server 1.0 RC2 or previous is not installed\non this computer.\n\nStarting OCS Inventory NG Management server setup from folder \/root\/OCSNG_UNIX_SERVER_2.6\nStoring log in file \/root\/OCSNG_UNIX_SERVER_2.6\/ocs_server_setup.log\n\n+----------------------------------------------------------+\n| Checking for database server properties...\t\t\t  |\n+----------------------------------------------------------+\n\nYour MySQL client seems to be part of MySQL version 10.3.\nYour computer seems to be running MySQL 4.1 or higher, good ;-)\n\nWhich host is running database server [localhost] ?\nOK, database server is running on host localhost ;-)\n\nOn which port is running database server [3306] ?\nOK, database server is running on port 3306 ;-)\n\n\n+----------------------------------------------------------+\n| Checking for Apache web server daemon...\t\t\t\t|\n+----------------------------------------------------------+\n\nWhere is Apache daemon binary [\/usr\/sbin\/httpd] ?\nOK, using Apache daemon \/usr\/sbin\/httpd ;-)\n\n\n+----------------------------------------------------------+\n| Checking for Apache main configuration file...\t\t  |\n+----------------------------------------------------------+\n\nWhere is Apache main configuration file [\/etc\/httpd\/conf\/httpd.conf] ?\nOK, using Apache main configuration file \/etc\/httpd\/conf\/httpd.conf ;-)\n\n\n+----------------------------------------------------------+\n| Checking for Apache user account...\t\t\t\t\t |\n+----------------------------------------------------------+\n\nWhich user account is running Apache web server [apache] ?\nOK, Apache is running under user account apache ;-)\n\n\n+----------------------------------------------------------+\n| Checking for Apache group...\t\t\t\t\t\t\t|\n+----------------------------------------------------------+\n\nWhich user group is running Apache web server [apache] ?\nOK, Apache is running under users group apache ;-)\n\n\n+----------------------------------------------------------+\n| Checking for Apache Include configuration directory...   |\n+----------------------------------------------------------+\n\nSetup found Apache Include configuration directory in\n\/etc\/httpd\/conf.d.\nSetup will put OCS Inventory NG Apache configuration in this directory.\nWhere is Apache Include configuration directory [\/etc\/httpd\/conf.d] ?\nOK, Apache Include configuration directory \/etc\/httpd\/conf.d found ;-)\n\n\n+----------------------------------------------------------+\n| Checking for PERL Interpreter...\t\t\t\t\t\t|\n+----------------------------------------------------------+\n\nFound PERL interpreter at &lt;\/usr\/bin\/perl> ;-)\nWhere is PERL interpreter binary [\/usr\/bin\/perl] ?\nOK, using PERL interpreter \/usr\/bin\/perl ;-)\n\n\nDo you wish to setup Communication server on this computer ([y]\/n)?y\n\n\n+----------------------------------------------------------+\n|             Checking for Make utility...                 |\n+----------------------------------------------------------+\n\nOK, Make utility found at &lt;\/usr\/bin\/make> ;-)\n\n+----------------------------------------------------------+\n|        Checking for Apache mod_perl version...           |\n+----------------------------------------------------------+\n\nChecking for Apache mod_perl version 1.99_22 or higher\nFound that mod_perl version 1.99_22 or higher is available.\nOK, Apache is using mod_perl version 1.99_22 or higher ;-)\n\n+----------------------------------------------------------+\n|    Checking for Communication server log directory...    |\n+----------------------------------------------------------+\n\nCommunication server can create detailed logs. This logs can be enabled\nby setting integer value of LOGLEVEL to 1 in Administration console\nmenu Configuration.\nWhere to put Communication server log directory [\/var\/log\/ocsinventory-server] ?\nOK, Communication server will put logs into directory \/var\/log\/ocsinventory-server ;-)\n\n+----------------------------------------------------------------------------+\n|    Checking for Communication server plugins configuration directory...    |\n+----------------------------------------------------------------------------+\n\nCommunication server need a directory for plugins configuration files. \nWhere to put Communication server plugins configuration files [\/etc\/ocsinventory-server\/plugins] ?\nOK, Communication server will put plugins configuration files into directory \/etc\/ocsinventory-server\/plugins ;-)\n\n+-------------------------------------------------------------------+\n|   Checking for Communication server plugins perl directory...     |\n+-------------------------------------------------------------------+\n\nCommunication server need a directory for plugins Perl modules files.\nWhere to put Communication server plugins Perl modules files [\/etc\/ocsinventory-server\/perl] ?\nOK, Communication server will put plugins Perl modules files into directory \/etc\/ocsinventory-server\/perl ;-)\n\n\n+----------------------------------------------------------+\n| Checking for required Perl Modules...\t\t\t\t\t|\n+----------------------------------------------------------+\n\nChecking for DBI PERL module...\nFound that PERL module DBI is available.\nChecking for Apache::DBI PERL module...\nFound that PERL module Apache::DBI is available.\nChecking for DBD::mysql PERL module...\nFound that PERL module DBD::mysql is available.\nChecking for Compress::Zlib PERL module...\nFound that PERL module Compress::Zlib is available.\nChecking for XML::Simple PERL module...\nFound that PERL module XML::Simple is available.\nChecking for Net::IP PERL module...\nFound that PERL module Net::IP is available.\nChecking for SOAP::Lite Perl module...\nFound that PERL module SOAP::Lite is available.\nChecking for Archive::Zip Perl module...\nFound that PERL module Archive::Zip is available.\n\n+----------------------------------------------------------+\n|         Checking for optional Perl Modules...            |\n+----------------------------------------------------------+\n\nChecking for Apache2::SOAP PERL module...\nFound that PERL module SOAP::Apache2 is available.\nChecking for XML::Entities PERL module...\nFound that PERL module XML::Entities is available.\n\n\nDo you wish to setup Rest API server on this computer ([y]\/n)?y\n\n+----------------------------------------------------------+\n| Checking for REST API Dependencies ...              \t\t |\n+----------------------------------------------------------+\n\nFound that PERL module Mojolicious::Lite is available.\nFound that PERL module Switch is available.\nFound that PERL module Plack::Handler is available.\n\n+----------------------------------------------------------+\n| Configuring REST API Server files ...               \t\t |\n+----------------------------------------------------------+\n\nWhere do you want the API code to be store [\/usr\/lib64\/perl5\/vendor_perl] ?\nCopying files to \/usr\/lib64\/perl5\/vendor_perl\n\n+----------------------------------------------------------+\n| Configuring REST API Server configuration files ...  \t\t |\n+----------------------------------------------------------+\n\n\n+----------------------------------------------------------+\n|                 OK, looks good ;-)                       |\n|                                                          |\n|     Configuring Communication server Perl modules...     |\n+----------------------------------------------------------+\n\nChecking if your kit is complete...\nLooks good\nGenerating a Unix-style Makefile\nWriting Makefile for Apache::Ocsinventory\nWriting MYMETA.yml and MYMETA.json\n\n+----------------------------------------------------------+\n|                 OK, looks good ;-)                       |\n|                                                          |\n|      Preparing Communication server Perl modules...      |\n+----------------------------------------------------------+\n\n\n+----------------------------------------------------------+\n|                 OK, prepare finshed ;-)                  |\n|                                                          |\n|     Installing Communication server Perl modules...      |\n+----------------------------------------------------------+\n\n\n+----------------------------------------------------------+\n| OK, Communication server Perl modules install finished;-)|\n|                                                          |\n|     Creating Communication server log directory...       |\n+----------------------------------------------------------+\n\nCreating Communication server log directory \/var\/log\/ocsinventory-server.\n\nFixing Communication server log directory files permissions.\nConfiguring logrotate for Communication server.\nRemoving old communication server logrotate file \/etc\/logrotate.d\/ocsinventory-NG\nWriting communication server logrotate to file \/etc\/logrotate.d\/ocsinventory-server\n\n\n+----------------------------------------------------------------------+\n|        OK, Communication server log directory created ;-)            |\n|                                                                      |\n|   Creating Communication server plugins configuration directory...   |\n+----------------------------------------------------------------------+\n\nCreating Communication server plugins configuration directory \/etc\/ocsinventory-server\/plugins.\n\n\n+----------------------------------------------------------------------+\n| OK, Communication server plugins configuration directory created ;-) |\n|                                                                      |\n|        Creating Communication server plugins Perl directory...       |\n+----------------------------------------------------------------------+\n\nCreating Communication server plugins Perl directory \/etc\/ocsinventory-server\/perl.\n\n\n+----------------------------------------------------------------------+\n|     OK, Communication server plugins Perl directory created ;-)      |\n|                                                                      |\n|               Now configuring Apache web server...                   |\n+----------------------------------------------------------------------+\n\nTo ensure Apache loads mod_perl before OCS Inventory NG Communication Server,\nSetup can name Communication Server Apache configuration file\n'z-ocsinventory-server.conf' instead of 'ocsinventory-server.conf'.\nDo you allow Setup renaming Communication Server Apache configuration file\nto 'z-ocsinventory-server.conf' ([y]\/n) ?y\nOK, using 'z-ocsinventory-server.conf' as Communication Server Apache configuration file\nRemoving old communication server configuration to file \/etc\/httpd\/conf.d\/ocsinventory.conf\nWriting communication server configuration to file \/etc\/httpd\/conf.d\/z-ocsinventory-server.conf\n\n+----------------------------------------------------------------------+\n|       OK, Communication server setup successfully finished ;-)       |\n|                                                                      |\n| Please, review \/etc\/httpd\/conf.d\/z-ocsinventory-server.conf |\n|         to ensure all is good. Then restart Apache daemon.           |\n+----------------------------------------------------------------------+\n\n\nDo you wish to setup Administration Server (Web Administration Console)\non this computer ([y]\/n)?y\n\n+----------------------------------------------------------+\n|    Checking for Administration Server directories...     |\n+----------------------------------------------------------+\n\nCAUTION: Setup now install files in accordance with Filesystem Hierarchy\nStandard. So, no file is installed under Apache root document directory\n(Refer to Apache configuration files to locate it).\nIf you're upgrading from OCS Inventory NG Server 1.01 and previous, YOU\nMUST REMOVE (or move) directories 'ocsreports' and 'download' from Apache\nroot document directory.\nIf you choose to move directory, YOU MUST MOVE 'download' directory to\nAdministration Server writable\/cache directory (by default\n\/var\/lib\/ocsinventory-reports), especially if you use deployment feature.\n\nDo you wish to continue ([y]\/n)?y\nAssuming directories 'ocsreports' and 'download' removed from\nApache root document directory.\n\nWhere to copy Administration Server static files for PHP Web Console\n[\/usr\/share\/ocsinventory-reports] ?\nOK, using directory \/usr\/share\/ocsinventory-reports to install static files ;-)\n\nWhere to create writable\/cache directories for deployment packages,\nadministration console logs, IPDiscover and SNMP [\/var\/lib\/ocsinventory-reports] ?\nOK, writable\/cache directory is \/var\/lib\/ocsinventory-reports ;-)\n\n\n+----------------------------------------------------------+\n|         Checking for required Perl Modules...            |\n+----------------------------------------------------------+\n\nChecking for DBI PERL module...\nFound that PERL module DBI is available.\nChecking for DBD::mysql PERL module...\nFound that PERL module DBD::mysql is available.\nChecking for XML::Simple PERL module...\nFound that PERL module XML::Simple is available.\nChecking for Net::IP PERL module...\nFound that PERL module Net::IP is available.\n\n+----------------------------------------------------------+\n|      Installing files for Administration server...       |\n+----------------------------------------------------------+\n\nCreating PHP directory \/usr\/share\/ocsinventory-reports\/ocsreports.\nCopying PHP files to \/usr\/share\/ocsinventory-reports\/ocsreports.\nFixing permissions on directory \/usr\/share\/ocsinventory-reports\/ocsreports.\nCreating database configuration file \/usr\/share\/ocsinventory-reports\/ocsreports\/dbconfig.inc.php.\nCreating IPDiscover directory \/var\/lib\/ocsinventory-reports\/ipd.\nFixing permissions on directory \/var\/lib\/ocsinventory-reports\/ipd.\nCreating packages directory \/var\/lib\/ocsinventory-reports\/download.\nFixing permissions on directory \/var\/lib\/ocsinventory-reports\/download.\nCreating snmp mibs directory \/var\/lib\/ocsinventory-reports\/snmp.\nFixing permissions on directory \/var\/lib\/ocsinventory-reports\/snmp.\nCreating Administration server log files directory \/var\/lib\/ocsinventory-reports\/logs.\nFixing permissions on directory \/var\/lib\/ocsinventory-reports\/logs.\nCreating Administration server scripts log files directory \/var\/lib\/ocsinventory-reports\/scripts.\nFixing permissions on directory \/var\/lib\/ocsinventory-reports\/scripts.\nConfiguring IPDISCOVER-UTIL Perl script.\nInstalling IPDISCOVER-UTIL Perl script.\nFixing permissions on IPDISCOVER-UTIL Perl script.\nWriting Administration server configuration to file \/etc\/httpd\/conf.d\/ocsinventory-reports.conf\n\n+----------------------------------------------------------------------+\n|        OK, Administration server installation finished ;-)           |\n|                                                                      |\n| Please, review \/etc\/httpd\/conf.d\/ocsinventory-reports.conf\n|          to ensure all is good and restart Apache daemon.            |\n|                                                                      |\n| Then, point your browser to http:\/\/server\/\/ocsreports\n|        to configure database server and create\/update schema.        |\n+----------------------------------------------------------------------+\n\n\nSetup has created a log file \/root\/OCSNG_UNIX_SERVER_2.6\/ocs_server_setup.log. Please, save this file.\nIf you encounter error while running OCS Inventory NG Management server,\nwe can ask you to show us its content !\n\nDON'T FORGET TO RESTART APACHE DAEMON !\n\nEnjoy OCS Inventory NG ;-)<\/code><\/pre>\n\n\n\n<p>Once the installation is done, you can check the installation log file for any issues. The log file is available under;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>$HOME\/OCSNG_UNIX_SERVER_2.6\/ocs_server_setup.log<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Configure OCS Web Server<\/h3>\n\n\n\n<p>Next, you need to configure database connection settings on the OCS web server configuration files.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vim \/etc\/httpd\/conf.d\/z-ocsinventory-server.conf<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>...\n  # Master Database settings\n  # Replace localhost by hostname or ip of MySQL server for WRITE\n  PerlSetEnv OCS_DB_HOST localhost\n  # Replace 3306 by port where running MySQL server, generally 3306\n  PerlSetEnv OCS_DB_PORT 3306\n  # Name of database\n  PerlSetEnv OCS_DB_NAME ocsweb\n  PerlSetEnv OCS_DB_LOCAL ocsweb\n  # User allowed to connect to database\n  PerlSetEnv OCS_DB_USER ocs\n  # Password for user\n  PerlSetVar OCS_DB_PWD P@SSWoRD\n...<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vim \/etc\/httpd\/conf.d\/zz-ocsinventory-restapi.conf<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>...\n&lt;Perl>\n  $ENV{PLACK_ENV} = 'production';\n  $ENV{MOJO_HOME} = '\/usr\/share\/perl5\/vendor_perl';\n  $ENV{MOJO_MODE} = 'deployment';\n  $ENV{OCS_DB_HOST} = 'localhost';\n  $ENV{OCS_DB_PORT} = '3306';\n  $ENV{OCS_DB_LOCAL} = 'ocsweb';\n  $ENV{OCS_DB_USER} = 'ocs';\n  $ENV{OCS_DB_PWD} = 'P@SSWoRD';\n&lt;\/Perl>\n...<\/code><\/pre>\n\n\n\n<p>Similarly, open the <strong>\/usr\/share\/ocsinventory-reports\/ocsreports\/dbconfig.inc.php<\/strong> configuration file and update OCS Inventory database password.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vim \/usr\/share\/ocsinventory-reports\/ocsreports\/dbconfig.inc.php<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>...\ndefine(\"DB_NAME\", \"ocsweb\");\ndefine(\"SERVER_READ\", \"localhost\");\ndefine(\"SERVER_WRITE\", \"localhost\");\ndefine(\"COMPTE_BASE\", \"ocs\");\ndefine(\"PSWD_BASE\", \"P@SSWoRD\");\n?><\/code><\/pre>\n\n\n\n<p>Set the proper permissions and ownership of OCS Web Server configuration files.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod -R 766 \/usr\/share\/ocsinventory-reports\nchown -R apache:apache \/usr\/share\/ocsinventory-reports\/\nchown -R apache:apache \/var\/lib\/ocsinventory-reports\/<\/code><\/pre>\n\n\n\n<p>Configure SELinux to enable OCS-NG to be accessible from Internet.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>chcon -R -t httpd_sys_rw_content_t \/usr\/share\/ocsinventory-reports\/<\/code><\/pre>\n\n\n\n<p>Restart Apache, MariaDB and PHP-FPM services.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl restart httpd mariadb.service php72-php-fpm.service<\/code><\/pre>\n\n\n\n<p>Finalize the OCS inventory setup by navigating to <strong>http:\/\/server-hostname-or-IP\/ocsreports<\/strong>.<\/p>\n\n\n\n<p>Configure OCS Inventory database connections and click <strong>Send<\/strong>.  <\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/ocs-databaseconfiguration.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1264\" height=\"431\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/ocs-databaseconfiguration.png\" alt=\"Install OCS Inventory NG on Fedora 30\/Fedora 29\" class=\"wp-image-4086\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/ocs-databaseconfiguration.png 1264w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/ocs-databaseconfiguration-768x262.png 768w\" sizes=\"(max-width: 1264px) 100vw, 1264px\" \/><\/a><\/figure>\n\n\n\n<p>If the provided database credentials are okay, the install will be successful.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/ocs-installation.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1074\" height=\"392\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/ocs-installation.png\" alt=\"OCS-NG Inventory Installation\" class=\"wp-image-4087\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/ocs-installation.png 1074w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/ocs-installation-768x280.png 768w\" sizes=\"(max-width: 1074px) 100vw, 1074px\" \/><\/a><\/figure>\n\n\n\n<p>To enter the OCS inventory gui, click <strong><a href=\"http:\/\/ocsinv.example.com\/ocsreports\/index.php\" target=\"_blank\" rel=\"noopener\">Click here to enter OCS-NG GUI<\/a><\/strong>. Click <strong>Perform the update<\/strong> to update the database.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/ocs-db-update.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1092\" height=\"410\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/ocs-db-update.png\" alt=\"Update OCS-NG database connection\" class=\"wp-image-4088\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/ocs-db-update.png 1092w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/ocs-db-update-768x288.png 768w\" sizes=\"(max-width: 1092px) 100vw, 1092px\" \/><\/a><\/figure>\n\n\n\n<p>Before you can login to OCS inventory, backup or remove the OCS-NG installation file from the server.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>mv \/usr\/share\/ocsinventory-reports\/ocsreports\/install.php \/usr\/share\/ocsinventory-reports\/ocsreports\/install.php.original<\/code><\/pre>\n\n\n\n<p>Next, click  <strong><a href=\"http:\/\/ocsinv.example.com\/ocsreports\/index.php\" target=\"_blank\" rel=\"noopener\">Click here to enter OCS-NG GUI<\/a><\/strong> to get to the OCS inventory login interface.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/ocs-login-interface.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1166\" height=\"600\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/ocs-login-interface.png\" alt=\"OCS-NG login interface\" class=\"wp-image-4089\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/ocs-login-interface.png 1166w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/ocs-login-interface-768x395.png 768w\" sizes=\"(max-width: 1166px) 100vw, 1166px\" \/><\/a><\/figure>\n\n\n\n<p>Use the credentials <strong>admin<\/strong> for password and username.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/ocs-inventory-dashboard.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1308\" height=\"629\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/ocs-inventory-dashboard.png\" alt=\"OCS-NG dashboard\" class=\"wp-image-4090\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/ocs-inventory-dashboard.png 1308w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/ocs-inventory-dashboard-768x369.png 768w\" sizes=\"(max-width: 1308px) 100vw, 1308px\" \/><\/a><\/figure>\n\n\n\n<p>Once you login, be sure to rename the password by clicking the  <strong>Settings gear &gt; My account &gt; Password.&nbsp;<\/strong><\/p>\n\n\n\n<p>That is just about it on installing OCS-NG Inventory on Fedora 30\/Fedora 29. In our next guides, we will learn how to install OCS-NG inventory agent.<\/p>\n\n\n\n<p>Reference:<\/p>\n\n\n\n<p><a href=\"https:\/\/wiki.ocsinventory-ng.org\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"OCS-NG Inventory Documentation (opens in a new tab)\">OCS-NG Inventory Documentation<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Related Tutorials<\/h3>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-snipe-it-on-debian-10-ubuntu-18-04\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Install Snipe-IT on Debian 10\/Ubuntu 18.04<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-lamp-stack-on-fedora-30\/\" target=\"_blank\">Install LAMP Stack on Fedora 30<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/how-to-install-lamp-linux-apache-mysql-php-stack-on-fedora-28-29\/\" target=\"_blank\">Install LAMP Stack on Fedora 28\/29<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we are going to learn how to install OCS-NG Inventory on Fedora 30\/Fedora 29. OCS (Open Computer and Software) Inventory Next Generation<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[984,121,1094],"tags":[1097,1096,1095],"class_list":["post-4057","post","type-post","status-publish","format-standard","hentry","category-asset-management","category-howtos","category-ocs-inventory","tag-ocs","tag-ocs-inventory","tag-ocs-ng","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4057"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=4057"}],"version-history":[{"count":7,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4057\/revisions"}],"predecessor-version":[{"id":4148,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4057\/revisions\/4148"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=4057"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=4057"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=4057"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}