すべての人に良い一日を! 
      
        
        
        
      
     タイトルからわかるように、2つのプログラムについて説明します。 
      
        
        
        
      
      1.コンピューターとソフトウェアインベントリを開く 
      
        
        
        
      
      OCS-Inventoryは、システム、接続されたデバイス、インストールされたソフトウェアに関する詳細情報を専用のデータベースに送信するインベントリマシンにインストールされた分散モジュールに基づいています。 
      
        
        
        
      
     次のOSがサポートされています:Microsoft Windows、Linux、* BSD、Sun Solaris、IBM AIX、HP-UX、MacOS X 
      
        
        
        
      
    
      
        
        
        
      
      2. GPLI-Guestion Libre de Parc Informatique 
      
        
        
        
      
     このプロジェクトは、企業に設置されたITおよび通信機器のデータベースと連携するように設計されています。 また、消耗品を追跡し、スケジュールとユーザーの要求に応じてテクニカルサポートサービスを編成することもできます。 
      
        
        
        
      
    
      
        
        
        
      
     インターネット上では、このバンドルの設定に関する多くの情報がありますが、ローカライズに関するすべての問題が解決される詳細な方法には触れていません。 したがって、見つかった解決策と私自身の改善点をまとめたものを提示します。 
      
        
        
        
      
    
      
        
        
        
      
     それでは始めましょう! 
      
        
        
        
      
      OCSインベントリをインストールします。 
      
        
        
        
      
      OCSバージョン:Ver。  1.3.2 
      
        
        
        
      
     データを収集するためのサーバーOSとして、私はFreeBSD OSになります。  LAMPのインストールと構成については説明しません(この場合、FAMP =)。 これはすでに設定されていると仮定します。 
      
        
        
        
      
      OCS Inventoryのインストールと構成を開始する前に、次のポートがインストールされていることを確認してください 
      
        
        
        
      
     /usr/ports/www/mod_perl2 
      
        
        
        
      
     /usr/ports/sysutils/logrotate 
      
        
        
        
      
     /usr/ports/lang/perl
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
      apache configに行があるはずです 
      
        
        
        
      
     LoadModule perl_module libexec/apache22/mod_perl.so
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
     次のperlモジュールがインストールされているかどうかを確認します 
      
        
        
        
      
     Apache::DBI -- 1.08 
      
        
        
        
      
     BSD::Resource -- 1.2904 
      
        
        
        
      
     Bundle::NetSNMP -- ??? 
      
        
        
        
      
     Class::Inspector -- 1.24 
      
        
        
        
      
     Compress::Raw::Bzip2 -- 2.030 
      
        
        
        
      
     Compress::Raw::Zlib -- 2.030 
      
        
        
        
      
     DBD::mysql -- 4.017 
      
        
        
        
      
     DBI -- 1.613 
      
        
        
        
      
     Digest::SHA1 -- 2.13 
      
        
        
        
      
     ExtUtils::MakeMaker -- undef 
      
        
        
        
      
     HTML::Parser -- 3.68 
      
        
        
        
      
     HTML::Tagset -- 3.20 
      
        
        
        
      
     IO::Compress -- ??? 
      
        
        
        
      
     LWP -- 5.836 
      
        
        
        
      
     Locale::gettext -- 1.05 
      
        
        
        
      
     Net::IP -- 1.25 
      
        
        
        
      
     Perl -- 5.8.9 
      
        
        
        
      
     SOAP::Lite -- 0.712 
      
        
        
        
      
     Storable -- 2.21 
      
        
        
        
      
     Task::Weaken -- 1.03 
      
        
        
        
      
     URI -- 1.55 
      
        
        
        
      
     XML::Entities -- 1.0000 
      
        
        
        
      
     XML::Parser -- 2.36 
      
        
        
        
      
     XML::Simple -- 2.18 
      
        
        
        
      
     mod_perl2 -- 2.000004
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
     これを行うには、そのようなスクリプトを実行するだけです 
      
        
        
        
      
     #!/usr/local/bin/perl 
      
        
        
        
      
     use ExtUtils::Installed; 
      
        
        
        
      
     my $instmod = ExtUtils::Installed->new(); 
      
        
        
        
      
     foreach my $module ($instmod->modules()) { 
      
        
        
        
      
     my $version = $instmod->version($module) || "???"; 
      
        
        
        
      
     print "$module -- $version\n"; 
      
        
        
        
      
     }
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
     上記のリストにないものがある場合は、コマンドでインストールしてください 
      
        
        
        
      
     #cpan -e ModulName
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
     
      
        
        
        
      
      1.パッチを適用したサーバーをダウンロードします 
      
        
        
        
      
      UTF8のOCSNG 。 リンビナスに感謝します! 
      
        
        
        
      
     パッチの作成者がすべてを行ってくれたので、小さな欠陥を修正する必要がありました。 アーカイブを開き、そこでファイル/ocsinventory-server-1.3.2/ocsreports/languages/russian.txtを見つけ、windows-1251の最初の行でそれをutf8に変更し、UTF8エンコードで保存します。  russian.txtが修正されたTarballは
ここで取得でき
ます 
      
        
        
        
      
    
      
        
        
        
      
      2.アーカイブをサーバー上のフォルダーに解凍します(/ usr / local / www / ocs /があります)。 
      
        
        
        
      
      #tar -xf OCSNG_UNIX_SERVER-1.3.2-linvinus-with-utf8_patch.tar.gz 
      
        
        
        
      
    
      
        
        
        
      
      3. logrotateのディレクトリを作成します 
      
        
        
        
      
     #mkdir /etc/logrotate.d
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
     
      
        
        
        
      
      4.フォルダーの所有者を変更する 
      
        
        
        
      
     # chown -R www:www /usr/local/www/ocs/
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
     
      
        
        
        
      
      5.次に、フォルダーに移動してsetup.shを実行します 
      
        
        
        
      
     #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)? 
      
        
        
        
      
     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/www/ocs 
      
        
        
        
      
     Storing log in file /usr/local/www/ocs/ocs_server_setup.log 
      
        
        
        
      
     
      
        
        
        
      
     +----------------------------------------------------------+ 
      
        
        
        
      
     | Checking for database server properties... | 
      
        
        
        
      
     +----------------------------------------------------------+ 
      
        
        
        
      
     
      
        
        
        
      
     Your MySQL client seems to be part of MySQL version 5.1. 
      
        
        
        
      
     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... | 
      
        
        
        
      
     +----------------------------------------------------------+ 
      
        
        
        
      
     
      
        
        
        
      
     Where is Apache daemon binary [/usr/local/sbin/httpd] ? 
      
        
        
        
      
     OK, using Apache daemon /usr/local/sbin/httpd ;-) 
      
        
        
        
      
     
      
        
        
        
      
     +----------------------------------------------------------+ 
      
        
        
        
      
     | Checking for Apache main configuration file... | 
      
        
        
        
      
     +----------------------------------------------------------+ 
      
        
        
        
      
     
      
        
        
        
      
     Where is Apache main configuration file [/usr/local/etc/apache22/httpd.conf] ? 
      
        
        
        
      
     OK, using Apache main configuration file /usr/local/etc/apache22/httpd.conf ;-) 
      
        
        
        
      
     
      
        
        
        
      
     +----------------------------------------------------------+ 
      
        
        
        
      
     | Checking for Apache user account... | 
      
        
        
        
      
     +----------------------------------------------------------+ 
      
        
        
        
      
     
      
        
        
        
      
     Which user account is running Apache web server [User] ?www 
      
        
        
        
      
     OK, Apache is running under user account www ;-) 
      
        
        
        
      
     
      
        
        
        
      
     +----------------------------------------------------------+ 
      
        
        
        
      
     | Checking for Apache group... | 
      
        
        
        
      
     +----------------------------------------------------------+ 
      
        
        
        
      
     
      
        
        
        
      
     Which user group is running Apache web server [www] ?www 
      
        
        
        
      
     OK, Apache is running under users group www ;-) 
      
        
        
        
      
     
      
        
        
        
      
     +----------------------------------------------------------+ 
      
        
        
        
      
     | 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/etc/apache22/Includes 
      
        
        
        
      
     OK, Apache Include configuration directory /usr/local/etc/apache22/Includes found ;-) 
      
        
        
        
      
     
      
        
        
        
      
     +----------------------------------------------------------+ 
      
        
        
        
      
     | Checking for PERL Interpreter... | 
      
        
        
        
      
     +----------------------------------------------------------+ 
      
        
        
        
      
     
      
        
        
        
      
     Found PERL Intrepreter at </usr/bin/perl> ;-) 
      
        
        
        
      
     Where is PERL Intrepreter binary [/usr/bin/perl] ? 
      
        
        
        
      
     OK, using PERL Intrepreter /usr/bin/perl ;-) 
      
        
        
        
      
     
      
        
        
        
      
     Do you wish to setup Communication server on this computer ([y]/n)? 
      
        
        
        
      
     
      
        
        
        
      
     +----------------------------------------------------------+ 
      
        
        
        
      
     | 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 [/var/log/ocsinventory-server] ? 
      
        
        
        
      
     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 ;-) | 
      
        
        
        
      
     | | 
      
        
        
        
      
     | Configuring Communication server Perl modules... | 
      
        
        
        
      
     +----------------------------------------------------------+ 
      
        
        
        
      
     
      
        
        
        
      
     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. 
      
        
        
        
      
     /usr/local/www/ocs 
      
        
        
        
      
     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' ([y]/n) ?y 
      
        
        
        
      
     OK, using 'z-ocsinventory-server.conf' as Communication Server Apache configuration file 
      
        
        
        
      
     Removing old communication server configuration to file /usr/local/etc/apache22/Includes/ocsinventory.conf 
      
        
        
        
      
     Writing communication server configuration to file /usr/local/etc/apache22/Includes/z-ocsinventory-server.conf 
      
        
        
        
      
     
      
        
        
        
      
     +----------------------------------------------------------+ 
      
        
        
        
      
     | OK, Communication server setup sucessfully finished ;-) | 
      
        
        
        
      
     | | 
      
        
        
        
      
     | Please, review /usr/local/etc/apache22/Includes/z-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 ([y]/n)?n 
      
        
        
        
      
     
      
        
        
        
      
     Setup has created a log file /usr/local/www/ocs/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 ;-) 
      
        
        
        
      
    
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
      6.仮想ホストファイルを作成する 
      
        
        
        
      
      #ee /usr/local/etc/apache22/Includes/ocs.conf 
      
        
        
        
      
     <VirtualHost *:80> 
      
        
        
        
      
     ServerAdmin webmaster@domen.ru 
      
        
        
        
      
     DocumentRoot /usr/local/www/ocs/ocsreports 
      
        
        
        
      
     ServerName ocs.domen.ru 
      
        
        
        
      
     ServerAlias www.ocs.domen.ru 
      
        
        
        
      
     ErrorLog "|/usr/local/sbin/rotatelogs /var/log/httpd/http.ocs.domen.ru-error_log.%Y-%m-%d-%H_%M_%S 86400" 
      
        
        
        
      
     CustomLog "|/usr/local/sbin/rotatelogs /var/log/httpd/http.ocs.domen.ru-access_log.%Y-%m-%d-%H_%M_%S 86400" common 
      
        
        
        
      
    
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
     <Directory /> 
      
        
        
        
      
     Order deny,allow 
      
        
        
        
      
     Allow from 192.168.0.0/16 
      
        
        
        
      
     Options Indexes FollowSymLinks 
      
        
        
        
      
     DirectoryIndex index.php 
      
        
        
        
      
     AllowOverride Options 
      
        
        
        
      
     php_flag file_uploads on 
      
        
        
        
      
    
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
    
      
        
        
        
      
      7. mysqlに接続し、必要な権限を持つユーザーを作成します 
      
        
        
        
      
     # mysql -u root -p 
      
        
        
        
      
     Enter password: 
      
        
        
        
      
     Welcome to the MySQL monitor. Commands end with ; or \g. 
      
        
        
        
      
     Your MySQL connection id is 3495 
      
        
        
        
      
     Server version: 5.1.41 FreeBSD port: mysql-server-5.1.41 
      
        
        
        
      
     
      
        
        
        
      
     Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 
      
        
        
        
      
     
      
        
        
        
      
     mysql> GRANT ALL PRIVILEGES ON ocsweb.* TO 'ocs'@'localhost' IDENTIFIED BY 'ocs';
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
     
      
        
        
        
      
      8. もうすぐそこにいるので、お気に入りのFirefoxブラウザを開いて、 
      
        
        
        
      
      http:// ip_address / ocsreports 
      
        
        
        
      
      「Nombre del servidor」の行にlocalhostと入力します 
      
        
        
        
      
    
      
        
        
        
      
    
      
        
        
        
      
      [リクエストを送信]をクリックします 
      
        
        
        
      
    
      
        
        
        
      
      リンクをクリックしてください 
      
        
        
        
      
    
      
        
        
        
      
    
      
        
        
        
      
      祖国の旗を選択し、admin / adminと入力します 
      
        
        
        
      
    
      
        
        
        
      
    
      
        
        
        
      
    
      
        
        
        
      
      9. OCSNGサーバーのパフォーマンスの確認 
      
        
        
        
      
     コンピューターのハードウェア充填とインストールされたソフトウェアに関するレポートをサーバーに送信するには、ネットワーク上のコンピューターにエージェントをインストールする必要があります。 これを行うには、再度ftp linvinus'aにアクセスして
、パッチを適用したエージェントを
ダウンロードします 。 
      
        
        
        
      
     サーバーで、コマンドを実行します 
      
        
        
        
      
     tail -F /var/log/httpd/http.ocs.domen.ru-error_log.2010-09-14-00_00_00
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
     そして、エージェントのインストールに進みます。 インストールプロセス中に、データ収集用のサーバーを指定するよう求められます 
      
        
        
        
      
    
      
        
        
        
      
     インストール後にエージェントがサーバーに情報を送信するように、スクリーンショットのようにボックスをチェックすることを忘れないでください 
      
        
        
        
      
     ログに次のような悪用が見られる場合 
      
        
        
        
      
     [Tue Sep 14 19:16:34 2010] [error] [client 192.168.254.2] Can't call method "rollback" on an undefined value at /usr/local/lib/perl5/site_perl/5.8.9/Apache/Ocsinventory/Server/System.pm line 265.\n
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
     次に、ファイルでmysqlに接続するための正しい設定を確認する必要があります 
      
        
        
        
      
     /usr/local/www/ocs/ocsreports/dbconfig.inc.php
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
     そして 
      
        
        
        
      
     /usr/local/etc/apache22/Includes/z-ocsinventory-server.conf
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
      すべてが正常である場合、スクリーンショットのように、OCS Webインターフェースに新しいエントリが表示されます=) 
      
        
        
        
      
    
      
        
        
        
      
    
      
        
        
        
      
      10.最後に、Active Directoryを使用してネットワーク上にエージェントを展開します。 
      
        
        
        
      
      OCS wikiには、ネットワークの現実に応じてわずかな修正が必要なスクリプトがあります。 
      
        
        
        
      
     @echo off 
      
        
        
        
      
     
      
        
        
        
      
     REM *********** Declare variables ********************************************* 
      
        
        
        
      
     REM *********** Adjust to your situation ************************************** 
      
        
        
        
      
     SET Version=4061.1 
      
        
        
        
      
     REM   IP    OCSNG 
      
        
        
        
      
     SET Server=ocs.domen.ru 
      
        
        
        
      
     REM      ,      
      
        
        
        
      
     SET SetupPath=\\dc\shareUstPril 
      
        
        
        
      
     
      
        
        
        
      
     REM *********** Install if agent isn't found ********************************** 
      
        
        
        
      
     IF EXIST "%PROGRAMFILES%\OCS Inventory agent\OCSInventory.exe" GOTO update 
      
        
        
        
      
     :install 
      
        
        
        
      
     %SetupPath%\OcsAgentSetup.exe /S /SERVER:%Server% /NP /DEBUG 
      
        
        
        
      
     GOTO version 
      
        
        
        
      
     
      
        
        
        
      
     :update 
      
        
        
        
      
     REM *********** Update agent if %Version%.txt isn't found ********************* 
      
        
        
        
      
     IF EXIST "%PROGRAMFILES%\OCS Inventory agent\%Version%.txt" GOTO end 
      
        
        
        
      
     :upgrade 
      
        
        
        
      
     %SetupPath%\OcsAgentSetup.exe /S /SERVER:%Server% /NP /UPGRADE /DEBUG 
      
        
        
        
      
     
      
        
        
        
      
     :version 
      
        
        
        
      
     cd /D "%PROGRAMFILES%\OCS Inventory agent\" 
      
        
        
        
      
     echo pwouet > %Version%.txt 
      
        
        
        
      
     
      
        
        
        
      
     :end 
      
        
        
        
      
     REM *********** Cleanup variables ********************************************* 
      
        
        
        
      
     SET Version= 
      
        
        
        
      
     SET Server= 
      
        
        
        
      
     SET SetupPath= 
      
        
        
        
      
    
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
      install_ocs_agent.batとして保存し、それに応じてGPOを構成します。 
      
        
        
        
      
     これでOCSは終了です。 エージェントからのデータにはランダムな遅延が伴うため、セットアップの終了後、すべてのコンピューターからデータを受信するまでに時間がかかることに注意してください。 
      
        
        
        
      
    
      
        
        
        
      
      GLPIインストール。 
      
        
        
        
      
      GLPIバージョン:glpi-0.72.4_1 
      
        
        
        
      
      1.ポートからGLPIをインストールします。 
      
        
        
        
      
     make -c /usr/ports/www/glpi install clean
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
     次に、Apacheで(必要に応じて)エイリアスまたは仮想ホストを作成します。 エイリアスがあります 
      
        
        
        
      
     Alias /glpi "/usr/local/www/glpi" 
      
        
        
        
      
     <Directory "/usr/local/www/glpi"> 
      
        
        
        
      
     Options Indexes FollowSymlinks MultiViews 
      
        
        
        
      
     AllowOverride None 
      
        
        
        
      
     Order allow,deny 
      
        
        
        
      
     Allow from 192.168.0.0/16 
      
        
        
        
      
    
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
    
      
        
        
        
      
      *何らかの理由で、閉じている「/ディレクトリ」が表示されなかったため、コピーして貼り付ける場合は注意してください=) 
      
        
        
        
      
    
      
        
        
        
      
      2.必要な権限を持つmysqlでユーザーを作成しましょう 
      
        
        
        
      
     mysql> grant all privileges on glpi.* to 'glpi'@'localhost' identified by 'password_ololo';
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
     
      
        
        
        
      
      3. http:// domen.ru/glpiに移動し、インストールウィザードの手順に従います 
      
        
        
        
      
    
      
        
        
        
      
    
      
        
        
        
      
    
      
        
        
        
      
    
      
        
        
        
      
    
      
        
        
        
      
    
      
        
        
        
      
    
      
        
        
        
      
    
      
        
        
        
      
    
      
        
        
        
      
    
      
        
        
        
      
      3. GLPIソースをわずかに修正する 
      
        
        
        
      
     ファイルを編集 
      
        
        
        
      
     /usr/local/www/glpi/inc/ocsng.class.php
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
     クラスを見つける 
      
        
        
        
      
     class DBocs extends DBmysql
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
     そして、行を変更します 
      
        
        
        
      
     $this->dbenc="latin1";
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
     に 
      
        
        
        
      
     $this->dbenc="utf8";
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
     
      
        
        
        
      
      4. OCSからインポートするためのプラグインをインストールします 
      
        
        
        
      
      OCSインポート 
      
        
        
        
      
    
      
        
        
        
      
     プラグインをフォルダーに解凍します 
      
        
        
        
      
     /usr/local/www/glpi/plugins/
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
     
      
        
        
        
      
     次に、GLPI Webインターフェイスに移動します 
      
        
        
        
      
      #メインパネル> 
      
        
        
        
      
      #設定> 
      
        
        
        
      
     追加 
      
        
        
        
      
      「インストール」をクリックしてから「有効にする」をクリックします 
      
        
        
        
      
    
      
        
        
        
      
     次に行きます 
      
        
        
        
      
      #メインパネル> 
      
        
        
        
      
      #設定> 
      
        
        
        
      
      #一般 
      
        
        
        
      
      #制限 
      
        
        
        
      
      OCSNGモードをアクティブにする-はい 
      
        
        
        
      
    
      
        
        
        
      
     今 
      
        
        
        
      
      #メインパネル> 
      
        
        
        
      
      #設定> 
      
        
        
        
      
      #OCSNGモード 
      
        
        
        
      
     オプションを設定する 
      
        
        
        
      
    
      
        
        
        
      
    
      
        
        
        
      
      #メインパネル> 
      
        
        
        
      
      #ツールキット> 
      
        
        
        
      
      #OCSNG 
      
        
        
        
      
      #新しいコンピューターのインポート 
      
        
        
        
      
     インポートと出来上がり=) 
      
        
        
        
      
    
      
        
        
        
      
    
      
        
        
        
      
      そして最後に、ロシア語でpdfにエクスポートします 
      
        
        
        
      
    
      
        
        
        
      
      1.すべてのutf8_decode呼び出しをutf8_decode_cyrに置き換えます 
      
        
        
        
      
     #sed -e 's/utf8_decode/utf8_decode_cyr/g' /usr/local/www/glpi/inc/export.function.php > /usr/local/www/glpi/inc/export.function.php.new 
      
        
        
        
      
     #mv /usr/local/www/glpi/inc/export.function.php.new /usr/local/www/glpi/inc/export.function.php
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
     
      
        
        
        
      
      2.関数を/var/www/glpi/inc/export.function.phpに追加します 
      
        
        
        
      
     function utf8_decode_cyr($value){ 
      
        
        
        
      
     return iconv("UTF-8","Windows-1251",$value); 
      
        
        
        
      
     }
      
      
        
        
        
      
    
        
        
        
      
      
        
        
        
      
    
     
      
        
        
        
      
     
      
        
        
        
      
      3. 
参照により設定されたフォントをダウンロードする 
      
        
        
        
      
    
      
        
        
        
      
      4.アーカイブから/ usr / local / www / glpi / lib / ezpdf / fonts /にファイルを追加します 
      
        
        
        
      
      pdfがエクスポートされるはずです 
      
        
        
        
      
    
      
        
        
        
      
    
      
        
        
        
      
      Fuuuuhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh ... 
      
        
        
        
      
     以上で、OCS + GLPIバンドルがインストールおよび構成されました。 
      
        
        
        
      
      UNIXシステム管理者フォーラムの
Pascal同志の助けとサポートに感謝し、使用された情報のソースをリストします=) 
      
        
        
        
      
    
      
        
        
        
      
      1. 
www.tux.in.ua/articles/1500 
      
        
        
        
      
      2. 
forums.ocsinventory-ng.org/viewtopic.php?id=4104 
      
        
        
        
      
    
      
        
        
        
      
      PS 
      
        
        
        
      
      GLPIには多くの興味深い機能がありますが、この記事の範囲には含まれません。 
      
        
        
        
      
     誰かがインストールに問題を抱えている場合-彼らが言うように、私は私ができるよりも不幸に待っています。