Ну так вот. На момент написания статьи на сайте заявлена версия 2.0 в то время как в портах 1.3.3. Она наверняка там когда то появится и тогда можно будет просто поставить с портов, но пока что я буду описывать как это сделать руками.
Мне не хочется искать все зависимости, потому я сначало поставлю то, что есть, дабы порт потянул за собой все нужные программки
Код: Выделить всё
unix# cd /usr/ports/net-mgmt/ocsinventory-ng
unix# make install clean
У меня на сервере практически ничего ещё не стоит - потому вопросов он мне назадавал много:
Код: Выделить всё
┌────────────────────────────────────────────────────────────────────┐
│ Options for mysql-client 5.5.12 │
│ ┌────────────────────────────────────────────────────────────────┐ │
│ │ [X] OPENSSL Enable SSL support │ │
│ │ [ ] FASTMTX Replace mutexes with spinlocks │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
├─└────────────────────────────────────────────────────────────────┘─┤
│ [ OK ] Cancel │
└────────────────────────────────────────────────────────────────────┘
┌────────────────────────────────────────────────────────────────────┐
│ Options for p5-DBD-mysql 4.019 │
│ ┌────────────────────────────────────────────────────────────────┐ │
│ │ [ ] SSL build with OpenSSL support │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
├─└────────────────────────────────────────────────────────────────┘─┤
│ [ OK ] Cancel │
└────────────────────────────────────────────────────────────────────┘
┌────────────────────────────────────────────────────────────────────┐
│ Options for p5-libwww 5.837 │
│ ┌────────────────────────────────────────────────────────────────┐ │
│ │ [ ] SSL Enable https support │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
├─└────────────────────────────────────────────────────────────────┘─┤
│ [ OK ] Cancel │
└────────────────────────────────────────────────────────────────────┘
┌────────────────────────────────────────────────────────────────────┐
│ Options for php5-mysql 5.3.6 │
│ ┌────────────────────────────────────────────────────────────────┐ │
│ │ [X] MYSQLND Use MySQL Native Driver │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
├─└────────────────────────────────────────────────────────────────┘─┤
│ [ OK ] Cancel │
└────────────────────────────────────────────────────────────────────┘
┌────────────────────────────────────────────────────────────────────┐
│ Options for php5-gd 5.3.6 │
│ ┌────────────────────────────────────────────────────────────────┐ │
│ │ [X] T1LIB Include T1lib support │ │
│ │ [X] TRUETYPE Enable TrueType string function │ │
│ │ [ ] JIS Enable JIS-mapped Japanese font support │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
├─└────────────────────────────────────────────────────────────────┘─┤
│ [ OK ] Cancel │
└────────────────────────────────────────────────────────────────────┘
Код: Выделить всё
unix# cd /usr/ports/net-mgmt/ocsinventory-ng
unix# make deinstall
===> Deinstalling for net-mgmt/ocsinventory-ng
===> Deinstalling ocsinventory-ng-1.3.3
Код: Выделить всё
unix# cd /usr/ports/www/p5-Apache-DBI-mp2
unix# make install clean
unix# cd /usr/ports/textproc/p5-XML-Entities
unix# make install clean
Код: Выделить всё
unix# cd /usr/local/install
unix# fetch http://launchpadlibrarian.net/71381405/OCSNG_UNIX_SERVER-2.0.tar.gz
OCSNG_UNIX_SERVER-2.0.tar.gz 100% of 6199 kB 1746 kBps
unix#
unix# tar -xzf OCSNG_UNIX_SERVER-2.0.tar.gz
Теперь самое время запустить этот скрипт и ответить на его вопросы
Код: Выделить всё
unix# ./setup.sh
+----------------------------------------------------------+
| |
| Welcome to OCS Inventory NG Management server setup ! |
| |
+----------------------------------------------------------+
Trying to determine whitch OS or Linux distribution you use
+----------------------------------------------------------+
| Checking for Apache web server binaries ! |
+----------------------------------------------------------+
CAUTION: If upgrading Communication server from OCS Inventory NG 1.0 RC2 and
previous, please remove any Apache configuration for Communication Server!
Do you wish to continue ([y]/n)?y
Assuming Communication server 1.0 RC2 or previous is not installed
on this computer.
Starting OCS Inventory NG Management server setup from folder /usr/local/install/OCSNG_UNIX_SERVER-2.0
Storing log in file /usr/local/install/OCSNG_UNIX_SERVER-2.0/ocs_server_setup.log
+----------------------------------------------------------+
| Checking for database server properties... |
+----------------------------------------------------------+
Your MySQL client seems to be part of MySQL version 5.5.
Your computer seems to be running MySQL 4.1 or higher, good ;-)
Which host is running database server [localhost] ?
OK, database server is running on host localhost ;-)
On which port is running database server [3306] ?
OK, database server is running on port 3306 ;-)
+----------------------------------------------------------+
| Checking for Apache web server daemon... |
+----------------------------------------------------------+
Where is Apache daemon binary [/usr/local/sbin/httpd] ?
OK, using Apache daemon /usr/local/sbin/httpd ;-)
+----------------------------------------------------------+
| Checking for Apache main configuration file... |
+----------------------------------------------------------+
Where is Apache main configuration file [/usr/local/etc/apache22/httpd.conf] ?
OK, using Apache main configuration file /usr/local/etc/apache22/httpd.conf ;-)
+----------------------------------------------------------+
| Checking for Apache user account... |
+----------------------------------------------------------+
Which user account is running Apache web server [User] ?www
OK, Apache is running under user account www ;-)
+----------------------------------------------------------+
| Checking for Apache group... |
+----------------------------------------------------------+
Which user group is running Apache web server [www] ?
OK, Apache is running under users group www ;-)
+----------------------------------------------------------+
| Checking for Apache Include configuration directory... |
+----------------------------------------------------------+
Setup found Apache Include configuration directory in
.
Setup will put OCS Inventory NG Apache configuration in this directory.
Where is Apache Include configuration directory [] ?/usr/local/etc/apache22/Includes
OK, Apache Include configuration directory /usr/local/etc/apache22/Includes found ;-)
+----------------------------------------------------------+
| Checking for PERL Interpreter... |
+----------------------------------------------------------+
Found PERL Intrepreter at </usr/bin/perl> ;-)
Where is PERL Intrepreter binary [/usr/bin/perl] ?
OK, using PERL Intrepreter /usr/bin/perl ;-)
Do you wish to setup Communication server on this computer ([y]/n)?
+----------------------------------------------------------+
| Checking for Make utility... |
+----------------------------------------------------------+
OK, Make utility found at </usr/bin/make> ;-)
+----------------------------------------------------------+
| Checking for Apache mod_perl version... |
+----------------------------------------------------------+
Checking for Apache mod_perl version 1.99_22 or higher
Found that mod_perl version 1.99_22 or higher is available.
OK, Apache is using mod_perl version 1.99_22 or higher ;-)
+----------------------------------------------------------+
| Checking for Communication server log directory... |
+----------------------------------------------------------+
Communication server can create detailled logs. This logs can be enabled
by setting interger value of LOGLEVEL to 1 in Administration console
menu Configuration.
Where to put Communication server log directory [/var/log/ocsinventory-server] ?
OK, Communication server will put logs into directory /var/log/ocsinventory-server ;-)
+----------------------------------------------------------+
| Checking for required Perl Modules... |
+----------------------------------------------------------+
Checking for DBI PERL module...
Found that PERL module DBI is available.
Checking for Apache::DBI PERL module...
Found that PERL module Apache::DBI is available.
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...
Found that PERL module XML::Simple is available.
Checking for Net::IP PERL module...
Found that PERL module Net::IP is available.
+----------------------------------------------------------+
| Checking for optional Perl Modules... |
+----------------------------------------------------------+
Checking for SOAP::Lite PERL module...
Found that PERL module SOAP::Lite is available.
Checking for XML::Entities PERL module...
Found that PERL module XML::Entities is available.
+----------------------------------------------------------+
| OK, looks good ;-) |
| |
| Configuring Communication server Perl modules... |
+----------------------------------------------------------+
Checking if your kit is complete...
Looks good
Writing Makefile for Apache::Ocsinventory
+----------------------------------------------------------+
| OK, looks good ;-) |
| |
| Preparing Communication server Perl modules... |
+----------------------------------------------------------+
+----------------------------------------------------------+
| OK, prepare finshed ;-) |
| |
| Installing Communication server Perl modules... |
+----------------------------------------------------------+
+----------------------------------------------------------+
| OK, Communication server Perl modules install finished;-)|
| |
| Creating Communication server log directory... |
+----------------------------------------------------------+
Creating Communication server log directory /var/log/ocsinventory-server.
Fixing Communication server log directory files permissions.
*** WARNING Please configure log rotation for files in /var/log/ocsinventory-server
+----------------------------------------------------------+
| OK, Communication server log directory created ;-) |
| |
| Now configuring Apache web server... |
+----------------------------------------------------------+
To ensure Apache loads mod_perl before OCS Inventory NG Communication Server,
Setup can name Communication Server Apache configuration file
'z-ocsinventory-server.conf' instead of 'ocsinventory-server.conf'.
Do you allow Setup renaming Communication Server Apache configuration file
to 'z-ocsinventory-server.conf' ([y]/n) ?y
OK, using 'z-ocsinventory-server.conf' as Communication Server Apache configuration file
Removing old communication server configuration to file /usr/local/etc/apache22/Includes/ocsinventory.conf
Writing communication server configuration to file /usr/local/etc/apache22/Includes/z-ocsinventory-server.conf
+----------------------------------------------------------+
| OK, Communication server setup sucessfully finished ;-) |
| |
| Please, review /usr/local/etc/apache22/Includes/z-ocsinventory-server.conf
| to ensure all is good. Then restart Apache daemon. |
+----------------------------------------------------------+
Do you wish to setup Administration Server (Web Administration Console)
on this computer ([y]/n)?y
+----------------------------------------------------------+
| Checking for Administration Server directories... |
+----------------------------------------------------------+
CAUTION: Setup now install files in accordance with Filesystem Hierarchy
Standard. So, no file is installed under Apache root document directory
(Refer to Apache configuration files to locate it).
If you're upgrading from OCS Inventory NG Server 1.01 and previous, YOU
MUST REMOVE (or move) directories 'ocsreports' and 'download' from Apache
root document directory.
If you choose to move directory, YOU MUST MOVE 'download' directory to
Administration Server writable/cache directory (by default
/var/lib/ocsinventory-reports), especialy if you use deployement feature.
Do you wish to continue ([y]/n)?y
Assuming directories 'ocsreports' and 'download' removed from
Apache root document directory.
Where to copy Administration Server static files for PHP Web Console
[/usr/share/ocsinventory-reports] ?/usr/home/www/proxy
OK, using directory /usr/home/www/proxy to install static files ;-)
Where to create writable/cache directories for deployement packages,
IPDiscover and SNMP [/var/lib/ocsinventory-reports] ?
OK, writable/cache directory is /var/lib/ocsinventory-reports ;-)
+----------------------------------------------------------+
| Checking for required Perl Modules... |
+----------------------------------------------------------+
Checking for DBI PERL module...
Found that PERL module DBI is available.
Checking for DBD::mysql PERL module...
Found that PERL module DBD::mysql is available.
Checking for XML::Simple PERL module...
Found that PERL module XML::Simple is available.
Checking for Net::IP PERL module...
Found that PERL module Net::IP is available.
+----------------------------------------------------------+
| Installing files for Administration server... |
+----------------------------------------------------------+
Creating PHP directory /usr/home/www/proxy/ocsreports.
Copying PHP files to /usr/home/www/proxy/ocsreports.
Fixing permissions on directory /usr/home/www/proxy/ocsreports.
Creating database configuration file /usr/home/www/proxy/ocsreports/dbconfig.inc.php.
Creating IPDiscover directory /var/lib/ocsinventory-reports/ipd.
Fixing permissions on directory /var/lib/ocsinventory-reports/ipd.
Creating packages directory /var/lib/ocsinventory-reports/download.
Fixing permissions on directory /var/lib/ocsinventory-reports/download.
Creating packages directory /var/lib/ocsinventory-reports/snmp.
Fixing permissions on directory /var/lib/ocsinventory-reports/snmp.
Configuring snmp_com.txt file
Configuring IPDISCOVER-UTIL Perl script.
Installing IPDISCOVER-UTIL Perl script.
Fixing permissions on IPDISCOVER-UTIL Perl script.
Writing Administration server configuration to file /usr/local/etc/apache22/Includes/ocsinventory-reports.conf
+----------------------------------------------------------+
| OK, Administration server installation finished ;-) |
| |
| Please, review /usr/local/etc/apache22/Includes/ocsinventory-reports.conf
| to ensure all is good and restart Apache daemon. |
| |
| Then, point your browser to http://server//ocsreports
| to configure database server and create/update schema. |
+----------------------------------------------------------+
Setup has created a log file /usr/local/install/OCSNG_UNIX_SERVER-2.0/ocs_server_setup.log. Please, save this file.
If you encounter error while running OCS Inventory NG Management server,
we can ask you to show us his content !
DON'T FORGET TO RESTART APACHE DAEMON !
Enjoy OCS Inventory NG ;-)
unix#
Код: Выделить всё
LoadModule perl_module libexec/apache22/mod_perl.so
Код: Выделить всё
Include etc/apache22/Includes/*.conf
Код: Выделить всё
unix# /usr/local/etc/rc.d/apache22 stop
Stopping apache22.
Waiting for PIDS: 73781.
unix# /usr/local/etc/rc.d/apache22 start
Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.
unix#