1. 程式人生 > >OCSNG+GLPI Linux客戶端安裝

OCSNG+GLPI Linux客戶端安裝

環境

版本 CentOS Linux release 7.5.1804 (Core) 
核心 3.10.0-862.el7.x86_64
軟體 Ocsinventory-Unix-Agent-2.3

1:配置YUM擴充套件源

[[email protected] ~]# rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/epel-release-latest-7.noarch.rpm

2:安裝依懶包

[
[email protected]
~]# yum install -y perl-XML-Simple perl-Compress-Zlib perl-Net-IP perl-Net-SSLeay perl-Crypt-SSLeay perl-XML-SAX perl-XML-LibXML perl-ExtUtils-Embed

3:建立tiger、日誌目錄

[[email protected] ~]# mkdir  /var/log/ocs-agent

[[email protected] ~]# mkdir  /var/tiger

4:下載客戶端並解壓

[
[email protected]
~]# wget https://github.com/OCSInventory-NG/UnixAgent/releases/download/2.3/Ocsinventory-Unix-Agent-2.3.tar.gz [[email protected] ~]# tar xvf Ocsinventory-Unix-Agent-2.3.tar.gz [[email protected] ~]# cd Ocsinventory-Unix-Agent-2.3/

5:編譯安裝

[[email protected] Ocsinventory-Unix-Agent-2.3]# perl Makefile.PL 

[
[email protected]
Ocsinventory-Unix-Agent-2.3]# make [[email protected] Ocsinventory-Unix-Agent-2.3]# make install
#安裝在/usr/local/share/perl5 下面
Installing /usr/local/bin/ocsinventory-agent
Appending installation info to /usr/lib64/perl5/perllocal.pod
[ ! -f run-postinst ] || /usr/bin/perl postinst.pl
Do you want to configure the agent      
Please enter 'y' or 'n'?> [y]               #配置agent
Where do you want to write the configuration file?
 0 -> /etc/ocsinventory
 1 -> /usr/local/etc/ocsinventory
 2 -> /etc/ocsinventory-agent
?> 2       #配置檔案放在/etc/ocsinventory-agent目錄下           
Do you want to create the directory /etc/ocsinventory-agent?
Please enter 'y' or 'n'?> [y]       #建立配置檔案        
Should the old unix_agent settings be imported ?
Please enter 'y' or 'n'?> [y]    
[info] The config file will be written in /etc/ocsinventory-agent/ocsinventory-agent.cfg,
What is the address of your ocs server?> 192.168.3.211    #設定伺服器IP
Do you need credential for the server? (You probably don't)
Please enter 'y' or 'n'?> [n]        #設定證書        
Do you want to apply an administrative tag on this machine
Please enter 'y' or 'n'?> [y]          
tag?> iii                      #設定標籤
Do yo want to install the cron task in /etc/cron.d
Please enter 'y' or 'n'?> [y]       #建立任務計劃
Where do you want the agent to store its files? (You probably don't need to change it)?> [/var/lib/ocsinventory-agent] 
Do you want to create the /var/lib/ocsinventory-agent directory?

Please enter 'y' or 'n'?> [y] 
Should I remove the old unix_agent
Please enter 'y' or 'n'?> [n] 
Do you want to activate debug configuration option ?
Please enter 'y' or 'n'?> [y] 
Do you want to use OCS Inventory NG UNix Unified agent log file ?
Please enter 'y' or 'n'?> [y] 
Specify log file path you want to use?> /var/log/ocs-agent      #設定日誌路徑
Do you want disable SSL CA verification configuration option (not recommended) ?
Please enter 'y' or 'n'?> [n] 
Do you want to set CA certificate chain file path ?
Please enter 'y' or 'n'?> [y] 
Specify CA certificate chain file path?> /var/tiger              #設定tiger路徑
Do you want to use OCS-Inventory software deployment feature?
Please enter 'y' or 'n'?> [y] 
Do you want to use OCS-Inventory SNMP scans feature?
Please enter 'y' or 'n'?> [y] 
Do you want to send an inventory of this machine?
Please enter 'y' or 'n'?> [y] 
Setting OCS Inventory NG server address...
Looking for OCS Invetory NG Unix Unified agent installation...
ocsinventory agent presents: /usr/local/bin/ocsinventory-agent
Setting crontab...
Creating /var/lib/ocsinventory-agent directory...
Creating /etc/ocsinventory-agent directory...
Writing OCS Inventory NG Unix Unified agent configuration
Creating /var/lib/ocsinventory-agent/http:__10.6.4.240_ocsinventory directory...
Creating /var/lib/ocsinventory-agent/http:__10.6.4.240_ocsinventory/snmp directory...
Copying SNMP MIBs XML files...
Activating modules if needed...
Launching OCS Inventory NG Unix Unified agent...
 -> Success!                #看到success已成功安裝
New settings written! Thank you for using OCS Inventory