猝然临之而不惊,无故加之而不怒。
分类: WINDOWS
2011-12-10 09:59:37
OCSNG+GLPI 系统安装配置UTF-8版 支持中文
感谢Chris Woo
系统环境:
CentOS5.5 64bit (32bit 测试通过)
一,OCS和GLPI安装包准备
Server端:OCS1.3.2UTF8版 (linvinus 版)
Windows客户端:
(linvinus 版)
GLPI安装包 0.78 RC2
其他要准备的包:(手动下载)
Apache-DBI-1.06.tar.gz(Apache 模块)
SOAP-Lite-0.69.tar.gz (prel 模块)
XML-Entities-0.0307.tar.gz(Prel 模块)
二,配置系统环境
1,配置LAMP环境
#yum install -y httpd mysql mysql-server php-mysql
Apache需要手动装的模块:Apache-DBI
#tar -zxvf Apache-DBI-1.06.tar.gz
#cd Apache-DBI-1.06
#perl Makefile.PL
#make test
#make
#make install
#chkconfig httpd on
#chkconfig mysqld on
修改mysql root密码,也可自定义用户.
#/etc/init.d/mysqld start
#mysqladmin -u root password '123'
2,配置开发环境
#yum install -y gcc gcc-c++ glibc-devel glibc-headers autoconf automake bzip2-devel zlib-devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel pam-devel openssl-devel libXpm libX11 libxml2-devel gettext-devel pcre-devel mysql mysql-server httpd php php-devel php-gd php-pecl-zip php-mysql php-devel php-pear php-imap php-ldap php-odbc php-xml php-xmlrpc mod_perl
3,配置Perl 环境
#yum install –y perl mod_perl perl-XML-Simple perl-Compress-Zlib perl-DBI perl-DBD-MySQL perl-Net-IP
prel需要手动安装的模块:SOAP-Lite 和XML-Entities
#tar -zxvf SOAP-Lite-0.69.tar.gz
#cd SOAP-Lite-0.69
#perl Makefile.PL
#make
#make test
#make install
#tar -zxvf XML-Entities-0.0307.tar.gz
#cd XML-Entities
#perl Makefile.PL
#make
#make test
#make install
三,安装OCSNG
#tar -zxvf OCSNG_UNIX_SERVER-1.3.2-linvinus-with-utf8_patch.tar.gz
#cd ocsinventory-server-1.3.2/
#./setup.sh
1,脚本一路回车即可,如有错误请检查所有Perl模块是否都安装好
其中有一个选项需注意:
Where to copy Administration Server static files for PHP Web Console
[/usr/share/ocsinventory-reports] ?/var/www/html/ 回车 :选择web文件存放的路径,我默认的是/var/www/html/
2,提示如下信息证明已经安装成功
DON'T FORGET TO RESTART APACHE DAEMON !
Enjoy OCS Inventory NG ;-)
3,在地址栏输入
进行安装配置
输入mysql用户密码如果本机的mysql地址是localhost,
接下来OCS会创建OCSweb库创建好后回到页面用默认admin/admin进入.
这样服务端就配置完成.别忘了再重启一下mysqld服务.
四:安装window客户端
客户端运行 安装即可,服务器地址填入OCSNG服务器地址,端口默认是80
之后在OCS中就可以看到客户端机器的数据了
可以查看的项目很多,当然游戏也不列外.不一一列举,
付:默认安装完成自动会运行一次OcsAgent,当然可以以后手动运行,客户端配置文件在安装目录中的server.ini文件中,可以手动修改提交的服务器地址.
客户端可以转换成MSI包或者用官方 工具配置.官方可能是非UTF8的版本,这样中文可能还是有问题.
五:安装GLPI
GLPI的安装就相对简单了.可以装在一台服务器上,用同一台mysql库.
我选择的版本是GLPI 0.78 RC2 版本,和别的版本区别不大.安装0.78 多一个包的要求
准备2个包:
json和php-mbstring
#pecl download json 或者手动去网站下载json-1.2.1.tgz包
#pear install json-1.2.1.tgz
#tar -zxvf glpi-0.78-RC2.tar.gz
#cp -a glpi /var/www/html/
#chown -R apache:apache /var/www/html/glpi/ 权限一定要给
配置GLPI:
浏览器输入 进行配置
1,环境检测
2,选择语言
3,输入数据库帐号
4,创建新的glpi数据库
5,完成
默认的管理用户为glpi/glpi
六:配置OCS+GLPI协作
1,让GLPI支持中文: 十分感谢Chris Woo提供的方法
0.78版进入glpi安装目录,修改/inc/dbmysql.class.php文件,定位到$this->dbenc 修改"latin1"为"utf8" 即可
0.74及以前版本在/inc/ocsng.class.php文件中修改
2,设置GLPI的OCS方式
在General 设置中打开OCSNG方式.
进入 ->设定->OCSNG方式->localhost中
在通用选项中填入mysql帐号
在导入选项中都开启,
其中use the OCSNG software dictionary 不要开启,会导致不能同步OCS软件库,机器上看不到软件.
在 General informations 中开启所有选项
在 Link里开启所有选项
3,在工具->OCSNG选项中选择添加新计算机的导入.
导入成功后就可以在计算机中查看
这样OCS和GLPI都已经配置好了,GLPI实在是太好了,CASE调度,资产管理,文档整理,不用我多说了.大家可以测试一下.
本文出自 “顺妻自然” 博客,请务必保留此出处http://songxj.blog.51cto.com/620981/364118
PS:
其实OCS-NG上()已有做好的虚拟机(VMware)提供下载,只要修改一下IP就可以使用了。
OCS-NG祥细安装配置说明可以参考:http://hi.baidu.com/lue_liu/blog/item/f879b22097a573278744f99d.html
Command Line Options: | Meaning: |
/work_dir:"path to directory" | Agent must use "path to directory" as working dir (this directory may included configuration file). Default is "%ALLUSERSPROFILE%\Application Data\OCS Inventory NG\Agent" or "%PROGRAMDATA%\OCS Inventory NG\Agent" |
/local[="path to folder"] | Agent do not contact communication server, and store inventory in xml compressed .ocs file into folder "path to folder". If no "path to folder" provided, agent assume folder as data folder |
/debug[=level] | Generate a very verbose log file "ocsinventory.log" into agent's install folder. 0 => disable verbose logs (default) 1 => enable default verbose logs (default when no level provided provided) 2 => enable debuging logs |
/notag | Agent must NOT prompt user for TAG in any case |
/tag="my value" | Agent must set "my value" as TAG value |
/xml=["path to folder"] | Agent must store inventory in uncompressed xml format into folder "path to folder". If no "path to folder" provided, agent assume folder as data folder |
/force | Always send inventory, even if server do not ask for it (use only for debugging purpose !) |
/ipdisc="network number" | Agent must launch IP discovery on network "network number" (use only for debugging purpose !)
|
/ipdisc_lat="number of milliseconds" | Set latency between 2 IP Discover requests to "number of milliseconds" |
/fastip | Never wait for latency between 2 IP Discover requests (use only for debugging purpose !) |
/hkcu | Search also for software under HKEY_CURRENT_USER registry hive (do not work with service as LocalSystem !) |
/uid | Agent must generate a new unique device ID |
/server=http[s]://server.domain.tld[:port]/ocsinventory | Agent try to connect to Communication Server address and port Listening on http[s]://server.domain.tld[:port]/ocsinventory |
/ssl=0|1 | When usng SSL connections: 0 => SSL without certificate validation, 1 => SSL with server certificate validation required (needs CA certificate) |
/ca="path_to_cabundle.pem" | Path to CA certificate chain file in PEM format, for server certificate validation |
/user=username /pwd=password | Communication Server authentication credentials |
/proxy_type=0|1|2|3 | Agent proxy use 0 => no, 1 => HTTP proxy, 2 => Socks 4 proxy, 3 => Socks 5 proxy)
|
/proxy=proxy_address | Proxy server address (without protocol !) |
/proxy_port=port | Proxy server port |
/proxy_user=username /proxy_pwd=password | Proxy authentication credentials |