一、系统环境
操作系统:CentOS6.5 64bit
OCSNG服务端:OCSNG_UNIX_SERVER-2.1.2.tar.gz
OCSNG Windows客户端:OCSNG-Windows-Agent-2.1.1.ZIP
OCSNG Linux客户端:Ocsinventory-Unix-Agent-2.1.1.tar.gz
GLPI glpi-0.80.5.tar.gz
其它支持包:
SOAP-Lite-1.12.tar.gz
XML-Entities-1.0001.tar.gz
json-1.2.1.tgz
Digest-SHA1-2.13.tar.gz
Apache-DBI-1.12.tar.gz
二、配置系统环境
1、安装操作系统
操作系统安装可根据自行环境配置,我这边是安装的是CentOS6.5,其它版本也可以。
配置好网络,做好相关更新!我服务器IP为10.199.0.111。
2、配置LAMP环境
安装apache和MYSQL
# yum install -y httpd mysql mysql-server php-mysql
安装插件
# tar -zxvf Apache-DBI-1.12.tar.gz
# cd Apache-DBI-1.12
# perl Makefile.PL
# make test
# make
# make install
修改开机启动
# chkconfig httpd on
# chkconfig httpd on
修改防火墙
# vi/etc/sysconfig/iptables
增加
-A INPUT -m state --state NEW -m tcp -p tcp--dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp--dport 3306 -j ACCEPT
重启防火墙
# service iptables restart
关闭SELINUX
# vim/etc/selinux/config
将SELINUX=enforcing改成SELINUX=disabled,需要重启密码。
修改MYSQL密码
# /etc/init.d/mysqldstart
# mysqladmin -u rootpassword 'Password123'
3.安装开发环境
# 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 php-devel php-gd php-pecl-zip php-devel php-pear php-imap php-ldap php-odbc php-xml php-xmlrpc mod_perl perl*
手动安装SOAP和XML
# tar-zxvfSOAP-Lite-1.12.tar.gz
# cdSOAP-Lite-1.12
# perlMakefile.PL
# make
# maketest
# makeinstall
# tar-zxvf XML-Entities-1.0001.tar.gz
# cdXML-Entities
# make
# make test
# make install
三、安装OCSNG
1.安装服务端
# tar-zxvf OCSNG_UNIX_SERVER-2.1.2.tar.gz
# cd OCSNG_UNIX_SERVER-2.1.2/
# ./setup
以下为安装解释
Do you wish tocontinue? //你希望继续?
回车
Which host isrunning database server [localhost]? //询问数据库服务器名称,默认localhost
回车
On which port isrunning database server [3306] ? //询问数据库服务器端口号,默认3306
回车
Where is Apachedaemon binary [/usr/sbin/httpd]? //询问Apache服务器文件位置,默认/usr/sbin/httpd
回车
Where is Apachemain configuration file [/etc/httpd/conf/httpd.conf]? //询问Apache服务器配置文件地址,默认/etc/httpd/conf/httpd.conf
回车
Which useraccount is running Apache web server [apache] ? //询问Apache服务器启动用户,默认为apahce
回车
Which user groupis running Apache web server [apache]? //询问Apache服务器启动组,默认为apache
回车
Setup will putOCS Inventory NG Apache configuration in this directory.Where is ApacheInclude configuration directory [/etc/httpd/conf.d/] ? //询问Apache服务器配置目录位置,默认/etc/httpd/conf.d/
回车
Where is PERLIntrepreter binary [/usr/bin/perl]? //询问perl文件位置,默认为/usr/bin/perl
回车
Do you wish tosetup Communication server on this computer? //询问是否安装OCSNG服务器
回车
Where to putCommunication server log directory [/var/log/ocsinventory-server]? //询问OCSNG服务器日志存放位置,默认为/var/log/ocsinventory-server
回车
Where to putCommunication server plugins configuration files[/etc/ocsinventory-server/plugins] ? //询问OCSNG服务器配置文件存放位置,默认/etc/ocsinventory-server/plugins
回车
Where to putCommunication server plugins Perl modules files [/etc/ocsinventory-server/perl]? //询问OCSNG服务器Perl插件存放位置,默认/etc/ocsinventory-server/perl
回车
This module isonly required by OCS Inventory NG SOAP Web Service. //OCSNG服务器需要SOAP支持
Do you wish tocontinue ([y]/n] ? //询问是否继续。
回车
To ensure Apacheloads mod_perl before OCS Inventory NG Communication Server,Setup can name Communication Server Apacheconfiguration file'z-ocsinventory-server.conf'instead of 'ocsinventory-server.conf'.
Do you allowSetup renaming Communication Server Apache configuration file to 'z-ocsinventory-server.conf' ([y]/n) ?
回车
Do you wish tosetup Administration Server (Web Administration Console)on this computer ([y]/n)? //询问是否安装WEB管理控制台到服务器上
回车
CAUTION: Setupnow install files in accordance with Filesystem Hierarchy Standard. So, no file is installed underApache root document directory(Refer to Apache configuration files tolocate it).
If you'reupgrading from OCS Inventory NG Server 1.01 and previous, YOUMUST REMOVE (or move)directories'ocsreports' and 'download' from Apache root document directory.
If you choose tomove directory, YOU MUST MOVE 'download' directory to Administration Server writable/cachedirectory (by default/var/lib/ocsinventory-reports), especialyif you use deployement feature. //询问PHP页面存放文件夹是否有过修改,位置/var/lib/ocsinventory-reports
Do you wish tocontinue ([y]/n)? //询问是否继续
回车
Where to copyAdministration Server static files for PHP WebConsole[/usr/share/ocsinventory-reports] ?//询问PHP页面文件存放位置,默认/usr/share/ocsinventory-reports
/var/www/html/
回车 ********修改为Apache服务器web根目录
Where to create writable/cache directoriesfor deployement packages,administration console logs, IPDiscover and SNMP[/var/lib/ocsinventory-reports] ? //询问管理控制台登陆日志,ipdiscover各SNMP存放目录,默认为/var/lib/ocsinventory-reports
回车
有以上提示就安装完成
四、配置OCSNGWEB
1.启动Apache
# service httpd start
在浏览器里输入:http//10.199.0.111/ocsreports/,10.199.0.111为服务器IP地址。
输入MYSQL的用户名与密码,Send!
提交查询
点击ClickheretoenterOCS-NGGUI。
输入账号与密码,默认为admin/admin。
OCSNG服务器安装完成