Howtos:OCS Inventory 1 3 server slackware 13 0

From OCS Inventory NG
Jump to: navigation, search

Clean Slackware 13.0 Installation howto


Configure Mysql Database:

chmod 755 /etc/rc.d/rc.mysqld

mysql_install_db --user=mysql

cd /usr ; /usr/bin/mysqld_safe &

/usr/bin/mysqladmin -u root password 'passtosql'

/usr/bin/mysqladmin -u root -h your_hostname password 'passtosql' -p

/usr/bin/mysql_secure_installation

Change the root password? [Y/n] n
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y


Remember about GD dependencies:

Should give no output: ldd /usr/lib/php/extensions/gd.so | grep "not found"

installpkg libXpm-3.5.7-i486-2.txz libX11-1.2.2-i486-1.txz libXau-1.0.4-i486-2.txz libXdmcp-1.0.2-i486-2.txz libxcb-1.3-i486-1.txz aspell-0.60.5-i486-2.txz gd-2.0.35-i486-3.txz t1lib-5.1.2-i486-1.txz 

Build mod_perl from:

http://slackbuilds.org/repository/13.0/network/mod_perl/
installpkg mod_perl-2.0.4-i486-2_SBo.tgz

Install cpan2tgz:

wget http://software.jaos.org/slackpacks/current/cpan2tgz-0.6.5-noarch-1.tgz
installpkg cpan2tgz-0.6.5-noarch-1.tgz

Build perl packages:

cpan2tgz Apache::DBI
cpan2tgz Net::IP
installpkg perl-apache-dbi-1.08-noarch-1.tgz perl-net-ip-1.25-noarch-1.tgz

Check /etc/httpd/httpd.conf - should have uncommented:

Include /etc/httpd/mod_php.conf
Include /etc/httpd/mod_perl.conf

/etc/httpd/php.ini - change for bigger files:

post_max_size = 50M 
upload_max_filesize = 50M

Uncompress archive and run setup:

tar -zxvf OCSNG_UNIX_SERVER-1.3.tar.gz
cd OCSNG_UNIX_SERVER-1.3/
/bin/bash ./setup.sh 

+----------------------------------------------------------+
|                                                          |
| Welcome to OCS Inventory NG Management server setup !    |
|                                                          |
+----------------------------------------------------------+

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)? 
Assuming Communication server 1.0 RC2 or previous is not installed
on this computer.

Starting OCS Inventory NG Management server setup from folder /home/borys/OCSNG_UNIX_SERVER-1.3
Storing log in file /home/borys/OCSNG_UNIX_SERVER-1.3/ocs_server_setup.log

+----------------------------------------------------------+
| Checking for database server properties...               |
+----------------------------------------------------------+

Your MySQL client seems to be part of MySQL version 5.0.
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/sbin/httpd] ? 
OK, using Apache daemon /usr/sbin/httpd ;-)


+----------------------------------------------------------+
| Checking for Apache main configuration file...           |
+----------------------------------------------------------+

Where is Apache main configuration file [/etc/httpd/httpd.conf] ? 
OK, using Apache main configuration file /etc/httpd/httpd.conf ;-)


+----------------------------------------------------------+
| Checking for Apache user account...                      |
+----------------------------------------------------------+

Which user account is running Apache web server [User] ?apache 
OK, Apache is running under user account apache ;-)


+----------------------------------------------------------+
| Checking for Apache group...                             |
+----------------------------------------------------------+

Which user group is running Apache web server [apache] ? 
OK, Apache is running under users group apache ;-)


+----------------------------------------------------------+
| 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 [] ?/etc/httpd/extra/ 
OK, Apache Include configuration directory /etc/httpd/extra/ 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...
*** Warning: PERL module SOAP::Lite is not installed !
This module is only required by OCS Inventory NG SOAP Web Service.

Do you wish to continue ([y]/n] ?y 
Checking for XML::Entities PERL module...
*** Warning: PERL module XML::Entities is not installed !
This module is only required by OCS Inventory NG SOAP Web Service.

Do you wish to continue ([y]/n] ?y 
+----------------------------------------------------------+
| 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.
Configuring logrotate for Communication server.
/home/borys/OCSNG_UNIX_SERVER-1.3
Removing old communication server logrotate file /etc/logrotate.d/ocsinventory-NG
Writing communication server logrotate to file /etc/logrotate.d/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) ? 
OK, using 'z-ocsinventory-server.conf' as Communication Server Apache configuration file
Removing old communication server configuration to file /etc/httpd/extra//ocsinventory.conf
Writing communication server configuration to file /etc/httpd/extra//z-ocsinventory-server.conf

+----------------------------------------------------------+
| OK, Communication server setup sucessfully finished ;-)  |
|                                                          |
| Please, review /etc/httpd/extra//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)? 
+----------------------------------------------------------+
| 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)? 
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] ? 
OK, using directory /usr/share/ocsinventory-reports to install static files ;-)

Where to create writable/cache directories for deployement packages and IPDiscover [/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/share/ocsinventory-reports/ocsreports.
Copying PHP files to /usr/share/ocsinventory-reports/ocsreports.
Fixing permissions on directory /usr/share/ocsinventory-reports/ocsreports.
Creating database configuration file /usr/share/ocsinventory-reports/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.
Configuring IPDISCOVER-UTIL Perl script.
Installing IPDISCOVER-UTIL Perl script.
Fixing permissions on IPDISCOVER-UTIL Perl script.
Writing Administration server configuration to file /etc/httpd/extra//ocsinventory-reports.conf

+----------------------------------------------------------+
| OK, Administration server installation finished ;-)      |
|                                                          |
| Please, review /etc/httpd/extra//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 /home/borys/OCSNG_UNIX_SERVER-1.3/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 ;-)

Check /etc/httpd/httpd.conf - should have uncommented:

Include /etc/httpd/extra/z-ocsinventory-server.conf 
Include /etc/httpd/extra/ocsinventory-reports.conf

/etc/httpd/extra/ocsinventory-reports.conf - comment this lines:

#####    php_value post_max_size         9m
#####    php_value upload_max_filesize   8m



/etc/rc.d/rc.httpd restart


Use WWW browser to: http://YOUR_SERVER/ocsreports/

Write Your Mysql Administrator User: root
Write Your Mysql Administrator Password: passtosql  (from top this article :)
Write Hostname: localhost

Use WWW browser to http://YOUR_SERVER/ocsreports/ and login in with “admin” as user and “admin” as password.

CHANGE PASSWORD NOW !


If all works do more security stuff. Change default password for user ocs to mysql:

mysql -u root -p # Use Your Mysql Administrator Password: passtosql  (from top this article :)
mysql> UPDATE mysql.user SET Password = PASSWORD('newocspass') WHERE User = 'ocs';
mysql> flush privileges;

/etc/httpd/extra/z-ocsinventory-server.conf - change to Your new ocs database password:

PerlSetVar OCS_DB_PWD newocspass

/usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php - change to Your new ocs database password:

$_SESSION["PSWD_BASE"]="newocspass";

More secure Permissions:

chmod 750 /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php
chmod 750 /etc/httpd/extra/ocsinventory-reports.conf 
chmod 750 /etc/httpd/extra/z-ocsinventory-server.conf
-rwxr-x--- 1 root root  2108 2010-02-17 15:20 /etc/httpd/extra/ocsinventory-reports.conf
-rwxr-x--- 1 root root 11116 2010-02-17 16:53 /etc/httpd/extra/z-ocsinventory-server.conf
-rwxr-x--- 1 root apache 118 2010-02-17 16:55 /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php

/etc/rc.d/rc.httpd restart


Use WWW browser to http://YOUR_SERVER/ocsreports/