OCSNG+GLPI Linux客户端安装

环境

版本 CentOS Linux release 7.5.1804 (Core) 
内核 3.10.0-862.el7.x86_64
软件 Ocsinventory-Unix-Agent-2.3

1:配置YUM扩展源

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

2:安装依懒包

[root@slave ~]#  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、日志目录

[root@slave ~]# mkdir  /var/log/ocs-agent

[root@slave ~]# mkdir  /var/tiger

4:下载客户端并解压

[root@slave ~]# wget https://github.com/OCSInventory-NG/UnixAgent/releases/download/2.3/Ocsinventory-Unix-Agent-2.3.tar.gz

[root@slave ~]# tar xvf Ocsinventory-Unix-Agent-2.3.tar.gz

[root@slave ~]# cd Ocsinventory-Unix-Agent-2.3/

5:编译安装

[root@slave Ocsinventory-Unix-Agent-2.3]# perl Makefile.PL 

[root@slave Ocsinventory-Unix-Agent-2.3]# make

[root@slave 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

猜你喜欢

转载自blog.csdn.net/tiger199/article/details/83185636