Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 5

---------> Install EPEL ---------> Install Mysql, PHP , Perl Modules yum install make mysql-server mod_perl mod_php

php-mysql perl-XML-Simple perl-Co mpress-Zlib perl-DBI perl-DBD-MySQL perl-Apache-DBI perl-Net-IP perl-SOAP-Lite perl-XML-Entities ---------> For PHP Zip Support yum install php-pecl-zip yum install php-common ---------> install GD support for PHP. yum install php-gd yum install httpd yum install php-mbstring ---------> Start Mysql Service Service mysqld start /usr/bin/mysql_secure_installation or Setting a root password on mysql: /usr/bin/mysqladmin -u root password 'yourpassword' NOTE: Ensure MySQL InnoDB engine is activated on your database server. Open my.c nf and ensure there is no line skip-innodb or this line is commented (begins with . ---------> Creating a MySQL database: First, we need to open mysql shell: mysql -u root -p Then create the database named ocsweb, and grant permissions to user ocs, with p assword ocs: CREATE DATABASE ocsweb; GRANT ALL ON ocsweb.* to 'ocs'@'localhost' identified by 'ocs'; If you want, you can change these parameters (database name, username or passwor d). This is the default of ocs.

# )

---------> Configure PHP Edit the /etc/php.ini file, and change the following lines: vi /etc/php.ini

post_max_size = 200M upload_max_filesize = 200M Restart Apache: /etc/init.d/httpd restart

---------> installation tar xvzf OCSNG_UNIX_SERVER-2.0.x.tar.gz cd OCSNG_UNIX_SERVER-2.0.x sh setup.sh ---------> Note: Installer writes a log file ocs_server_setup.log in the same dire ctory. If you encounter any error, please refer to this log for detailed error m essag ---------> Configure Communication server PERL module. * Build Communication server PERL module. * Install Communication server PERL module into PERL standard library directorie s. * Create Communication server log directory (/var/log/ocsinventory-NG by default ). * Configure daily log rotation for Communication server (file /etc/logrotate.d/o csinventory-NG by default) * Create Apache configuration file (ocsinventory.conf). If you are using * Apach e configuration directory, this file will be copied under this directory. Otherw ise, you will be prompted to add content of this file to the end of Apache main configuration file.

________________________________________________________________________

Installing MySQL Server We need to install it (if it's not already installed): yum install mysql-server php-mysql php-pecl-zip php-gd Starting MySQL: /etc/init.d/mysqld start chkconfig --level 35 mysqld on

yum install -y perl-Net-IP perl-XML-Entities perl-Apache-DBI perl-Apache2-SO AP perl-SOAP-Lite mod_perl

2 Installing OCS Inventory NG Server 2 First, we need to download the tarball from OCS Inventory website. Click here. mkdir /download cd /download wget http://launchpad.net/ocsinventory-server/stable-2.0/2.0rc1/+download/OCSNG_ UNIX_SERVER-2.0rc1.tar.gz Initiate the installer: tar -zxvf OCSNG_UNIX_SERVER-2.0rc1.tar.gz cd /download/OCSNG_UNIX_SERVER-2.0rc1 sh setup.sh The install script is very simple, it's a wizard. Almost all the options, we'll select the default option. These are the questions: If you leave the question in blank, it will select the default option. Do you wish to continue ([y]/n)?y 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] ?localhost On which port is running database server [3306] ? 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)?y Where to put Communication server log directory [/var/log/ocsinventory-server] ? 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 rp m Do you wish to continue (y/[n])? y

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 Do you wish to setup Administration Server (Web Administration Console) on this computer ([y]/n)?y 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 Where to copy Administration Server static files for PHP Web Console [/usr/share/ocsinventory-reports] ? Where to create writable/cache directories for deployement packages, IPDiscover and SNMP [/var/lib/ocsinventory-reports] ? Configuring OCS Inventory NG Server Now, point your browser to ocsreports interface, to manage the server with the a dministration tool: http://server-ip/ocsreports/ The default user is "admin" and password is "admin". Finally, we must delete the install script: rm -f /usr/share/ocsinventory-reports/ocsreports/install.php

admin savitoj@123 SQL sql@123

SET PASSWORD FOR 'ocs'@'localhost' = PASSWORD('ocs');

You might also like