How to install OCSNG 1.0.1 on OpenSuse 10.2

下面我将描述如何安装OCSNG服务器和客户端.服务器的安装在openSuse Linux中,文中将提到Linux和Windows代理的安装方法.最终能在界面中看到两个节点的清单信息,不过只有Linux的哪个会每天更新.\n\nThis article is talking about how to install OCSNG 1.0.1 on a openSuSE 10.2 system.\n

    \n
  • Requirements:
  • \n

\nYou have to meet the following requirements.\n Apache version 1.3.33 or higher / Apache version 2.0.46 or higher.\n Mod_perl version 1.29 or higher.\n Mod_php version 4.3.2 or higher.\n PHP 4.3.2 or higher, with ZIP and GD support enabled.\n PERL 5.6 or higher.\n Perl module XML::Simple version 2.12 or higher.\n Perl module Compress::Zlib version 1.33 or higher.\n Perl module DBI version 1.40 or higher.\n Perl module DBD::Mysql version 2.9004 or higher.\n Perl module Apache::DBI version 0.93 or higher.\n Perl module Net::IP version 1.21 or higher.\n Perl module SOAP::Lite version 0.66 or higher (not mandatory)\n MySQL version 4.1.0 or higher with InnoDB engine active.\n Make utility like GNU make.\n\nIf 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.\n

    \n
  • Installing Management/communication Server and Web Console
  • \n

\nYou must have root privileges to setup management server. Login OS as root, then do the following:\n1)Download install package from http://nchc.dl.sourceforge.net/sourceforge/ocsinventory/OCSNG_LINUX_SERVER_1.01.tar.gz\n\n2)unpack it\nSuse:/mnt/hgfs/win/OCSNG # cp OCSNG_LINUX_SERVER_1.01.tar.gz /root\nSuse:/mnt/hgfs/win/OCSNG # cd\nSuse:~ # tar zxf OCSNG_LINUX_SERVER_1.01.tar.gz\nSuse:~ # cd OCSNG_LINUX_SERVER_1.01/\nSuse:~/OCSNG_LINUX_SERVER_1.01 #\n\n3)run installer\nSuse:~/OCSNG_LINUX_SERVER_1.01 # sh setup.sh\n\n+———————————————————-+\n| |\n| Welcome to OCS Inventory NG Management server setup ! |\n| |\n+———————————————————-+\n\nCAUTION: If upgrading Communication server from OCS Inventory NG 1.0 RC2 and\nprevious, please remove any Apache configuration for Communication Server!\n\nDo you wish to continue ([y]/n)?y\nAssuming Communication server 1.0 RC2 or previous is not installed\non this computer.\n\nStarting OCS Inventory NG Management server setup from folder /root/OCSNG_LINUX_SERVER_1.01\nStoring log in file /root/OCSNG_LINUX_SERVER_1.01/ocs_server_setup.log\n\n+———————————————————-+\n| Checking for database server properties… |\n+———————————————————-+\n\nYour MySQL client seems to be part of MySQL version 5.0.\nYour computer seems to be running MySQL 4.1 or higher, good ;-)\n\nWhich host is running database server [localhost] ?\nOK, database server is running on host localhost ;-)\n\nOn which port is running database server [3306] ?\nOK, database server is running on port 3306 ;-)\n\n+———————————————————-+\n| Checking for Apache web server daemon… |\n+———————————————————-+\n\nwhich: 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)\nwhich: 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)\nwhich: 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)\nWhere is Apache daemon binary [] ?/usr/sbin/httpd2\nOK, using Apache daemon /usr/sbin/httpd2 ;-)\n\n+———————————————————-+\n| Checking for Apache main configuration file… |\n+———————————————————-+\n\nWhere is Apache main configuration file [/srv/www//etc/apache2/httpd.conf] ?/etc/apache2/httpd.conf\nOK, using Apache main configuration file /etc/apache2/httpd.conf ;-)\n\n+———————————————————-+\n| Checking for Apache user account… |\n+———————————————————-+\n\nWhich user account is running Apache web server [] ?wwwrun\nOK, Apache is running under user account wwwrun ;-)\n\n+———————————————————-+\n| Checking for Apache group… |\n+———————————————————-+\n\nWhich user group is running Apache web server [wwwrun] ?www\nOK, Apache is running under users group www ;-)\n\n+———————————————————-+\n| Checking for PERL Interpreter… |\n+———————————————————-+\n\nFound PERL Intrepreter at ;-)\nWhere is PERL Intrepreter binary [/usr/bin/perl] ?/usr/bin/perl\nOK, using PERL Intrepreter /usr/bin/perl ;-)\n\nDo you wish to setup Communication server on this computer ([y]/n)?y\n\n+———————————————————-+\n| Checking for Make utility… |\n+———————————————————-+\n\nOK, Make utility found at ;-)\n\n+———————————————————-+\n| Checking for Apache Include configuration directory… |\n+———————————————————-+\n\nSetup has found Apache Include configuration directory in\n.\nIf you are not using Include directive, please enter ‘no’.\nWhere is Apache Include configuration directory [] ?/etc/apache2/conf.d\nOK, Apache Include configuration directory /etc/apache2/conf.d found ;-)\n\n+———————————————————-+\n| Checking for Apache mod_perl version… |\n+———————————————————-+\n\nChecking for Apache mod_perl version 1.99_22 or higher\nFound that mod_perl version 1.99_22 or higher is available.\nOK, Apache is using mod_perl version 1.99_22 or higher ;-)\n\n+———————————————————-+\n| Checking for Communication server log directory… |\n+———————————————————-+\n\nCommunication server can create detailled logs. This logs can be enabled\nby setting interger value of LOGLEVEL to 1 in Administration console\nmenu Configuration.\nWhere to put Communication server log directory [/var/log/ocsinventory-NG] ?\nOK, Communication server will put logs into directory /var/log/ocsinventory-NG ;-)\n\n+———————————————————-+\n| Checking for required Perl Modules… |\n+———————————————————-+\n\nChecking for DBI PERL module…\nFound that PERL module DBI is available.\nChecking for Apache::DBI PERL module…\nFound that PERL module Apache::DBI is available.\nChecking for DBD::mysql PERL module…\nFound that PERL module DBD::mysql is available.\nChecking for Compress::Zlib PERL module…\nFound that PERL module Compress::Zlib is available.\nChecking for XML::Simple PERL module…\nFound that PERL module XML::Simple is available.\nChecking for Net::IP PERL module…\nFound that PERL module Net::IP is available.\nChecking for SOAP::Lite PERL module…\nFound that PERL module SOAP::Lite is available.\n\n+———————————————————-+\n| OK, looks good ;-) |\n| |\n| Configuring Communication server Perl modules… |\n+———————————————————-+\n\nWARNING: INSTALLSITESCRIPT is not a known parameter.\nChecking if your kit is complete…\nLooks good\n‘INSTALLSITESCRIPT’ is not a known MakeMaker parameter name.\nWriting Makefile for Apache::Ocsinventory\n\n+———————————————————-+\n| OK, looks good ;-) |\n| |\n| Preparing Communication server Perl modules… |\n+———————————————————-+\n\n+———————————————————-+\n| OK, prepare finshed ;-) |\n| |\n| Installing Communication server Perl modules… |\n+———————————————————-+\n\n+———————————————————-+\n| OK, Communication server Perl modules install finished;-)|\n| |\n| Creating Communication server log directory… |\n+———————————————————-+\n\nCreating Communication server log directory /var/log/ocsinventory-NG.\n\nFixing Communication server log directory files permissions.\nConfiguring logrotate for Communication server.\nWriting communication server logrotate to file /etc/logrotate.d/ocsinventory-NG\n\n+———————————————————-+\n| OK, Communication server log directory created ;-) |\n| |\n| Now configuring Apache web server… |\n+———————————————————-+\n\nWriting communication server configuration to file /etc/apache2/conf.d/ocsinvent\n\n+———————————————————-+\n| OK, Communication server setup sucessfully finished ;-) |\n| |\n| Please, review /etc/apache2/conf.d/ocsinventory.conf\n| to ensure all is good. Then restart Apache daemon. |\n+———————————————————-+\n\nDo you wish to setup Administration server (web administration console)\non this computer ([y]/n)?y\n\n+———————————————————-+\n| Checking for Apache root document directory… |\n+———————————————————-+\n\nWhere is Apache root document directory [] ?/srv/www/htdocs\nOK, Apache root document directory is /srv/www/htdocs ;-)\n\n+———————————————————-+\n| Checking for required Perl Modules… |\n+———————————————————-+\n\nChecking for DBI PERL module…\nFound that PERL module DBI is available.\nChecking for DBD::mysql PERL module…\nFound that PERL module DBD::mysql is available.\nChecking for XML::Simple PERL module…\nFound that PERL module XML::Simple is available.\nChecking for Net::IP PERL module…\nFound that PERL module Net::IP is available.\n\n+———————————————————-+\n| Installing files for Administration server… |\n+———————————————————-+\n\nCreating directory /srv/www/htdocs/download.\n\nCreating directory /srv/www/htdocs/ocsreports.\n\nCopying files to /srv/www/htdocs/ocsreports.\n\nFixing directories and files permissions.\n\nConfiguring IPDISCOVER-UTIL Perl script.\n\nInstalling IPDISCOVER-UTIL Perl script.\n\nFixing permissions on IPDISCOVER-UTIL Perl script.\n\n+———————————————————-+\n| OK, Administration server installation finished ;-) |\n| |\n| Point your browser to http://server/ocsreports to |\n| configure database server and create/update schema. |\n+———————————————————-+\n\nSetup has created a log file /root/OCSNG_LINUX_SERVER_1.01/ocs_server_setup.log. Please, save this file.\nIf you encounter error while running OCS Inventory NG Management server,\nwe can ask you to show us his content !\n\nDON’T FORGET TO RESTART APACHE DAEMON !\n\nEnjoy OCS Inventory NG ;-)\n\nSuse:~/OCSNG_LINUX_SERVER_1.01 #\nSuse:~/OCSNG_LINUX_SERVER_1.01 # /etc/init.d/apache2 restart\nSyntax OK\nShutting down httpd2 (waiting for all children to terminate) done\nStarting httpd2 (prefork) done\nSuse:~/OCSNG_LINUX_SERVER_1.01 #\n\nAs we can see the installation is successful. If you are running a different Linux, you should input other settings.\n

    \n
  • Configuring Management Server
  • \n

\nThe following is a post-install setup for management server. Y will go through it from a web browser. Open FireFox it is my current favorite browser and point it on URL http://Ip_address/ocsreports\n\nThe first warning message should be this.\n\nWARNING: You will not be able to build any auto deployment package with size greater than 2M.\nYou must raise both post_max_size and upload_max_filesize in your php.ini to correct this.\nDo the following to fix it:\n# vi php.ini\nThe default post_max_size is 8M, we are going to increase upload_max_filesize to 12M\n; Maximum allowed size for uploaded files.\nupload_max_filesize = 12MWe should restart apache to take it effect\nRun this command:\n /etc/init.d/apache2 restart\n\nPress F5 to refresh the first web page, this warning is still there. Let’s just go ahead to input the mysql >\n

\n
\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

MySql login :
MySql password :
MySql HostName :
 

\nroot\nxxxx\nlocalhost\n\nClick Send button.\n\nThere is a text box as the following:\n\nPlease enter the label of the windows client tag input box:\n(Leave empty if you don’t want a popup to be shown on each agent launch).\n\nI’d like to use “Asset ID” for this field. Click ‘Submit Query’ button to finish it.\n\nNow, you are able to log into web console from http://Ip_address/ocsreports/\nBefore you input admin/admin , you could use different languages. OCSNG 1.01 support 11 languages.\n

    \n
  • Setting up Agents on openSuse and a Windows Xp client.
  • \n

\nDownload agent packages from internet.\n\nInstalling a Linux agent:\nSuse:~ # tar zxf OCSNG_LINUX_AGENT_1.01.tar.gz\nSuse:~ # cd OCSNG_LINUX_AGENT_1.01/\n\nSuse:~/OCSNG_LINUX_AGENT_1.01 # sh setup.sh\n\n+———————————————————-+\n| |\n| Welcome to OCS Inventory NG Agent setup ! |\n| |\n+———————————————————-+\nWriting log to file /root/OCSNG_LINUX_AGENT_1.01/ocs_agent_setup.log\n\n+———————————————————-+\n| Checking for previous installation… |\n+———————————————————-+\n\nPrevious installation of OCS Inventory NG agent not found\n\n+———————————————————-+\n| Checking for supplied parameters… |\n+———————————————————-+\n\nNo parameter found\nOCS Inventory NG Agent setup running in user interactive mode\n\n+———————————————————-+\n| Checking for OCS Inventory NG Agent running method… |\n+———————————————————-+\n\nOCS Inventory NG Agent can be run through 2 methods:\n- local: inventory will be generated locally to a file, without\ninteracting with Communication Server. Inventory results\nmust then be imported manually into the server through\nAdministration Console.\n- http: Agent can connect to Communication Server and will interact\nwith it to know what is has to do (inventory, ipdiscover,\ndeployment…)\nWhich method will you use to generate the inventory ([http]/local) ?\nOK, OCS Inventory NG agent will be running in mode ;-)\n\n+———————————————————-+\n| Checking for OCS Inventory NG Communication Server… |\n+———————————————————-+\n\nWhich host is running OCS Inventory NG Communication Server [] ?localhost\nOn which port is running OCS Inventory NG Communication Server [80] ?\nOK, OCS Inventory NG Communication Server is running on host\n and port <80> ;-)\n\n+———————————————————-+\n| Checking for TAG administrative information value… |\n+———————————————————-+\n\nWhat is the value of TAG ([]) ?LiuZheng\nOK, OCS Inventory NG agent will use\n as ;-)\n\n+———————————————————-+\n| Checking for PERL Interpreter… |\n+———————————————————-+\n\nOK, PERL Intrepreter found at ;-)\n\n+———————————————————-+\n| Checking for C/C++ Compiler… |\n+———————————————————-+\n\nOK, C/C++ Compiler found at ;-)\n\n+———————————————————-+\n| Checking for Make utility… |\n+———————————————————-+\n\nOK, Make utility found at ;-)\n\n+———————————————————-+\n| Checking for dmidecode binaries… |\n+———————————————————-+\n\nFound dmidecode binaries version <2.8> at ;-)\n\n+———————————————————-+\n| Checking for Compress::Zlib PERL module… |\n+———————————————————-+\n\nOK, PERL module Compress::Zlib is available ;-)\n\n+———————————————————-+\n| Checking for XML::Simple PERL module… |\n+———————————————————-+\n\nOK, PERL module XML::Simple is available ;-)\n\n+———————————————————-+\n| Checking for Net::IP PERL module… |\n+———————————————————-+\n\nOK, PERL module Net::IP is available ;-)\n\n+———————————————————-+\n| Checking for LWP::UserAgent PERL module… |\n+———————————————————-+\n\nOK, PERL module LWP::UserAgent is available ;-)\n\n+———————————————————-+\n| Checking for Digest::MD5 PERL module… |\n+———————————————————-+\n\nOK, PERL module Digest::MD5 is available ;-)\n\n+———————————————————-+\n| Checking for Net::SSLeay PERL module… |\n+———————————————————-+\n\nOK, PERL module Net::SSLeay is available ;-)\n\n+———————————————————-+\n| Installing IPDISCOVER binary… |\n+———————————————————-+\n\nBuilding IPDISCOVER version 3\nInstalling IPDISCOVER version 3 into /usr/sbin\nOK, IPDISCOVER version 3 setup successfully ;-)\n\n+———————————————————-+\n| Installing OCS Inventory NG Agent… |\n+———————————————————-+\n\nConfiguring OCS Inventory NG Agent\nBuilding OCS Inventory NG Agent\nInstalling OCS Inventory NG Agent\nCreating OCS Inventory NG Agent symbolic link\nOK, OCS Inventory NG Agent setup successfully ;-)\n\n+———————————————————-+\n| Creating OCS Inventory NG Agent log directory… |\n+———————————————————-+\n\nCreating OCS Inventory NG Agent log directory .\nConfiguring logrotate for OCS Inventory NG Agent.\nWriting OCS Inventory NG Agent logrotate to file\n\n+———————————————————-+\n| Installing OCS Inventory NG Agent configuration files… |\n+———————————————————-+\n\nCreating OCS Inventory NG Agent configuration file\nCreating OCS Inventory NG Agent configuration directory\nWriting OCS Inventory NG Agent configuration file\nCreating OCS Inventory NG Agent configuration file\nWriting OCS Inventory NG Agent configuration file\nOK, OCS Inventory NG Agent configuration files setup successfully ;-)\n\n+———————————————————-+\n| Installing OCS Inventory NG Agent cron configuration… |\n+———————————————————-+\n\nCreating OCS Inventory NG Agent cron configuration file\nWriting OCS Inventory NG Agent cron configuration file\nOK, OCS Inventory NG Agent cron configuration file setup successfully ;-)\n\n+———————————————————-+\n| Lauching OCS Inventory NG Agent… |\n+———————————————————-+\n\nOK, OCS Inventory NG Agent runs successfully ;-)\n\nSetup has created a log file /root/OCSNG_LINUX_AGENT_1.01/ocs_agent_setup.log. Please, save this file.\nIf you encounter error while running OCS Inventory NG Agent,\nwe can ask you to show us his content !\n\nEnjoy OCS Inventory NG ;-)\n\nSuse:~/OCSNG_LINUX_AGENT_1.01 #\n\nThe 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.\n\n->Installing a Windows Agent\nOCSNG 1.01 does not support Vista yet, so I tested it on Windows Xp/2K/2K3 and it works very well.\nYou will donwload OCSNG_WIN32_AGENT_1.01_repack.zip\nUnzip it and run ocsagent.exe. I’d like to test a standalone version agent, it is not a service version agent.\nDouble click ocsagent.exe, then you will get a new folder C:\ocs-ng\nCreate a batch file in this folder.\nMy scan.bat file as below:\n_________________________________________\nOCSInventory.exe /server:Ip_Address_of_server /np /tag:”LiuZheng” /hkcu /force\n\n_________________________________________\nIn 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.\n\nIf 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.\n\nOCSNG现在还没有中文的界面,它的代理和服务器端是支持中文的.如果你在一些中文的操作系统上做了清单扫描,扫描的某些信息在Webconsole中查看的结果可能是乱码.这时候,你可以进入浏览器的内码设置,设置成中文后,你会看到正常的中文显示.这说明它是可以支持多语言的.\n\n为了在做资产管理的时候对于用户比较方便,我们可以是用gpli项目. GPLI有中文界面,而且能提供流程支持.GPLI的安装和配置手册待续.\n\n这个安装手册用英文写,如果给您带了了不便请谅解,您有什么问题的话欢迎给我留言,谢谢观看!

\r\n
\r\n 分享到:\r\n QQ空间\r\n 新浪微博\r\n 腾讯微博\r\n 微信\r\n 更多\r\n \r\n
\r\n\r\n\r\n

Comments:4

  1. 你好,我在 Webconsole 端查看客户端的信息,但是中文的信息就显示乱码,试过修改IE 的内码设置改成中文都是一样.请问有没有办法解决?

  2. 看似不是console 的问题,与可能是代理程序或者服务器不支持中文的事情。我也遇到此问题了,但是并没有去解决,如果你有了进一步的解决方法,别忘了在给我回复一下哦,谢谢!

  3. 我下了ocsng1.02.1版本的。\n先装OcsWin32ServerSetup.exe;再装OcsAgentSetup.exe;完了运行Ocs_contact.exe(OcsAgentSetup.exe安装目录里的一个程序)。结果ocsng终于显示了我自己电脑上的软硬件信息。\n\n我想请教一下:\n1.ocsng可以收集其他电脑的信息吗?要如何连起来呢?\n2.我装的明明是英文版,但收集的信息中还是存在一些乱码现象。不知道怎么回事,ocsng有中文版吗?\n\n我是个彻头彻尾的新手,问的问题可能够不上档次,若大虾能够拨冗指点,小女子感激涕零~~

Leave a Reply

Your email address will not be published. Required fields are marked *