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

GLPIOCSNG是两个功能强大的开源IT管理工具,将它们整合在一起可以更好地管理IT资产和维护IT系统。下面是CentOS 7下GLPIOCSNG新版整合安装的步骤: 1. 安装PHP、Apache和MariaDB ``` yum install epel-release yum install httpd mariadb-server php php-mysql php-xml ``` 2. 配置MariaDB ``` systemctl start mariadb systemctl enable mariadb mysql_secure_installation ``` 3. 创建OCSNG数据库 ``` mysql -uroot -p CREATE DATABASE ocsweb; GRANT ALL PRIVILEGES ON ocsweb.* TO 'ocsuser'@'localhost' IDENTIFIED BY 'ocspassword'; FLUSH PRIVILEGES; exit ``` 4. 下载和安装OCSNG Server ``` cd /opt wget https://github.com/OCSInventory-NG/OCSInventory-ocsreports/releases/download/2.9.2/OCSNG_UNIX_SERVER_2.9.2.tar.gz tar -zxvf OCSNG_UNIX_SERVER_2.9.2.tar.gz cd OCSNG_UNIX_SERVER_2.9.2 ./setup.sh ``` 安装过程中需要输入MySQL数据库信息,包括数据库名称、用户名和密码。 5. 下载和安装OCSNG Agent ``` cd /opt wget https://github.com/OCSInventory-NG/UnixAgent/releases/download/2.4.1/Ocsinventory-Unix-Agent-2.4.1.tar.gz tar -zxvf Ocsinventory-Unix-Agent-2.4.1.tar.gz cd Ocsinventory-Unix-Agent-2.4.1 ./setup.sh ``` 6. 下载和安装GLPI ``` cd /var/www/html wget https://github.com/glpi-project/glpi/releases/download/9.5.3/glpi-9.5.3.tgz tar -zxvf glpi-9.5.3.tgz ``` 7. 配置GLPI ``` chown -R apache:apache /var/www/html/glpi chmod -R 755 /var/www/html/glpi ``` 8. 启动Apache和OCSNG服务 ``` systemctl start httpd systemctl enable httpd systemctl start ocsinventory-server systemctl enable ocsinventory-server ``` 9. 访问GLPI网页 在浏览器中输入服务器IP地址或域名,进入GLPI安装向导,按照提示进行安装。 10. 添加OCSNG插件 在GLPI安装并启用OCSNG插件,通过插件可以直接连接到OCSNG服务,导入和管理IT资产信息。 以上就是CentOS 7下GLPIOCSNG新版整合安装的步骤,希望对你有所帮助。
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值