開源資產管理軟體—OCS-NG

火星人 @ 2014-03-04 , reply:0


開源資產管理軟體—OCS-NG

OCS Inventory-NG(Open Computer and Software Inventory Next Generation)是一款開源的用於幫助網路或系統管理員來跟蹤網路中計算機配置與軟體安裝情況的應用程序。收集到硬體和系統信息請查看:http://www.ocsinventory-ng.org/index.php?page=features 。
OCS Inventory 也可以用來發現在您網路中所有的活動設備,例如,交換機、路由器、網路印表機,這其中的每一個,您都可以通過 MAC 或者 IP地址來對它們進行分類。當OCS Inventory 管理控制台是運行在LINUX 上時,如果 nmap 和 nmblookup 服務是可用的,您將可以通過掃描IP和子網路來了解那些未被列入清單主機的詳細信息。另外,您還可以通過 OCS Inventory 部署安裝包到客戶端計算機上。
OCS Inventory NG 支持的系統
Agent has been henged on the following operating systems:
Windows 系統:
Windows 95 with DCOM95 (or IE 4 or higher)
Windows 98
Windows 98 Second Edition
Windows NT4 Workstation with IE 4 or higher
Windows NT4 Server with IE 4 or higher
Windows 2000 Professional
Windows 2000 Server/Advanced Server
Windows XP Home Edition
Windows XP Professional Edition
Windows Server 2003
Windows Vista
Linux 系統:
Centos Linux
Debian Linux
Fedora Core Linux
Gentoo Linux
Knoppix Linux
Mandriva Linux
RedHat Linux
Slackware Linux
SuSE Linux
Trustix Linux
Ubuntu Linux
There is also agents for MacOS X, Sun Solaris, *BSD and IBM AIX (see section Active Contributions)
OCS Inventory NG Server
Management server has been henged on the following platforms:
Windows 2000 Professional
Windows 2000 Server
Windows XP Professional Edition
Windows Server 2003
Centos Linux
Debian Linux
Fedora Core Linux
Mandriva Linux
RedHat Linux
SuSE Linux
Ubuntu Linux
Some users reports that it works fine on
Gentoo Linux
Knoppix Linux
Slackware Linux
Ubuntu Linux
Sun Solaris
FreeBSD
OCS Inventory NG 架構組件
        OCS Inventory NG 通過在客戶端上運行一個代理程序(agent)來收集所有的硬體的信息和軟體安裝信息。使用管理伺服器(Management Server)來集中處理、查看庫存清單結果和創建部署包。在管理伺服器(Management Server)與代理程序(agent)之間通過 http/https 來進行通信,所有的通信數據都使用 zlib 壓縮成 xml 格式,以便減小網路的平均流量。
代理程序(agent)需要安裝在客戶端計算機上,在 Windwos 系統下,OCS Inventory NG 提供了一個工具,使您可以通過Active Directory GPO 或登錄腳本來輕鬆部署代理程序(agent)。在 Linux 系統下,只能通過手工來安裝代理程序(agent)。
管理伺服器包含了4個組件:
Data Server 用於儲存收集到的客戶端的軟硬體信息。
Communication server 用於支持資料庫伺服器與代理之間的http 通信。
Deployment server 用於儲存所有的包部署配置信息(需要https 支持!)
Administration console        允許管理員通過喜愛的瀏覽器來查詢資料庫伺服器的庫存信息。
這4個組件可以安裝在一台計算機上,也可以安裝在不同的計算機以便可以實現負載。如果網路中的客戶端數量超過10000的話,那麼最好使用兩個或更多的不同伺服器,一個用來做資料庫伺服器+通信伺服器,另一個用來做資料庫複製伺服器+管理伺服器+部署伺服器。
《解決方案》

本帖最後由 liheng 於 2012-10-10 16:31 編輯

安裝管理伺服器       
        安裝管理伺服器,請確保你的系統滿足以下條件,以下所有的條件都為必須條件:
Requirements:
You have to meet the following requirements.
 Apache version 1.3.33or 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.

本文的約定:
1、默認所有的安裝包都放在 /root 下面
開始安裝
安裝mysql
# cd /usr/local
# tar xzvf /root/mysql-5.0.51a-linux-i686.tar.gz
# groupadd mysql
# useradd -g mysql mysql
# ln -s /usr/local/mysql-5.0.51a-linux-i686 /usr/local/mysql
# cd mysql
# chown -R mysql .
# chgrp -R mysql .
# ./scripts/mysql_install_db --user=mysql &
# chown -R root .
# chown -R mysql data
# ./bin/mysqld_safe —user=mysql &
查看3306 埠是否處於監聽狀態
# netstat -tlunp
#cp support-files/mysql.server /etc/rc.d/init.d/mysqld
#chmod 755 /etc/init.d/mysqld
#chkconfig —add mysqld
#chkconfig —level 35 mysqld on
# mkdir /usr/local/mysql/lib/mysql
# chown root.mysql /usr/local/mysql/lib/mysql
# chwon root.mysql /usr/local/mysql/include/mysql
# ln –s /usr/local/mysql/lib/* /usr/local/mysql/lib/mysql
# ln –s /usr/local/mysql/include/* /usr/local/mysql/include/mysql
# echo 「/usr/local/mysql/lib/mysql」 >> /etc/ld.so.conf
# ldconfig
安裝APACHE
# cd /usr/local
# tar xzvf /root/httpd-2.2.4.tar.gz
# cd httpd-2.2.4
# ./configure —prefix=/usr/lcoal/apache --enable-so —enable-rewrite
# make
# make install
# echo 「/usr/local/apache/bin/apachectl start」 >> /etc/rc.local
# cd /usr/lo        cal
# tar xzvf /root/mod_perl-2.0.4.tar.gz
# cd mod_perl-2.0.4
# perl Makefile.PL MP_APXS=/usr/local/apache/bin/apsx
# make
# make install
安裝 PHP
# cd /usr/local
# tar xzvf /root/php-5.2.3.tar.gz
# mkdir -p /usr/local/php
# cd php-5.2.3
# ./configure —prefix=/usr/local/php  —with-apxs2=/usr/local/apache/bin/apxs   —with-mysql=/usr/local/mysql
--with-mysqli=/usr/local/mysql/bin/mysql_config     —with-png-dir  —with-jpeg-dir   —with-zlib-dir   —with-freetype-dir  —with-gd    —enable-zip
# make
# make install
# cp php.ini-dist  /usr/local/php/lib/php.ini
編輯apache配置文件httpd.conf,以apache支持php
# vi /usr/local/apache/conf/httpd.conf
# 添加如下二行
  AddType application/x-httpd-php  .php
  AddType application/x-httpd-php-source  .phps

# 定位至DirectoryIndex index.html
  修改為:
   DirectoryIndex  index.php  index.html

# cd
//***********紅帽5.0 不用裝 perl-xml-simple, 系統自帶有,用 rpm -qa | grep perl 查看
# rpm -ivh perl-XML-Simple-2.18-1.el4.rf.noarch.rpm
***************************************************\\\\\\\\\\\\\\
# tar xzvf XML-SAX-Expat-0.38.tar.gz
# cd XML-SAX-Expat-0.38
# perl Makefile.PL
# make
# make install
# cd
# tar XML-Simple-2.18.tar .gz
# cd XML-Simple-2.18
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf Compress-Raw-Zlib-2.011.tar.gz
# cd Compress-Raw-Zlib-2.011
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf IO-Compress-Base-2.011.tar.gz
# cd IO-Compress-Base-2.011
# perl Makefile.PL
# make
# make install
# cd
# tar xvzf IO-Compress-Zlib-2.011.tar.gz
# cd IO-Compress-Zlib-2.011
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf DBI-1.604.tar.gz
# cd DBI-1.604
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf DBD-mysql-4.007.tar.gz
# cd DBD-mysql-4.007
# perl Makefile.PL --libs=」-L/usr/local/mysql/lib/mysql -lmysqlclient -lz」 --cflags=-I/usr/local/mysql/include/mysql
# make
# make install
# cd
# tar xzvf Digest-SHA1-2.11.tar.gz
# cd Digest-SHA1-2.11
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf Apache-DBI-1.07.tar.gz
# cd Apache-DBI-1.07
#  perl Makefile.PL
# make
# make install
# cd
# tar xzvf Net-IP-1.25.tar.gz
# cd Net-IP-1.25
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf IO-Zlib-1.09.tar.gz
# cd IO-Zlib-1.09
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf Algorithm-Diff-1.1902.tar.gz
# cd Algorithm-Diff-1.1902
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf Text-Diff-0.35.tar.gz
# cd Text-Diff-0.35
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf Archive-Tar-1.38.tar.gz
# cd Archive-Tar-1.38
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf ExtUtils-Install-1.50.tar.gz
# cd ExUtils-Install-1.50
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf ExtUtils-CBuilder-0.23.tar.gz
# cd ExtUtils-CBuilder-0.23
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf ExtUtils-ParseXS-2.19.tar.gz
# cd ExtUtils-ParseXS-2.19
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf File-Remove-1.41.tar.gz
# cd File-Remove-1.41
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf Crypt-CapnMidNite-1.00.tar.gz
# cd Crypt-CapnMidNite-1.00
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf Crypt-License-2.04.tar.gz
# cd Crypt-License-2.04
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf Module-CoreList-2.15.tar.gz
# cd Module-CoreList-2.15
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf Digest-SHA-5.47.tar.gz
# cd Digest-SHA-5.47
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf Module-Signature-0.55.tar.gz
# cd Module-Signature-0.55
# perl Makefile.PL
Looking for GNU Privacy Guard (gpg), a cryptographic signature tool...
GnuPG found (/usr/bin/gpg).
Import PAUSE and author keys to GnuPG?   直接回車
Importing... done.
Locating required external dependency bin:gpg... found at /usr/bin/gpg.
*** Module::AutoInstall version 1.02
*** Checking for Perl dependencies...

- heng::More       ...loaded. (0.62)
- IO::Socket::INET ...loaded. (1.29)
==> Auto-install the 1 mandatory module(s) from CPAN? n
//這裡選擇NO,不從CPAN 網站上自動安裝
==> The module(s) are mandatory! Really skip? y
*** Module::AutoInstall configuration finished.
Checking if your kit is complete...
Looks good
Writing Makefile for Module::Signature
# make
# make install
# cd
# tar xzvf Pod-Escapes-1.04.tar.gz
# cd Pod-Escapes-1.04
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf Pod-Simple-3.07.tar.gz
# cd Pod-Simple-3.07
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf podlators-2.1.1.tar.gz
# cd podlators-2.1.1
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf Regexp-Common-2.122.tar.gz
# cd Regexp-Common-2.122
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf Pod-Readme-0.09.tar.gz
# cd Pod-Readme-0.09
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf version-0.7501.tar.gz
# cd version-0.7501
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf Module-Build-0.2808.tar.gz
# cd Module-Build-0.2808
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf Module-ScanDeps-0.84.tar.gz
# cd Module-ScanDeps-0.84
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf PAR-Dist-0.31.tar.gz
# cd PAR-Dist-0.31
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf YAML-Tiny-1.32.tar.gz
# cd YAML-Tiny-1.32
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf Module-Install-0.75.tar.gz
# cd Module-Install-0.75
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf Digest-MD5-2.36.tar.gz
# cd Digest-MD5-2.36
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf Digest-HMAC-1.01.tar.gz
# cd Digest-HMAC-1.01
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf Authen-SASL-2.11.tar.gz
# cd Authen-SASL-2.11
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf XML-Stream-1.22.tar.gz
# cd XML-Stream-1.22
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf Net-XMPP-1.02.tar.gz
# cd Net-XMPP-1.02
# perl Makefile.PL
# make
# make install
# cd
# tar xzvf Net-Jabber-2.0.tar.gz
# cd Net-Jabber-2.0
# perl Makefile.PL
# make
# make install
# cd
#  tar xzvf SOAP-Lite-0.710.06.tar.gz
# cd SOAP-Lite-0.710.06
# perl Makefile.PL
We are about to install SOAP::Lite and for your convenience will provide
you with list of modules and prerequisites, so you'll be able to choose
only modules you need for your configuration.

XMLRPC::Lite, UDDI::Lite, and XML::Parser::Lite are included by default.
Installed transports can be used for both SOAP::Lite and XMLRPC::Lite.

Press <enter> to see the detailed list. #按回車鍵

Feature                       Prerequisites                Install?
----------------------------- ---------------------------- --------
Core Package                  [*] Scalar::Util             always
                              [*] heng::More
                              [*] URI
                              [*] MIME::Base64
                              [ ] version
                              [*] XML::Parser (v2.23)
Client HTTP support           [*] LWP::UserAgent           always
Client HTTPS support          [*] Crypt::SSLeay            [ yes ]
Client SMTP/sendmail support  [ ] MIME::Lite               [ no ]
Client FTP support            [*] IO::File                 [ yes ]
                              [*] Net::FTP
Standalone HTTP server        [*] HTTP::Daemon             [ yes ]
Apache/mod_perl server        [ ] Apache                   [ no ]
FastCGI server                [ ] FCGI                     [ no ]
POP3 server                   [ ] MIME::Parser             [ no ]
                              [*] Net::POP3
IO server                     [*] IO::File                 [ yes ]
MQ transport support          [ ] MQSeries                 [ no ]
JABBER transport support      [* ] Net::Jabber              [ no ]
MIME messages                 [ ] MIME::Parser             [ no ]
DIME messages                 [ ] IO::Scalar (v2.105)      [ no ]
                              [ ] DIME::Tools (v0.03)
                              [ ] Data::UUID (v0.11)
SSL Support for TCP Transport [ ] IO::Socket::SSL          [ no ]
Compression support for HTTP  [ ] Compress::Zlib           [ no ]
MIME interoperability w/ Axis [ ] MIME::Parser (v6.106)    [ no ]
--- An asterix '[*]' indicates if the module is currently installed.
// 在上面紅色加粗字體處,顯示有一個必須的組件 Net::Jabber 沒有安裝,開始我沒有在意,就這樣編譯下去,但到安裝 OCS_SERVER 時,提示系統沒有安裝 SOAP-Lite。這可能是由於必須的組件 Net::Jabber 沒有安裝,而導致SOAP-Lite 也無法安裝成功,沒有辦法,只得將SOAP-Lite 的必須組件都安裝上,在我安裝 Net::Jabber 時,發現要安裝這個組件,還有很多依賴關係統要解決,這也就帶來前面一段非常漫長的 perl 編譯過程,這段過程簡直稱得上是一個痛苦的過程,因為有太多的依賴關係要解決,有太多的 perl 編譯。從 IO::Zlib 開始到 Net::xmpp ,都是為了安裝 Net::Jabber 的依賴關係。\\
Do you want to proceed with this configuration? 回車
以下略~~~~~~`
#  make
#  make install
# cd
[
《解決方案》

本帖最後由 liheng 於 2012-10-10 16:31 編輯

# rpm -ihv perl-XML-Entities-0.03-1.el5.noarch.rpm
# groupadd apache
# useradd -g apache apache
在APACHE 中添加 mod_perl模塊,並將 apache daemon的用戶修改成 apache
# vi /usr/local/apache/conf/httpd.conf
#添加 mod_perl 模塊,因為 ocs-ng 通信需要 mod_perl 支持才能正常工作
LoadModule perl_module                  modules/mod_perl.so

User daemon
Group daemon
修改成為
User apache
Group apache
保存退出
# chown -R apache.apache /usr/local/apache/htdocs
# /usr/local/apache/bin/apachectl restart
# cd /usr/local
# tar xzvf /root/OCSNG_UNIX_SERVER_1.02_RC2.tar.gz
# ./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 (/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 /usr/local/OCSNG_UNIX_SERVER_1.02_RC2
Storing log in file /usr/local/OCSNG_UNIX_SERVER_1.02_RC2/ocs_server_setup.log

+----------------------------------------------------------+
| Checking for database server properties...               |
+----------------------------------------------------------+

./setup.sh: line 111: mysql: command not found
./setup.sh: line 112: mysql: command not found
Your MySQL client seems to be part of MySQL version ..
./setup.sh: line 116: [: -gt: unary operator expected
./setup.sh: line 120: [: -eq: unary operator expected
Your computer does not seem to be compliant with MySQL 4.1 or higher.
//這裡提示 OCS_SERVER 的安裝程序在我的系統中沒有找到 MySQL,而事實上我是有安裝 MySQL 的,只不過 OCS_SERVER 默認是在 /etc 目錄下查找,是查找系統默認安裝的MySQL,而我的 MySQL 是自己編譯安裝的,安裝在 /usr/local 目錄下,所以 OCS_SERVER 提示找不到,這個不要緊,在下面自己指定就行啦。
Do you wish to continue (y/)?y
Ensure your database server is running MySQL 4.1 or higher !
Ensure also this computer is able to connect to your MySQL server !
Which host is running database server ?
//這裡要你指定哪一台主機運行資料庫伺服器,預選項是 localhost ,這裡因為我要使用本機安裝的 mysql,所以直接回車就行了,如果你的 mysql 安裝在其它電腦上,請在這裡指定 mysql 伺服器的 IP 地址。//
OK, database server is running on host localhost ;-)
On which port is running database server ?
// 指定 mysql 伺服器的運行埠,默認是3306 。本例中我並沒有改變 mysql 使用的埠號,直接回車即可。//
OK, database server is running on port 3306 ;-
+----------------------------------------------------------+

Checking for Apache web server daemon...                 |
+----------------------------------------------------------+
Where is Apache daemon binary [] ?/usr/local/apache/bin/apachectl
// 指定 apache 程序的二進位執行文件位置,也就是啟動 apache 伺服器的指令路徑,通過指定 apache 程序的二進位執行文件位置,OCS_SERVER安裝程序來找到apache的主配置文件。 這裡我的 apache 是自己編譯安裝的,apaceh 安裝在 /usr/local/apache 目錄下 。如果你安裝的路徑不同或採用的是系統自帶的 apache,請根據自己的情況進行調整。//
OK, using Apache daemon /usr/local/apache/bin/apachectl ;-)
+----------------------------------------------------------+
Checking for Apache main configuration file...           |
+----------------------------------------------------------+
Where is Apache main configuration file ?
//指定 apache 伺服器的主配置文件路徑,確認路徑是否正確,如果沒有錯誤,直接回車即可,如果不對,請輸入正確的路徑。//。
OK, using Apache main configuration file /usr/local/apache/conf/httpd.conf ;
+----------------------------------------------------------+
Checking for Apache user account...                    
+----------------------------------------------------------+
Which user account is running Apache web server ?apache
// 指定運行 APACHE 的用戶,這個可以在 APACHE 的主配置文件里查看到。//
OK, Apache is running under user account daemon ;-)
+----------------------------------------------------------+
Checking for Apache group...                             |
+----------------------------------------------------------+
Which user group is running Apache web server ?apache
// 指定運行 APACHE 的用戶組,這個可以在 APACHE 的主配置文件里查看到。//
OK, Apache is running under users group daemon ;
+----------------------------------------------------------+
Checking for Apache Include configuration directory...   |
+----------------------------------------------------------+
Setup found Apache Include configuration directory in
Setup will put OCS Inventory NG Apache configuration in this directory.
Where is Apache Include configuration directory [] ?/usr/local/apache/conf/extra
//指定 apache 保存指定模塊配置文件的目錄
OK, Apache Include configuration directory /usr/local/apache/conf found ;)
+----------------------------------------------------------+
Checking for PERL Interpreter...                         |
+----------------------------------------------------------+
Found PERL Intrepreter at </usr/bin/perl> ;-)
Where is PERL Intrepreter binary ?
//指定 perl 的二進位目錄,如果使用系統自帶的 perl,直接回車即可,如果你自己安裝了 perl 的話,就指定正確的路徑。//
OK, using PERL Intrepreter /usr/bin/perl ;-)
Do you wish to setup Communication server on this computer (/n)?y
//是否安裝通信伺服器,當然要啦,輸入 y
+----------------------------------------------------------+
Checking for Make utility...                             
+----------------------------------------------------------+
OK, Make utility found at </usr/bin/make> ;-)
+----------------------------------------------------------+
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 ?
// 指定通信伺服器的日誌目錄,如果不想改,直接回車就行啦。//
OK, Communication server will put logs into directory /var/log/ocsinventory-server ;-)
+----------------------------------------------------------+
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 optional Perl Modules...                    |
+----------------------------------------------------------+
Checking for SOAP::Lite PERL module...
Found that PERL module SOAP::Lite is available.
Checking for XML::Entities PERL module...
Found that PERL module XML::Entities is available.
+----------------------------------------------------------+
OK, looks good ;-)
//上面是在檢查是否已經安裝了需要的 perl 模塊,所有的測試都是 available,都通過啦,沒問題。//                                  |                                                          |
|
Configuring Communication server Perl modules...         |
+----------------------------------------------------------+
Checking if your kit is complete...
Looks good
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-server.
Fixing Communication server log directory files permissions.
Configuring logrotate for Communication server.
Removing old communication server logrotate file /etc/logrotate.d/ocsinventory-NG
Writing communication server logrotate to file /etc/logrotate.d/ocsinventory-server
+----------------------------------------------------------+
| OK, Communication server log directory created ;-)       |
|                                                          |
| Now configuring Apache web server...                     |
+----------------------------------------------------------+
To ensure Apache loads mod_perl before OCS Inventory NG Communication Server,
Setup can name Communication Server Apache configuration file
z-ocsinventory-server.conf' instead of 'ocsinventory-server.conf'.
Do you allow Setup renaming Communication Server Apache configuration file
to 'z-ocsinventory-server.conf' (/n) ? 直接回車
//是否允許安裝程序重命名通信伺服器的 apache 配置文件到to 'z-ocsinventory-server.con,輸入 y 吧。//

OK, using 'z-ocsinventory-server.conf' as Communication Server Apache configuration file
Removing old communication server configuration to file /usr/local/apache/conf/ocsinventory.conf
Writing communication server configuration to file /usr/local/apache/conf/ocsinventory-server.conf
+----------------------------------------------------------+|

OK, Communication server setup sucessfully finished ;-)  |                                                         |

| Please, review /usr/local/apache/conf/ocsinventory-server.conf
| to ensure all is good. Then restart Apache daemon.      
+----------------------------------------------------------+
Do you wish to setup Administration Server (Web Administration Console)
on this computer (/n)?y
//是否安裝管理伺服器(WEB 管理控制台)?當然要啦,輸入 y。//
+----------------------------------------------------------+
| Checking for Administration Server directories...        |
+----------------------------------------------------------+
CAUTION: Setup now install files in accordance with Filesystem Hierarchy
Standard. So, no file is installed under Apache root document directory
(Refer to Apache configuration files to locate it).
If you're upgrading from OCS Inventory NG Server 1.01 and previous, YOU
MUST REMOVE (or move) directories 'ocsreports' and 'download' from Apache
root document directory.
If you choose to move directory, YOU MUST MOVE 'download' directory to
Administration Server writable/cache directory (by default
/var/lib/ocsinventory-server), especialy if you use deployement feature.
Do you wish to continue (/n)?y

Assuming directories 'ocsreports' and 'download' removed from
Apache root document directory.
Where to copy Administration Server static files for PHP Web Console
?
//複製管理伺服器的PHP WEB 控制台的靜態文件到哪裡?直接回車即可
OK, PHP files copied into /usr/share/ocsinventory-server/ocsreports ;-)
Where to create writable/cache directories for deployement packages and
IPDiscover ?
//開發包和 IPDiscover 的可寫/緩存 指定在什麼地方?
OK, writable/cache directory is /var/lib/ocsinventory-server ;-)
+----------------------------------------------------------+
|
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 PHP directory /usr/share/ocsinventory-server/ocsreports.
Copying PHP files to /usr/share/ocsinventory-server/ocsreports.
Fixing permissions on directory /usr/share/ocsinventory-server/ocsreports.
Creating database configuration file /usr/share/ocsinventory-server/ocsreports/dbconfig.inc.php.

Creating IPDiscover directory /var/lib/ocsinventory-server/ipd.
Fixing permissions on directory /var/lib/ocsinventory-server/ipd.
Creating packages directory /var/lib/ocsinventory-server/download.
Fixing permissions on directory /var/lib/ocsinventory-server/download.
Configuring IPDISCOVER-UTIL Perl script.
Installing IPDISCOVER-UTIL Perl script.
Fixing permissions on IPDISCOVER-UTIL Perl script.
Writing Administration server configuration to file /usr/local/apache/conf/ocsinventory-reports.conf
+----------------------------------------------------------+|
OK, Administration server installation finished ;-)      |
|                                                          |
|
Please, review /usr/local/apache/conf/ocsinventory-reports.conf
| to ensure all is good and restart Apache daemon.         |
|                                                          |
| Then, point your browser to http://server//ocsreports
| to configure database server and create/update schema.   |
+----------------------------------------------------------+
Setup has created a log file /usr/local/OCSNG_UNIX_SERVER_1.02_RC2/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 ;-)
修改 apache 的配置文件
# vi /usr/local/apache/conf/httpd.conf

#在 apache 的主配置文件的末尾添加下面的內容
# OCS-NG REPORTS
Include conf/extra/ocsinventory-reports.conf

# OCS-NG SERVER
Include conf/extra/z-ocsinventory-server.conf
# /usr/local/apache/bin/apachectl stop
# /usr/local/apache/bin/apachectl start
打開瀏覽器在地址欄中輸入:http://192.168.98.240/ocsreports/install.php

輸入 mysql 伺服器的用戶名、密碼與伺服器地址,點擊」send」

繼續....

繼續....

OCS-NG 資料庫建立成功,點擊「提交查詢」
《解決方案》

本帖最後由 liheng 於 2012-10-10 16:32 編輯

點擊「click here to enter OCS-NG GUI」進入OCS-NG 管理控制台

輸入用戶名:admin 密碼:admin

安裝 linux 客戶端
#  cd /usr/local
# tar xzvf /root/OCSNG_LINUX_AGENT_1.01.tar.gz
# cd OCSNG_LINUX_AGENT_1.01
# ./setup.sh
+----------------------------------------------------------+
                                                          |
| Welcome to OCS Inventory NG Agent setup !                |
|                                                         |
+----------------------------------------------------------+
Writing log to file /usr/local/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 (/local) ?
OK, OCS Inventory NG agent will be running in <http> mode ;-)
+----------------------------------------------------------+
| Checking for OCS Inventory NG Communication Server...    |
+----------------------------------------------------------+
Which host is running OCS Inventory NG Communication Server [] ?192.168.98.240
On which port is running OCS Inventory NG Communication Server ?
OK, OCS Inventory NG Communication Server is running on host
<192.168.98.240> and port <80> ;-)
+----------------------------------------------------------+
| Checking for TAG administrative information value...     |
+----------------------------------------------------------+
What is the value of TAG ([]) ?
OK, OCS Inventory NG agent will use <> as <TAG> ;-)
+----------------------------------------------------------+
| Checking for PERL Interpreter...                         |
+----------------------------------------------------------+
OK, PERL Intrepreter found at </usr/bin/perl> ;-)
+----------------------------------------------------------+
| Checking for C/C++ Compiler...                           |
+----------------------------------------------------------+
OK, C/C++ Compiler found at </usr/bin/cc> ;-)
+----------------------------------------------------------+
| Checking for Make utility...                             |
+----------------------------------------------------------+
OK, Make utility found at </usr/bin/make> ;-)
+----------------------------------------------------------+
| Checking for dmidecode binaries...                       |
+----------------------------------------------------------+
Found dmidecode binaries version <2.7> at </usr/sbin/dmidecode> ;-)
+----------------------------------------------------------+
| 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 </bin/ocsinv> 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 </var/log/ocsinventory-client>.
Configuring logrotate for OCS Inventory NG Agent.
Writing OCS Inventory NG Agent logrotate to file </etc/logrotate.d/ocsinventory-client>
+----------------------------------------------------------+
| Installing OCS Inventory NG Agent configuration files... |
+----------------------------------------------------------+
Creating OCS Inventory NG Agent <ocsinv.conf> configuration file
Creating OCS Inventory NG Agent </etc/ocsinventory-client> configuration directory
Writing OCS Inventory NG Agent </etc/ocsinventory-client/ocsinv.conf> configuration file
Creating OCS Inventory NG Agent <ocsinv.adm> configuration file
Writing OCS Inventory NG Agent </etc/ocsinventory-client/ocsinv.adm> configuration file
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 </etc/cron.d/ocsinventory-client> cron configuration file
OK, OCS Inventory NG Agent cron configuration file setup succssfully ;-)
+----------------------------------------------------------+
Lauching OCS Inventory NG Agent...                       |
+----------------------------------------------------------+
OK, OCS Inventory NG Agent runs successfully ;-)
Setup has created a log file /usr/local/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 ;-)
#
《解決方案》

GLPI
GLPI是法語Gestionnaire libre de parc informatique的縮寫,翻譯過來應該是開源IT和資產管理軟體,在法國等歐洲國家和地區應用廣泛並取得了很好的用戶口碑。但在中國了解和應用的人並不多。
GLPI提供功能全面的IT資源管理介面,你可以用它來建立資料庫全面管理IT的電腦,顯示器,伺服器,印表機,網路設備,電話,甚至硒鼓和墨盒等。提供Helpdesk用戶支持平台;聯繫人,合同,合作商,以及文檔的管理;提供資源預定,知識庫的管理等功能。
GLPI主要功能特徵如下:
總體特徵:
多用戶管理
多種認證系統(Local,LDAP,AD,POP/IMPAP,CAS)
許可權系統
分頁系統
多語言支持(支持多達14種語言)
搜索模塊
顯示列表可配置
PDF導出和SLK
SQL格式的資料庫備份和恢復
下拉列表可配置
更新檢查系統
UTF8介面
兼容HTML4.0協議

資產管理
可從OCS資產系統導入數據
計算機和連接設備管理和總成本管理
主機和顯示器的連接管理
網路硬體和設備的連接管理(IP地址,MAC地址,VLAN等)
印表機電腦連接情況管理和耗材管理
其他外設電腦連接情況管理,電話管理
軟體許可證及其失效日期管理
按地理位置管理硬體
模型化管理便於同類設備的增加
資產相關文件管理
硬體狀態管理
物料不同情形下的管理-比如一台顯示器連接到幾台電腦主機
其他應用軟體的對外管制
資產變更歷史記錄

追蹤管理
各種投資的需求情況管理追蹤
最終用戶
投資需求可自動進行郵件追蹤管理
投資變更維修歷史追蹤
投資需求標註
技術人員
投資需求優先順序管理
投資需求郵件追蹤
投資需求的分配
開/合/開干涉模式
實時變更的指派
顯示變更歷史
顯示變更結果
對指定的硬體顯示變更歷史
將變更結果傳遞到指定技術人員
對指定的物料傳送其變更歷史
變更計劃管理

狀態管理
按月,年,總體提供狀態報表
&nbsp;全部
&nbsp;按技術人員或企業
&nbsp;按硬體,位置或型號
&nbsp;按用戶
&nbsp;按類別
按優先順序
文檔管理
合作夥伴(製造商,供應商,受益人)及其合同管理
合同(租借,保險,維護,外包等)管理
資產,合同相關文檔管理
文檔授權類型管理

預約管理
可供租借的資源預約管理
日曆形式的介面管理預約
知識庫管理
知識管理基本系統
公共FAQ管理

報表管理
設備報表可按以下產生:
&nbsp; &nbsp;按設備類型
&nbsp; &nbsp;按相關協議
&nbsp; &nbsp;按商務信息
網路報表
技術方面:
GLPI採用以下技術:
&nbsp; &nbsp; PHP4 或者 PHP5
&nbsp; &nbsp; MYSQL(>4.1.13)資料庫
&nbsp; &nbsp; HTML網頁
&nbsp; &nbsp; CSS
&nbsp; &nbsp; XML(報表生成) n

安裝 GLPI
# cd /usr/local/apache/htdocs
# tar xvf /root/glpi-0.71.1.tar.gz
# chown -R apache.apache glpi
然後在瀏覽器中輸入:http://192.168.98.240/glpi
1、語言設置,從下拉列表中選擇語言為簡體中文,點擊「OK」

2、接受許可協議,點擊「繼續」

3、因為我這裡是第一次安裝,所以選擇「設施」,如果是升級安裝,選擇「更新」

4、GLPI 在自行檢測安裝環境,一切都通過,點擊「繼續」

5、輸入 mysql 伺服器的名稱,與用戶及密碼。注意:這裡 msyql 伺服器不能填IP地址。點擊「繼續」

6、為 GLPI 建立新資料庫,並命名為 glpi.點擊「繼續」

7、glpi 資料庫已經建立好,點擊「繼續」

8、安裝完成,點擊「使用GLPI」
《解決方案》

9、GLPI 檢測當前使用的資料庫版本與 GLPI 有點不兼容,點擊更新,使其兼容

10、更新完成,現在就可以使用 glpi 啦,點擊「使用GLPI」

進入GLPI 登錄界面,輸入默認用戶名:glpi 密碼:glpi

點擊「設定」菜單,從彈出的菜單中點擊「General」,再點擊「Restrictions」

將「激活OCSNG方式」設置成「是」點擊「確定」

點擊「localhost」


將所有項都設置為「是」,點確定。現在開始從OCSNG中導數據入GLPI,點擊「工具」-「OCSNG」

按實際要求選擇。至此從OCSNG導入數據到GLPI就算完成啦。
《解決方案》

不錯,收藏先
《解決方案》

自己頂起:em18:
《解決方案》

太好了,我也剛裝好ocsng,正準備安裝glpi,謝謝樓主。
《解決方案》

:mrgreen: 不錯,歡迎多來發帖



[火星人 via ] 開源資產管理軟體—OCS-NG已經有959次圍觀

http://www.coctec.com/docs/service/show-post-19358.html