tar zxvf OCSNG_UNIX_SERVER-2.1.1.tar.gz cd OCSNG_UNIX_SERVER-2.1.1 ./setup.sh
接下来一路回车,你会依次看到如下的选择提示
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Do you wish to continue ([y]/n)? Which host is running database server [localhost] ? On which port is running database server [3306] ? Where is Apache daemon binary [/usr/sbin/httpd] ? Where is Apache main configuration file [/etc/httpd/conf/httpd.conf] ? Which user account is running Apache web server [apache] ? Which user group is running Apache web server [apache] ? Where is Apache Include configuration directory [/etc/httpd/conf.d/] ? Where is PERL Intrepreter binary [/usr/bin/perl] ? Do you wish to setup Communication server on this computer ([y]/n)? Where to put Communication server log directory [/var/log/ocsinventory-server] ? Communication server need a directory for plugins configuration files. Where to put Communication server plugins configuration files [/etc/ocsinventory-server/plugins] ? Communication server need a directory for plugins Perl modules files. Where to put Communication server plugins Perl modules files [/etc/ocsinventory-server/perl] ?
+----------------------------------------------------------+ | Checking for required Perl Modules... | +----------------------------------------------------------+
Checking for DBI PERL module... Found that PERL module DBI is available. Checking for Apache::DBI PERL module... *** ERROR: PERL module Apache::DBI is not installed ! Checking for DBD::mysql PERL module... Found that PERL module DBD::mysql is available. Checking for Compress::Zlib PERL module... Found that PERL module Compress::Zlib is available. Checking for XML::Simple PERL module... *** ERROR: PERL module XML::Simple is not installed ! Checking for Net::IP PERL module... *** ERROR: PERL module Net::IP is not installed ! *** ERROR: There is one or more required PERL modules missing on your computer ! Please, install missing PERL modules first.
OCS setup.sh can install perl module from packages for you The script will use the native package from your operating system like apt or rpm Do you wish to continue (y/[n])?
下载perl-Apache-DBI-1.09-1.el6.noarch.rpm,并安装 我这里提示
1 2 3 4
rpm -i perl-Apache-DBI-1.09-1.el6.noarch.rpm warning: perl-Apache-DBI-1.09-1.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY error: Failed dependencies: perl(Digest::SHA1) is needed by perl-Apache-DBI-1.09-1.el6.noarch
mysql -u root -p create database glpi; create database ocsweb; grant all privileges on glpi.* to glpi@localhost identified by 'password'; grant all privileges on ocsweb.* to ocs@localhost identified by 'password'; set global max_allowed_packet = 2*1024*1024*10 exit