Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.12.3 available

The official documentation can be found on https://wiki.ocsinventory-ng.org. Read it before asking your question.

Tutorial OCS on Ubuntu 16.04

Here a solution to make an OCS+GLPI on Ubuntu 16.04

mkdir /tmp/inventory
chmod 777 /tmp/inventory
apt-get install make apache2 mysql-server php perl libapache2-mod-perl2 libapache2-mod-php 
apt-get install libio-compress-perl libxml-simple-perl libdbi-perl libdbd-mysql-perl 
apt-get install libapache-dbi-perl libsoap-lite-perl libnet-ip-perl 
apt-get install php-mysql php-gd php7.0-dev php-mbstring php-soap
perl -MCPAN -e 'install XML::Entities'
wget https://github.com/OCSInventory-NG/OCSInventory-ocsreports/releases/download/2.2/OCSNG_UNIX_SERVER-2.2.tar.gz
wget https://github.com/glpi-project/glpi/releases/download/0.90.3/glpi-0.90.3.tar.gz
wget https://forge.glpi-project.org/attachments/download/2114/glpi-ocsinventoryng-1.2.1.tar.gz
tar -xzvf glpi-0.90.3.tar.gz -C /var/www
tar -xvzf glpi-ocsinventoryng-1.2.1.tar.gz -C /var/www/glpi/plugins
tar -xvf OCSNG_UNIX_SERVER-2.2.tar.gz
cd OCSNG_UNIX_SERVER-2.2
mv setup.sh originalsetup.sh
wget https://raw.githubusercontent.com/OCSInventory-NG/OCSInventory-Server/master/setup.sh
sh setup.sh (Everything default)
cd
rm -r *.gz
rm -r OCSNG_UNIX_SERVER-2.2/
chown -R www-data:www-data /usr/share/ocsinventory-reports
chown -R www-data:www-data /var/www/glpi
chmod -R 777 /var/www
chmod -R 777 /usr/share/ocsinventory-reports
chmod -R 777 /var/www/glpi

nano /etc/apache2/sites-available/glpi.conf
Write in {
Alias / /var/www/glpi/
<VirtualHost *:80>
    ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
    #ServerName www.example.com
    DocumentRoot /var/www/glpi
      <Directory "/var/www/glpi/">
        Options Indexes MultiViews FollowSymLinks
        #AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
}

a2dissite 000-default
a2enconf ocsinventory-reports
a2ensite glpi.conf
a2enconf z-ocsinventory-server
service apache2 restart

Web browser {
http://IP_server/ocsreports/install.php
MySQL login: root
MySQL password:pswd
Name of Database:ocsweb
MySQL HostName:127.0.0.1 -> OK
Enter OCS NG GUI
Perform the update
Enter OCS NG GUI

Configuration :
Server : TRACE_DELETED (ON)
Inventory files : GENERATE_OCS_FILES : ON
OCS_FILES_OVERWRITE : ON
OCS_FILES_PATH /tmp/inventory
}

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

mysql -u root -p
SET PASSWORD FOR 'ocs'@'localhost' = PASSWORD('pswd');
SET PASSWORD FOR 'ocs'@'%' = PASSWORD('pswd');
exit

nano /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php
{
define("PSWD_BASE","pswd");
}

nano /etc/apache2/conf-available/z-ocsinventory-server.conf
{
PerlSetVar OCS_DB_PWD pswd
In <Location /plugins> Comment lines :
Require local
SetHandler perl-script
}

service apache2 restart

Web browser {
http://IP_server/
create or use a database
}
rm /var/www/glpi/install/install.php

Don't forget to change your passwords in OCS and glpi.

With this solution, u'll have OCS & GLPI Installed but no connection
between them.

There is a bug i still haven't found the solution.
OCS will display 0 computer on the /ocsreports/
but if you go to All computers, u will see all of your computers.
If someone find the solution for this Post-it here please thx. 
in OCS Inventory NG server for Unix by (170 points)
edited by

6 Answers

0 votes
Thanks you for your contribution, we are currently working on the php7 compatibility, the next version will be more compliant with it.

Regards,

Gilles Dubois.
by (3.1k points)
0 votes

Hey thank you.

i have a little problem with the plugin :(

You don't have permission to access /plugins/ocsinventoryng/front/config.php on this server.

i don't know the reason!?

permissions :

chown -R www-data:www-data /usr/share/ocsinventory-reports
chown -R www-data:www-data /var/www/glpi
chmod -R 777 /var/www
chmod -R 777 /usr/share/ocsinventory-reports
chmod -R 777 /var/www/glpi

any idea? 


by (160 points)
a2disconf z-ocsinventory-server.conf
0 votes
Hi, i'm a new user of Ocs ( & Ubuntu) , then i used you're Command to install OCS but im losted now ... http:\\127.0.0.1 give me nothing. can you teach me about this inventory ? (no application install ?)
by (140 points)
0 votes
Excelent solution and OCS inventory is lifted, but does not collect agent information ... I do not understand what may be going on, I have searched and I still do not find the solution. Please help.

Starting OCS Inventory NG Agent on Friday, April 07, 2017 15:42:13.
AGENT => Running OCS Inventory NG Agent Version 2.3.0.0
AGENT => Using OCS Inventory NG FrameWork Version 2.3.0.0
AGENT => Loading plug-in(s)
AGENT => Using network connection with Communication Server
AGENT => Using Communication Provider <OCS Inventory NG cURL Communication Provider> Version <2.3.0.0>
AGENT => Sending Prolog
ERROR *** AGENT => Failed to send Prolog <HTTP Status Code #404>
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:00.
by (170 points)
0 votes
Is this found somewhere else? Long lines are cut short, I am worried I might miss something.

I looked at the page source. Got what I needed.
by (1.9k points)
edited by
0 votes

Question:
Forgive me Im a Windows/GUI person, so struggling a LOT with this.

I've been following this and come up with a few issues

Firstly Apache wont restart - Any clues from this log?
sudo service apache2 restart

And question: #ServerName www.example.com

Should this be MY server name? or is that line as I should type it in??

My GLPI.CONF shows up exactly like this - is it correct?

Write in {
Alias / /var/www/glpi/
<VirtualHost *:80>
    ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
    #ServerName www.example.com
    DocumentRoot /var/www/glpi
      <Directory "/var/www/glpi/">
        Options Indexes MultiViews FollowSymLinks
        #AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
}

Thank you

by (200 points)
edited by
 
Powered by Question2Answer
...