#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?
[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?
//是否想要建立/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?
//是否使用軟體部署功能,選擇y,直接回車
Do you want to send an inventory of this machine?
//是否是發送這台計算機的清單,選擇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