This article is talking about how to install OCSNG 1.0.1 on a openSuSE 10.2 system.
- Requirements:
Apache version 1.3.33 or higher / Apache version 2.0.46 or higher.
Mod_perl version 1.29 or higher.
Mod_php version 4.3.2 or higher.
PHP 4.3.2 or higher, with ZIP and GD support enabled.
PERL 5.6 or higher.
Perl module XML::Simple version 2.12 or higher.
Perl module Compress::Zlib version 1.33 or higher.
Perl module DBI version 1.40 or higher.
Perl module DBD::Mysql version 2.9004 or higher.
Perl module Apache::DBI version 0.93 or higher.
Perl module Net::IP version 1.21 or higher.
Perl module SOAP::Lite version 0.66 or higher (not mandatory)
MySQL version 4.1.0 or higher with InnoDB engine active.
Make utility like GNU make.
If you can use yast for managing package, I believe you could install all of them within 20 minutes. I won't say more about this.
- Installing Management/communication Server and Web Console
1)Download install package from http://nchc.dl.sourceforge.net/sourceforge/ocsinventory/OCSNG_LINUX_SERVER_1.01.tar.gz
2)unpack it
Suse:/mnt/hgfs/win/OCSNG # cp OCSNG_LINUX_SERVER_1.01.tar.gz /root
Suse:/mnt/hgfs/win/OCSNG # cd
Suse:~ # tar zxf OCSNG_LINUX_SERVER_1.01.tar.gz
Suse:~ # cd OCSNG_LINUX_SERVER_1.01/
Suse:~/OCSNG_LINUX_SERVER_1.01 #
3)run installer
Suse:~/OCSNG_LINUX_SERVER_1.01 # sh setup.sh
+----------------------------------------------------------+
| |
| Welcome to OCS Inventory NG Management server setup ! |
| |
+----------------------------------------------------------+
CAUTION: If upgrading Communication server from OCS Inventory NG 1.0 RC2 and
previous, please remove any Apache configuration for Communication Server!
Do you wish to continue ([y]/n)?y
Assuming Communication server 1.0 RC2 or previous is not installed
on this computer.
Starting OCS Inventory NG Management server setup from folder /root/OCSNG_LINUX_SERVER_1.01
Storing log in file /root/OCSNG_LINUX_SERVER_1.01/ocs_server_setup.log
+----------------------------------------------------------+
| Checking for database server properties... |
+----------------------------------------------------------+
Your MySQL client seems to be part of MySQL version 5.0.
Your computer seems to be running MySQL 4.1 or higher, good ;-)
Which host is running database server [localhost] ?
OK, database server is running on host localhost ;-)
On which port is running database server [3306] ?
OK, database server is running on port 3306 ;-)
+----------------------------------------------------------+
| Checking for Apache web server daemon... |
+----------------------------------------------------------+
which: no httpd in (/sbin:/usr/sbin:/usr/local/sbin:/opt/gnome/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/opt/opennms/bin)
which: no apache in (/sbin:/usr/sbin:/usr/local/sbin:/opt/gnome/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/opt/opennms/bin)
which: no apache2 in (/sbin:/usr/sbin:/usr/local/sbin:/opt/gnome/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/opt/opennms/bin)
Where is Apache daemon binary [] ?/usr/sbin/httpd2
OK, using Apache daemon /usr/sbin/httpd2 ;-)
+----------------------------------------------------------+
| Checking for Apache main configuration file... |
+----------------------------------------------------------+
Where is Apache main configuration file [/srv/www//etc/apache2/httpd.conf] ?/etc/apache2/httpd.conf
OK, using Apache main configuration file /etc/apache2/httpd.conf ;-)
+----------------------------------------------------------+
| Checking for Apache user account... |
+----------------------------------------------------------+
Which user account is running Apache web server [] ?wwwrun
OK, Apache is running under user account wwwrun ;-)
+----------------------------------------------------------+
| Checking for Apache group... |
+----------------------------------------------------------+
Which user group is running Apache web server [wwwrun] ?www
OK, Apache is running under users group www ;-)
+----------------------------------------------------------+
| Checking for PERL Interpreter... |
+----------------------------------------------------------+
Found PERL Intrepreter at ;-)
Where is PERL Intrepreter binary [/usr/bin/perl] ?/usr/bin/perl
OK, using PERL Intrepreter /usr/bin/perl ;-)
Do you wish to setup Communication server on this computer ([y]/n)?y
+----------------------------------------------------------+
| Checking for Make utility... |
+----------------------------------------------------------+
OK, Make utility found at ;-)
+----------------------------------------------------------+
| Checking for Apache Include configuration directory... |
+----------------------------------------------------------+
Setup has found Apache Include configuration directory in
.
If you are not using Include directive, please enter 'no'.
Where is Apache Include configuration directory [] ?/etc/apache2/conf.d
OK, Apache Include configuration directory /etc/apache2/conf.d found ;-)
+----------------------------------------------------------+
| Checking for Apache mod_perl version... |
+----------------------------------------------------------+
Checking for Apache mod_perl version 1.99_22 or higher
Found that mod_perl version 1.99_22 or higher is available.
OK, Apache is using mod_perl version 1.99_22 or higher ;-)
+----------------------------------------------------------+
| Checking for Communication server log directory... |
+----------------------------------------------------------+
Communication server can create detailled logs. This logs can be enabled
by setting interger value of LOGLEVEL to 1 in Administration console
menu Configuration.
Where to put Communication server log directory [/var/log/ocsinventory-NG] ?
OK, Communication server will put logs into directory /var/log/ocsinventory-NG ;-)
+----------------------------------------------------------+
| Checking for required Perl Modules... |
+----------------------------------------------------------+
Checking for DBI PERL module...
Found that PERL module DBI is available.
Checking for Apache::DBI PERL module...
Found that PERL module Apache::DBI is available.
Checking for DBD::mysql PERL module...
Found that PERL module DBD::mysql is available.
Checking for Compress::Zlib PERL module...
Found that PERL module Compress::Zlib is available.
Checking for XML::Simple PERL module...
Found that PERL module XML::Simple is available.
Checking for Net::IP PERL module...
Found that PERL module Net::IP is available.
Checking for SOAP::Lite PERL module...
Found that PERL module SOAP::Lite is available.
+----------------------------------------------------------+
| OK, looks good ;-) |
| |
| Configuring Communication server Perl modules... |
+----------------------------------------------------------+
WARNING: INSTALLSITESCRIPT is not a known parameter.
Checking if your kit is complete...
Looks good
'INSTALLSITESCRIPT' is not a known MakeMaker parameter name.
Writing Makefile for Apache::Ocsinventory
+----------------------------------------------------------+
| OK, looks good ;-) |
| |
| Preparing Communication server Perl modules... |
+----------------------------------------------------------+
+----------------------------------------------------------+
| OK, prepare finshed ;-) |
| |
| Installing Communication server Perl modules... |
+----------------------------------------------------------+
+----------------------------------------------------------+
| OK, Communication server Perl modules install finished;-)|
| |
| Creating Communication server log directory... |
+----------------------------------------------------------+
Creating Communication server log directory /var/log/ocsinventory-NG.
Fixing Communication server log directory files permissions.
Configuring logrotate for Communication server.
Writing communication server logrotate to file /etc/logrotate.d/ocsinventory-NG
+----------------------------------------------------------+
| OK, Communication server log directory created ;-) |
| |
| Now configuring Apache web server... |
+----------------------------------------------------------+
Writing communication server configuration to file /etc/apache2/conf.d/ocsinvent
+----------------------------------------------------------+
| OK, Communication server setup sucessfully finished ;-) |
| |
| Please, review /etc/apache2/conf.d/ocsinventory.conf
| to ensure all is good. Then restart Apache daemon. |
+----------------------------------------------------------+
Do you wish to setup Administration server (web administration console)
on this computer ([y]/n)?y
+----------------------------------------------------------+
| Checking for Apache root document directory... |
+----------------------------------------------------------+
Where is Apache root document directory [] ?/srv/www/htdocs
OK, Apache root document directory is /srv/www/htdocs ;-)
+----------------------------------------------------------+
| Checking for required Perl Modules... |
+----------------------------------------------------------+
Checking for DBI PERL module...
Found that PERL module DBI is available.
Checking for DBD::mysql PERL module...
Found that PERL module DBD::mysql is available.
Checking for XML::Simple PERL module...
Found that PERL module XML::Simple is available.
Checking for Net::IP PERL module...
Found that PERL module Net::IP is available.
+----------------------------------------------------------+
| Installing files for Administration server... |
+----------------------------------------------------------+
Creating directory /srv/www/htdocs/download.
Creating directory /srv/www/htdocs/ocsreports.
Copying files to /srv/www/htdocs/ocsreports.
Fixing directories and files permissions.
Configuring IPDISCOVER-UTIL Perl script.
Installing IPDISCOVER-UTIL Perl script.
Fixing permissions on IPDISCOVER-UTIL Perl script.
+----------------------------------------------------------+
| OK, Administration server installation finished ;-) |
| |
| Point your browser to http://server/ocsreports to |
| configure database server and create/update schema. |
+----------------------------------------------------------+
Setup has created a log file /root/OCSNG_LINUX_SERVER_1.01/ocs_server_setup.log. Please, save this file.
If you encounter error while running OCS Inventory NG Management server,
we can ask you to show us his content !
DON'T FORGET TO RESTART APACHE DAEMON !
Enjoy OCS Inventory NG ;-)
Suse:~/OCSNG_LINUX_SERVER_1.01 #
Suse:~/OCSNG_LINUX_SERVER_1.01 # /etc/init.d/apache2 restart
Syntax OK
Shutting down httpd2 (waiting for all children to terminate) done
Starting httpd2 (prefork) done
Suse:~/OCSNG_LINUX_SERVER_1.01 #
As we can see the installation is successful. If you are running a different Linux, you should input other settings.
- Configuring Management Server
The first warning message should be this.
You must raise both post_max_size and upload_max_filesize in your php.ini to correct this.
Do the following to fix it:
# vi php.ini
The default post_max_size is 8M, we are going to increase upload_max_filesize to 12M
; Maximum allowed size for uploaded files.
upload_max_filesize = 12M
We should restart apache to take it effect
Run this command:
/etc/init.d/apache2 restart
Press F5 to refresh the first web page, this warning is still there. Let's just go ahead to input the mysql >
MySql login : | |
MySql password : | |
MySql HostName : | |
xxxx
localhost
Click Send button.
There is a text box as the following:
Please enter the label of the windows client tag input box:
(Leave empty if you don't want a popup to be shown on each agent launch).
I'd like to use "Asset ID" for this field. Click 'Submit Query' button to finish it.
Now, you are able to log into web console from http://Ip_address/ocsreports/
Before you input admin/admin , you could use different languages. OCSNG 1.01 support 11 languages.
- Setting up Agents on openSuse and a Windows Xp client.
Installing a Linux agent:
Suse:~ # tar zxf OCSNG_LINUX_AGENT_1.01.tar.gz
Suse:~ # cd OCSNG_LINUX_AGENT_1.01/
Suse:~/OCSNG_LINUX_AGENT_1.01 # sh setup.sh
+----------------------------------------------------------+
| |
| Welcome to OCS Inventory NG Agent setup ! |
| |
+----------------------------------------------------------+
Writing log to file /root/OCSNG_LINUX_AGENT_1.01/ocs_agent_setup.log
+----------------------------------------------------------+
| Checking for previous installation... |
+----------------------------------------------------------+
Previous installation of OCS Inventory NG agent not found
+----------------------------------------------------------+
| Checking for supplied parameters... |
+----------------------------------------------------------+
No parameter found
OCS Inventory NG Agent setup running in user interactive mode
+----------------------------------------------------------+
| Checking for OCS Inventory NG Agent running method... |
+----------------------------------------------------------+
OCS Inventory NG Agent can be run through 2 methods:
- local: inventory will be generated locally to a file, without
interacting with Communication Server. Inventory results
must then be imported manually into the server through
Administration Console.
- http: Agent can connect to Communication Server and will interact
with it to know what is has to do (inventory, ipdiscover,
deployment...)
Which method will you use to generate the inventory ([http]/local) ?
OK, OCS Inventory NG agent will be running in
+----------------------------------------------------------+
| Checking for OCS Inventory NG Communication Server... |
+----------------------------------------------------------+
Which host is running OCS Inventory NG Communication Server [] ?localhost
On which port is running OCS Inventory NG Communication Server [80] ?
OK, OCS Inventory NG Communication Server is running on host
+----------------------------------------------------------+
| Checking for TAG administrative information value... |
+----------------------------------------------------------+
What is the value of TAG ([]) ?LiuZheng
OK, OCS Inventory NG agent will use
+----------------------------------------------------------+
| Checking for PERL Interpreter... |
+----------------------------------------------------------+
OK, PERL Intrepreter found at
+----------------------------------------------------------+
| Checking for C/C++ Compiler... |
+----------------------------------------------------------+
OK, C/C++ Compiler found at
+----------------------------------------------------------+
| Checking for Make utility... |
+----------------------------------------------------------+
OK, Make utility found at
+----------------------------------------------------------+
| Checking for dmidecode binaries... |
+----------------------------------------------------------+
Found dmidecode binaries version <2.8> at
+----------------------------------------------------------+
| Checking for Compress::Zlib PERL module... |
+----------------------------------------------------------+
OK, PERL module Compress::Zlib is available ;-)
+----------------------------------------------------------+
| Checking for XML::Simple PERL module... |
+----------------------------------------------------------+
OK, PERL module XML::Simple is available ;-)
+----------------------------------------------------------+
| Checking for Net::IP PERL module... |
+----------------------------------------------------------+
OK, PERL module Net::IP is available ;-)
+----------------------------------------------------------+
| Checking for LWP::UserAgent PERL module... |
+----------------------------------------------------------+
OK, PERL module LWP::UserAgent is available ;-)
+----------------------------------------------------------+
| Checking for Digest::MD5 PERL module... |
+----------------------------------------------------------+
OK, PERL module Digest::MD5 is available ;-)
+----------------------------------------------------------+
| Checking for Net::SSLeay PERL module... |
+----------------------------------------------------------+
OK, PERL module Net::SSLeay is available ;-)
+----------------------------------------------------------+
| Installing IPDISCOVER binary... |
+----------------------------------------------------------+
Building IPDISCOVER version 3
Installing IPDISCOVER version 3 into /usr/sbin
OK, IPDISCOVER version 3 setup successfully ;-)
+----------------------------------------------------------+
| Installing OCS Inventory NG Agent... |
+----------------------------------------------------------+
Configuring OCS Inventory NG Agent
Building OCS Inventory NG Agent
Installing OCS Inventory NG Agent
Creating OCS Inventory NG Agent symbolic link
OK, OCS Inventory NG Agent setup successfully ;-)
+----------------------------------------------------------+
| Creating OCS Inventory NG Agent log directory... |
+----------------------------------------------------------+
Creating OCS Inventory NG Agent log directory .
Configuring logrotate for OCS Inventory NG Agent.
Writing OCS Inventory NG Agent logrotate to file
+----------------------------------------------------------+
| Installing OCS Inventory NG Agent configuration files... |
+----------------------------------------------------------+
Creating OCS Inventory NG Agent
Creating OCS Inventory NG Agent
Writing OCS Inventory NG Agent configuration file
Creating OCS Inventory NG Agent
Writing OCS Inventory NG Agent
OK, OCS Inventory NG Agent configuration files setup successfully ;-)
+----------------------------------------------------------+
| Installing OCS Inventory NG Agent cron configuration... |
+----------------------------------------------------------+
Creating OCS Inventory NG Agent cron configuration file
Writing OCS Inventory NG Agent cron configuration file
OK, OCS Inventory NG Agent cron configuration file setup successfully ;-)
+----------------------------------------------------------+
| Lauching OCS Inventory NG Agent... |
+----------------------------------------------------------+
OK, OCS Inventory NG Agent runs successfully ;-)
Setup has created a log file /root/OCSNG_LINUX_AGENT_1.01/ocs_agent_setup.log. Please, save this file.
If you encounter error while running OCS Inventory NG Agent,
we can ask you to show us his content !
Enjoy OCS Inventory NG ;-)
Suse:~/OCSNG_LINUX_AGENT_1.01 #
The installer will install agent and a cron job on target Linux system. The job will launch OCS Inventory NG Agent once a day under root account, that means a update will get into database every day. Now you will see one single node in the web console.
->Installing a Windows Agent
OCSNG 1.01 does not support Vista yet, so I tested it on Windows Xp/2K/2K3 and it works very well.
You will donwload OCSNG_WIN32_AGENT_1.01_repack.zip
Unzip it and run ocsagent.exe. I'd like to test a standalone version agent, it is not a service version agent.
Double click ocsagent.exe, then you will get a new folder C:\ocs-ng
Create a batch file in this folder.
My scan.bat file as below:
_________________________________________
OCSInventory.exe /server:Ip_Address_of_server /np /tag:"LiuZheng" /hkcu /force
_________________________________________
In order to get inventory scan into database, you will double click scan.bat file. Now, you will get one more node in web console. It is a good idea to copy c:\ocs-ng folder on a USB key. Then you are able to run inventory scan on other Windows machines. If you are going to get update inventory from Windows machines, you have to install OcsAgentSetup.exe agent on them.
If you have any issue please add a comment blow or send me a email. I could help you later if I might have any idea.
OCSNG现在还没有中文的界面,它的代理和服务器端是支持中文的.如果你在一些中文的操作系统上做了清单扫描,扫描的某些信息在Webconsole中查看的结果可能是乱码.这时候,你可以进入浏览器的内码设置,设置成中文后,你会看到正常的中文显示.这说明它是可以支持多语言的.
为了在做资产管理的时候对于用户比较方便,我们可以是用gpli项目. GPLI有中文界面,而且能提供流程支持.GPLI的安装和配置手册待续.
这个安装手册用英文写,如果给您带了了不便请谅解,您有什么问题的话欢迎给我留言,谢谢观看!
great! thanks!
回复删除