OCSNG Server Setup on CentOS
OCSNG Server Setup on CentOS
Installing packages requird for OCS Inventory:
yum -y install mysql-server mysql httpd
echo “ServerName ocs-inventory:80″ >> /etc/httpd/conf/httpd.conf
service httpd restart
Creating data for OCS Inventory
mysql -u root -p
mysql>CREATE DATABASE ocsweb;
mysql>GRANT ALL PRIVILEGES ON ocsweb.* TO ocs@localhost IDENTIFIED BY ‘ocs’;
mysql>exit
Preparing PHP
yum -y install perl-XML-Simple perl-Compress-Zlib perl-DBI perl-DBD-MySQL perl-Apache-DBI perl-Net-IP perl-SOAP-Lite
yum -y install php-pecl-zip php-mysql php-devel zlib-devel php-pear php-gd gcc
pecl install zip
echo “;Add zip support” >> /etc/php.ini
echo “extension=zip.so” >> /etc/php.ini
service httpd restart
perl -MCPAN -e ‘install PERL::PACKAGE’
yum -y install mod_perl
Downloading OCS invetory:
cd /usr/local/src
wget http://nchc.dl.sourceforge.net/sourceforge/ocsinventory/OCSNG_LINUX_SERVER_1.01.tar.gz
tar zxvf OCSNG_LINUX_SERVER_1.01.tar.gz
cp -rf OCSNG_LINUX_SERVER_1.01.tar.gz /var/www/html/OCSNG
cd /var/www/html/OCSNG/ocsreports
touch dbconfig.inc.php
chmod 666 dbconfig.inc.php
cd /var/www/html/OCSNG
./setup.sh
Answer yes to all question.
It will install OCS Inventory in /var/www/html/OCSNG directory
Now restart your webserver.
service httpd restart
Go to http://your_server_ip/OCSNG/ocsreports
Enter your mysql username, password and hostname
If everything goes well, you should see a long list of steps the installer completed. If not, fix the problems and try again. If it succeeded, go ahead and click the submit query button at the very bottom of the page. You can now login to the web interface with username and password of both admin. You can change the default password at the top right-hand side of the browser window.






