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

Tutorial OCS on Ubuntu 16.04

$
0
0

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. 

Viewing all articles
Browse latest Browse all 11965

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>