Quantcast
Channel: Ocsinventory Q&A - Recent questions without answers
Viewing all articles
Browse latest Browse all 4604

Tutorial OCS 2.4 on Ubuntu 16.04

$
0
0

Tutorial OCSserwer 2.4 on Ubuntu 16.04

sudo apt update

sudo apt dist-upgrade

sudo apt install php-curl apache2-dev gcc perl-modules-5.22 make apache2 mysql-server php perl libapache2-mod-perl2 libapache2-mod-php libio-compress-perl libxml-simple-perl libdbi-perl libdbd-mysql-perl libapache-dbi-perl libsoap-lite-perl libnet-ip-perl php-mysql php-gd php7.0-dev php-mbstring php-soap php-xml php-pclzip libarchive-zip-perl php7.0-zip

sudo perl -MCPAN -e 'install Apache2::SOAP'

sudo perl -MCPAN -e 'install XML::Entities'

sudo perl -MCPAN -e 'install Net::IP'

sudo perl -MCPAN -e 'install Apache::DBI'

sudo wget https://github.com/OCSInventory-NG/OCSInventory-ocsreports/releases/download/2.4/OCSNG_UNIX_SERVER_2.4.tar.gz

sudo tar xfvz OCSNG_UNIX_SERVER_2.4.tar.gz

sudo cd OCSNG_UNIX_SERVER_2.4

sudo sh setup.sh

sudo a2enconf ocsinventory-reports

sudo a2enconf z-ocsinventory-server

sudo chown -R www-data:www-data /var/lib/ocsinventory-reports/

sudo service apache2 restart

Using WEB browser 

http://your_server_IP/ocsreports

  Configure Mysql

  User -root

  Pasword-(password defined due to Mysql instalation)

  Name of datbase-ocsweb

  DatabaseHost-localhost  

rm /usr/share/ocsinventory-reports/ocsreports/install.php

 sudo mysql -u root -p

 SET PASSWORD FOR 'ocs'@'localhost' = PASSWORD('user_defined_pass_for_ocs_to_connect_database');

 SET PASSWORD FOR 'ocs'@'%' = PASSWORD('user_defined_pass_for_ocs_to_connect_database');

  exit

    

****

vim /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php

        {

        define("PSWD_BASE","user_defined_pass_for_ocs_to_connect_database");

        }

    vim /etc/apache2/conf-available/z-ocsinventory-server.conf

        {

        PerlSetVar OCS_DB_PWD user_defined_pass_for_ocs_to_connect_database

        In <Location /ocsplugins> Comment lines :

        Require local

        SetHandler perl-script

****For lazy people or new on Linux I suggest installing mc instead if vim for editing files, it is also good file manager

sudo apt-get install mc 

Change Options>Config>UseInternalEditor>save 

sudo mc (find file and use F4 for edit, F2 for save file) }

Connecting Agents

Agents must be installed with version < or = OCSserver version, for example for XAMPP on Windows OCSserver2.2 must use Agent 2.1.1.1

For presented in this Tutorial Linux OCSserver 2.4 must use Agent 2.3.1.1(is highest aviable at the moment) or below.

Installation of Agents on windows I use default settings, just uncheck field Validate certificates, Of course  if choose it to be checked must generate certificate on OCSserwer and place it to a Agent config Folder (on windows 10 it is C:\ProgramData\OCS Inventory NG)

User and Password on Agent not need be used for simple HTTP connection, just ensure you entered right IP Your_server_IP:80(standard port for http)


Viewing all articles
Browse latest Browse all 4604

Trending Articles