Ubuntu 12.04搭建OCS+GLPI

OCSNG 是一款開源的硬件採集程序,配合GLPI能夠很好的做爲資產管理的解決方案,特別是針對help desk 方面的工做有很好的記錄維護功能php

其工做原理示意圖以下:html

poster-eng

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

一、安裝支持模塊mysql

二、安裝OCS服務端(linux)linux

三、安裝GLPIweb

四、整合OCS與GLPIsql

五、測試數據庫

安裝支持apache

 
sudo apt-get update
sudo apt-get dist-upgrade //系統更新到最新

apt-get install libapache2-mod-php5
apt-get install php5-cli 
apt-get install php5-common 
apt-get install php5-cgi 
apt-get install mysql-server //會要求輸入數據庫密碼 ,用戶是root(這 個在下面會用到)
apt-get install php5-mysql 
apt-get install build-essential 
apt-get install libapache2-mod-perl2 
apt-get install php5-gd 
apt-get install libxml-simple-perl 
apt-get install libcompress-raw-zlib-perl 
apt-get install libdbi-perl 
apt-get install libdbd-mysql-perl 
apt-get install libapache-dbi-perl 
apt-get install php-pear 
apt-get install php5-dev 
apt-get install libnet-ip-perl 
apt-get install libsoap-lite-perl 
apt-get install libyaml-perl 
apt-get install libmysqlclient-dev
 

2、安裝OCS小程序

一、下載OCS服務端windows

# /99500930/OCSNG_UNIX_SERVER-2.0.5.tar.gz //這是服務端,你能夠在linux中經過上述方式下載

https://launchpadlibrarian.net/114008385/OCSNG-Windows-Agent-2.0.5.zip

//這是windows客戶端,你能夠經過windows平臺下載,測試的時候會用到)

二、開始安裝

# tar xvf OCSNG_UNIX_SERVER-2.0.5.tar.gz //這是解壓

#cd OCSNG_UNIX_SERVER-2.0.5 //進入目錄

#sh setup.sh //開始安裝,會有一系列的選項,除了我下面列出來的其他的一概默認回車

圖一:

clip_image002

若是不修改web 目錄也可,可是注意帳號,文件夾分配權限

sudo chmod -R 777  /usr/share/ocsinventory-reports/

圖二:安裝完成後,在windows瀏覽器下輸入http://主機的IP/ocsreports/install.php

root /123456a

clip_image004

圖三:下一步,這個地方默認admin/admin

clip_image006

圖四:

clip_image008

到此OCS服務端(linux)安裝完成,

登陸地址http://IP地址/reports/ 能夠查看硬件採集信息

3、安裝GLPI

下載地址:https://forge.indepnet.net/attachments/download/1387/glpi-0.83.7.tar.gz

tar zxvf glpi-0.83.7.tar.gz //解壓

 mv glpi /var/www/

 cd /var/www

chmod 777 –R /var/www

在瀏覽器輸入http://主機IP/glpi/

圖一:選擇中文

clip_image010

圖二:「接受條款」

clip_image012

圖三:「設施」

clip_image014

圖四:繼續

clip_image016

圖五:

clip_image018

圖六:選擇ocsweb

clip_image020

圖七:glpi/glpi賬號和密碼,其它的能夠進入查看

clip_image022

到此GLPI安裝完成

4、整合OCS到GLPI中

圖一:設置—常規

clip_image024

圖二:資產清單—「Enable the OCSNG mode :是」

clip_image026

圖三:localhost

clip_image028

圖四OCSNG服務器欄以下

clip_image030

圖五:注意了!導入選項欄以下,項目自選,注意我框的地方,若是勾選客戶端軟件將

沒法導入!

clip_image032

圖六:常規信息欄以下,根據須要,項目自選

clip_image034

到此,整合完成

5、測試

圖一:XP下,個人計算機名

clip_image036

圖二:安裝

clip_image038

圖三:更改本身的IP

clip_image040

圖四:不用改動

clip_image042

圖五:解釋

一、//enable verbose log:啓用詳細日誌

二、//do not scan for installed software:不掃描已安裝的軟件

三、//never ask for TAG:忽略標籤

四、//do not register service - agent must be launched manually:不註冊服務 - 代理必須手動啓動

五、//do not register systray applet to automatically start:不註冊系統托盤小程序自動啓動

六、//immediately launch inventory:馬上啓動庫存

clip_image044

圖六:客戶端安裝完成

clip_image046

圖七:在windows瀏覽器下從新進入http://IP地址/glpi(glpi/glpi)

clip_image048

圖八:

clip_image050

圖九:已經看到個人機器了,點擊「導入」

clip_image052

圖十:

clip_image054

一、官方下載頁:

OCS服務端:http://www.ocsinventory-ng.org/en/download/download-server.html

OCS客戶端:http://www.ocsinventory-ng.org/en/download/download-agent.html

GLPI:http://www.glpi-project.org/?article3&lang=fr

參考連接 :

OCS 2.0.5 linux客戶端: https://launchpadlibrarian.net/101658891/ocsinventory-agent_2.0.5.orig.tar.gz  

http://blog.famillecollet.com/post/2009/06/02/ocsinventory-1.02.1-1-en

官方:http://wiki.ocsinventory-ng.org/index.php/Documentation:Server

相關文章
相關標籤/搜索