安装OCSNG_LINUX_AGENT客户端
安装所需要的模块
#yum install -y perl-XML-Simple perl-Compress-Zlib perl-Net-IP perl-Net-SSLeay perl-Crypt-SSLeay perl-XML-SAX perl-XML-LibXML
下载OCSNG_LINUX_AGENT
# wget http://lwlp.googlecode.com/files/OCSNG_LINUX_AGENT_1.1.2.tar.gz
# tar zxvf OCSNG_LINUX_AGENT_1.1.2.tar.gz -C /opt/src
# cd /opt/src/OCSNG_LINUX_AGENT_1.1.2
# cp ipdiscover /usr/sbin/ipdisconver
# perl Makefile.PL
//若make的时候提示需要安装或升级某些模块,请根据提示安装升级。
# make
# make install
Do you want to configure the agent
Please enter 'y' or 'n'?> [y] 直接回车
Where do you want to write the configuration file?
0 -> /etc/ocsinventory
1 -> /usr/local/etc/ocsinventory
2 -> /etc/ocsinventory-agent
?> 2 //选择配置文件存放目录
Do you want to create the directory /etc/ocsinventory-agent?
Please enter 'y' or 'n'?> [y] 直接回车
[info] The config file will be written in /etc/ocsinventory/ocsinventory-agent.cfg,
What is the address of your ocs server?> [ocsinventory-ng] 172.16.74.82 //输入ocsinventory-server的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?> Nginx-web //这个会显示在web管理控制界面中
ocsinventory agent presents: /usr/bin/ocsinventory-agent
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] 直接回车
//选择存放agent文件目录,请根据自己的情况做修改,我们这里选择默认,即存放在/var/lib/ocsinventory-agent目录下
Do you want to create the /var/lib/ocsinventory-agent directory?
Please enter 'y' or 'n'?> [y] 直接回车
//是否想要创建/var/lib/ocsinventory-agent目录,当然先y,直接回车
New settings written! Thank you for using OCS Inventory
Should I remove the old linux_agent
Please enter 'y' or 'n'?> [n] 直接回车
//是否要删除旧版本的linux客户端代理,我们这里选择默认,直接回车
Do you want to use OCS-Inventory software deployment feature?
Please enter 'y' or 'n'?> [y] 直接回车
//是否使用软件部署功能,选择y,直接回车
Do you want to send an inventory of this machine?
Please enter 'y' or 'n'?> [y] 直接回车
//是否是发送这台计算机的清单,选择y,直接回车
[info] Accountinfo file doesn't exist. I create an empty one.
-> Success!
//当你看到这里,恭喜你,你已经成功的将该计算机的清单发送到服务器:-)
再登录web管理界面,可以查看到,以下信息:
用红框标出来的,就是刚刚安装agent的客户端,看到tag一栏是显示Nginx-web就是安装过程中的tag?> 这里输入的标签内容。
配置OCS+GLPI
准备2个包: ( json和php-mbstring )
安装:
#yum install php-mbstring
wget http://pecl.php.net/get/json -O json-1.2.1.tgz
tar -xf json-1.2.1.tgz
cd json-1.2.1
phpize
./configure
make
make install
echo "extension=json.so" >> /etc/php.ini # 这一句根据自己的环境执行
#service httpd restart
安装GLPI
#tar -zxvf glpi-0.78-RC2.tar.gz
# cp -a glpi /var/www/html/
# chown -R apache:apache /var/www/html/glpi/
让GLPI支持中文
0.78版进入glpi安装目录,修改/inc/dbmysql.class.php文件,定位到$this->dbenc 修改"latin1"为"utf8" 即可
0.74及以前版本在/inc/ocsng.class.php文件中修改
配置GLPI:
在浏览器输入http://serverip/glpi 进行配置
1,环境检测
2,选择语言
3,输入数据库帐号
4,创建新的glpi数据库
5,完成
默认的管理用户为glpi/glpi
设置GLPI的OCS方式
1. 点击 ->设定->常规->存货清单(选择 激活OCSNG方式 :是)
2. 点击 ->设定->OCSNG方式->localhost中,在通用选项中填入mysql帐号
3.在导入选项中除了(use the OCSNG software dictionary)都开启,其中use the OCSNG software dictionary 不要开启,会导致不能同步OCS软件库,GLPI上看不到软件。
4.在 General informations 中开启所有选项
4.在 Link里开启所有选项
5.在 工具->OCSNG选项中选择添加新计算机的导入.
6.配置域账号登录
7.设置AD