Sei sulla pagina 1di 4

Setup MSofficeKey 2.2.

4 plugin in OCS
Inventory 2.1.2 CentOS 6
Leave a reply

By default OCS inventory didnt retrieve Ms Office key product key,Install


MSofficeKey 2.2.4 plugin to retrieve Ms Office product key.

This instalation didnt use setup.sh but manual install follow README.txt file in the
package PluginOcsOfficekey-2.2.4.tar.gz

Download OCS Inventory Officekey 2.2.4 plugins


# cd /opt
# wget http://download.ocsinventory-
ng.org/pub/plugins/PluginOcsOfficekey-2.2.4.tar.gz
# tar -zxvf PluginOcsOfficekey-2.2.4.tar.gz

Windows Agent configuration


Copy the file msofficekey.vbs and place it in C:\Program Files\OCS Inventory
Agent\Plugins.
This script is a VB script. The name is not important. Nothing more to do.

Copy cd_officepack directory from source to /ocsreports/plugins/computer_detail/


# cp -avr /opt/PluginOcsOfficekey-2.2.4/cd_officepack/
/usr/share/ocsinventory-reports/ocsreports/plugins/computer_detail/
# chmod -R 755 /usr/share/ocsinventory-
reports/ocsreports/plugins/computer_detail/cd_officepack/
# chown -R .apache /usr/share/ocsinventory-
reports/ocsreports/plugins/computer_detail/cd_officepack/
Copy ms_plugins directory from source to
/ocsreports/plugins/main_sections/ms_plugins (Note: I backup original
ms_plugins.php first)
# cd /usr/share/ocsinventory-
reports/ocsreports/plugins/main_sections/ms_plugins/
# mv ms_plugins.php ms_plugins.php.bak
# cp /opt/PluginOcsOfficekey-2.2.4/ms_plugins/ms_plugins.php
/usr/share/ocsinventory-
reports/ocsreports/plugins/main_sections/ms_plugins/
# cp /opt/PluginOcsOfficekey-
2.2.4/ms_plugins/ms_plugins_packoffice.php /usr/share/ocsinventory-
reports/ocsreports/plugins/main_sections/ms_plugins/
# chown -R .apache /usr/share/ocsinventory-
reports/ocsreports/plugins/main_sections/ms_plugins/
# chmod -R 755 /usr/share/ocsinventory-
reports/ocsreports/plugins/main_sections/ms_plugins/

-Copy img/cd_officepack.png from source to


/ocsreports/plugins/computer_detail/img/
-Copy img/cd_officepack_a.png from source to
/ocsreports/plugins/computer_detail/img/
-Copy img/cd_officepack_d.png from source to
/ocsreports/plugins/computer_detail/img/
# cp /opt/PluginOcsOfficekey-2.2.4/img/cd_officepack_a.png
/usr/share/ocsinventory-
reports/ocsreports/plugins/computer_detail/img/
# cp /opt/PluginOcsOfficekey-2.2.4/img/cd_officepack_d.png
/usr/share/ocsinventory-
reports/ocsreports/plugins/computer_detail/img/
# cp /opt/PluginOcsOfficekey-2.2.4/img/cd_officepack.png
/usr/share/ocsinventory-
reports/ocsreports/plugins/computer_detail/img/
# chown -R .apache /usr/share/ocsinventory-
reports/ocsreports/plugins/computer_detail/img/
# chmod -R 755 /usr/share/ocsinventory-
reports/ocsreports/plugins/computer_detail/img/

-Backup old french.txt and copy new french.txt file from source to
/ocsreports/plugins/language/french/
-Backup old english.txt and copy new english.txt file from source to
/ocsreports/plugins/language/english/
# cd /usr/share/ocsinventory-reports/ocsreports/plugins/language/
# cd french/
# mv french.txt french.txt.bak
# cd ..
# cd english/
# mv english.txt english.txt.bak
# cp /opt/PluginOcsOfficekey-2.2.4/conf/english.txt
/usr/share/ocsinventory-reports/ocsreports/plugins/language/english/
# cp /opt/PluginOcsOfficekey-2.2.4/conf/french.txt
/usr/share/ocsinventory-reports/ocsreports/plugins/language/french/
# chown -R .apache /usr/share/ocsinventory-
reports/ocsreports/plugins/language/english/
# chmod -R 755 /usr/share/ocsinventory-
reports/ocsreports/plugins/language/english/
# chown -R .apache /usr/share/ocsinventory-
reports/ocsreports/plugins/language/french/
# chmod -R 755 /usr/share/ocsinventory-
reports/ocsreports/plugins/language/french/

Backup old cd_config.txt, copy new cd_config.txt from source to


/ocsreports/plugins/computer_detail/ and /ocsreports/plugins/main_sections/
# cd /usr/share/ocsinventory-
reports/ocsreports/plugins/computer_detail/
# mv cd_config.txt cd_config.txt.bak
# cp /opt/PluginOcsOfficekey-2.2.4/conf/cd_config.txt
/usr/share/ocsinventory-reports/ocsreports/plugins/computer_detail/
# chown -R .apache /usr/share/ocsinventory-
reports/ocsreports/plugins/computer_detail/cd_config.txt
# chmod -R 755 /usr/share/ocsinventory-
reports/ocsreports/plugins/computer_detail/cd_config.txt

Backup old 4all_config.txt, copy new 4all_config.txt from source to


/ocsreports/plugins/main_sections/
# cd /usr/share/ocsinventory-
reports/ocsreports/plugins/main_sections/conf/
# mv 4all_config.txt 4all_config.txt.bak
# cp /opt/PluginOcsOfficekey-2.2.4/conf/4all_config.txt
/usr/share/ocsinventory-reports/ocsreports/plugins/main_sections/conf/
# chown -R .apache /usr/share/ocsinventory-
reports/ocsreports/plugins/main_sections/conf/4all_config.txt
# chmod -R 755 /usr/share/ocsinventory-
reports/ocsreports/plugins/main_sections/conf/4all_config.txt

Backup old ms_multi_search.php and copy new ms_multi_search.php file from


source to /ocsreports/plugins/main_sections/ms_multi_search/
# cd /usr/share/ocsinventory-
reports/ocsreports/plugins/main_sections/ms_multi_search/
# mv ms_multi_search.php ms_multi_search.php.bak
# cp /opt/PluginOcsOfficekey-2.2.4/ms_multi_search/ms_multi_search.php
/usr/share/ocsinventory-
reports/ocsreports/plugins/main_sections/ms_multi_search/
# chown -R .apache /usr/share/ocsinventory-
reports/ocsreports/plugins/main_sections/ms_multi_search/ms_multi_sear
ch.php
# chmod -R 755 /usr/share/ocsinventory-
reports/ocsreports/plugins/main_sections/ms_multi_search/ms_multi_sear
ch.php

Create table in database to store informations


You have to create a new table which will receive new data
# mysql -u ocs -p ocsweb < /opt/PluginOcsOfficekey-
2.2.4/officepack.sql Enter password:

# mysql -u ocs -p ocsweb < /opt/PluginOcsOfficekey-2.2.4/officepack-


guid-fr.sql Enter password:

Backup old Map.pm and copy new Map.pm from source to $MAP_PM_PATH/
(path of Map.pm used
# mv /usr/local/share/perl5/Apache/Ocsinventory/Map.pm
/usr/local/share/perl5/Apache/Ocsinventory/Map.pm.bak
# cp /opt/PluginOcsOfficekey-2.2.4/NewMap.pm
/usr/local/share/perl5/Apache/Ocsinventory/Map.pm
Restart Apache
# service httpd restart

Repair CSRF ATTACK!!! error


Instruction refer from this forum

Change these lines

echo "<form name='".$form_name."' id='".$form_name."' method='POST'


action=''>";

to

echo open_form($form_name);

and change this lines:

echo "</form>";

to

echo close_form();

in files below:
# vi /usr/share/ocsinventory-
reports/ocsreports/plugins/main_sections/ms_plugins/ms_plugins.php
# vi /usr/share/ocsinventory-
reports/ocsreports/plugins/computer_detail/cd_officepack/cd_officepack.php
# vi /usr/share/ocsinventory-
reports/ocsreports/plugins/main_sections/ms_multi_search/ms_multi_search.php

Finish!!

References:
http://wiki.ocsinventory-ng.org/index.php/Plugins:MSofficeKey2.1
http://forums.ocsinventory-ng.org/viewtopic.php?id=12577

http://www.toyaseta.com/setup-msofficekey-2-2-4-plugin-in-ocs-inventory-2-
1-2-centos-6.html

Potrebbero piacerti anche