OCS Inventory NG(1/3)
OCS Inventory NGというインベントリ取得に特化したOSSがあり、今回は3回に渡り、構築手順をお届けできたらと思います。
まず1、2回目は、普通に構築して動くところまで、3回目はHTTPS化について書きたいと思います。
OSはCentOS7で、OCS Inventory NG 2.5を構築します。
最初は本家のドキュメントを読みながらやったのですが、上手くいかず😫、結局フランスの方のブログを参考にしました。
また、注意事項が1つあります。OCS Inventory のVer2.4.1ではBugがあり、構築後、日本語でのログインが出来ません😵。
ですので、日本語で運用したい方は、2.5か、2.3で構築してください。
SELinuxの設定変更(/etc/sysconfig/selinux)
SELinuxの値をデフォルトのenforcingから、permissive or disabled に変更します。
ここはお好みで設定してください。
Firewallの無効化
次にFirewallを無効化します。
別に無効化しなくても良いのですが、私みたいな、ものぐさな方🌝は無条件に設定してください。
止めない場合は、恐らくHTTPの穴だけあければ良い気がしますが。。。
systemctl stop firewalld
systemctl disable firewalld
次に必要なパッケージの導入をしていきます。
OCS Inventory NGのダウンロード
OCS Inventory NGのパッケージをダウンロードして、解凍します。
wget https://github.com/OCSInventory-NG/OCSInventory-ocsreports/releases/download/2.5/OCSNG_UNIX_SERVER_2.5.tar.gz
tar -zxvf OCSNG_UNIX_SERVER_2.5.tar.gz
OCS Inventory NGのインストール
OCS Inventory NGのインストールシェルを実行し、インストールをします。
シェルを実行すると、質問形式のメッセージが表示され、基本的にはYes/Noで選択していきます。
ログや設定ファイルの場所は、必要ならデフォルトから変更してください。
ものぐさな方は、問答無用でw以下の通りに選択すればOKです👍🏻
cd OCSNG_UNIX_SERVER_2.5
./setup.sh&
+----------------------------------------------------------+
| |
| Welcome to OCS Inventory NG Management server setup ! |
| |
+----------------------------------------------------------+
Trying to determine which OS or Linux distribution you use
+----------------------------------------------------------+
| Checking for Apache web server binaries ! |
+----------------------------------------------------------+
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)? ←Enterを入力
<中略>
Which host is running database server [localhost] ? ←Enterを入力
On which port is running database server [3306] ? ←Enterを入力
<中略>
Where is Apache daemon binary [/usr/sbin/httpd] ? ←Enterを入力
Which user account is running Apache web server [apache] ?←Enterを入力
Which user group is running Apache web server [apache] ?←Enterを入力
Where is Apache Include configuration directory [/etc/httpd/conf.d] ?←Enterを入力
<中略>
Where is PERL interpreter binary [/usr/bin/perl] ?←Enterを入力
Do you wish to setup Communication server on this computer ([y]/n)?←Enterを入力
<中略>
Where to put Communication server log directory [/var/log/ocsinventory-server] ?←Enterを入力
<中略>
Where to put Communication server plugins configuration files [/etc/ocsinventory-server/plugins] ?←Enterを入力
<中略>
Where to put Communication server plugins Perl modules files [/etc/ocsinventory-server/perl] ?←Enterを入力
<中略>
Checking for Apache2::SOAP PERL module...
*** Warning: PERL module Apache2::SOAP is not installed !
This module is only required by OCS Inventory NG SOAP Web Service.
Do you wish to continue ([y]/n] ?←Enterを入力
Checking for XML::Entities PERL module...
*** Warning: PERL module XML::Entities is not installed !
This module is only required by OCS Inventory NG SOAP Web Service.
Do you wish to continue ([y]/n] ?←Enterを入力
<中略>
Do you wish to setup Rest API server on this computer ([y]/n)?n ←"n" を入力
<中略>
Do you allow Setup renaming Communication Server Apache configuration file to 'z-ocsinventory-server.conf' ([y]/n) ? ←Enterを入力
Do you wish to setup Administration Server (Web Administration Console) on this computer ([y]/n)?←Enterを入力
<中略>
Do you wish to continue ([y]/n)?←Enterを入力
<中略>
Where to copy Administration Server static files for PHP Web Console
[/usr/share/ocsinventory-reports] ?←Enterを入力
<中略>
Where to create writable/cache directories for deployment packages,
administration console logs, IPDiscover and SNMP [/var/lib/ocsinventory-reports] ?←Enterを入力
<中略>
Setup has created a log file /root/OCSNG_UNIX_SERVER_2.5/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 ;-)