Configure at least the Apache ServerName directive and start the httpd service.

# vim /etc/httpd/conf/httpd.conf

ServerName: ocs-inventory:80

# service httpd start; chkconfig httpd on

# service mysqld start; chkconfig mysqld on

Perl and PHP Setup

Next, install some needed Perl module packages from the RPMForge repo.

# yum install perl-XML-Simple perl-Compress-Zlib perl-DBI perl-DBD-MySQL perl-Apache-DBI perl-Net-IP perl-SOAP-Lite

Next, install some PHP requirements and dependencies for the OCS admin console.

# yum install php-pecl-zip php-mysql php-devel zlib-devel php-pear php-gd gcc

# yum install perl-Apache-DBI

Firtly check and install gc ( yum install gc)

Secondly check and install make ( yum install make)

Third install cpan ( yum install perl-CPAN)

Finally install perl-Apache-DBI ( perl -MCPAN -e ‘install Apache::DBI’ )

# yum install YAML

After you get the packages installed, you’ll need to add zip support to your PHP installation. This requires adding a line to the configuration file.

# pecl install zip

# vim /etc/php.ini

;Add zip support

Restart apache for the changes to take effect.

# service httpd restart

Start Service Iptables add ports 80 for Apache & 3306 for MySql

service iptables start

iptables -I INPUT -m multiport -ptcp –dport 80,3306 -j ACCEPT

service iptables save

service iptables restart

Start Service Apace & MySql

# service httpd start && service mysqld start

Login to mysql

# mysql -u root -p

# create database ocsweb;

# grant all privileges on ocsweb.* to ocs@localhost identified by “Password”;

# exit

# mysql -u root -prootsecret

# mysql UPDATE mysql.user SET Password = PASSWORD(‘Passw0rd’) WHERE User = ‘ocs’;


mysql exit

Download OCS SERVER for Linux

# wget

# tar zxvf OCSNG_UNIX_SERVER-2.1.tar.gz


# sh

# mysql -u root -p

# mysql CREATE USER ‘ocs’@’%’ IDENTIFIED BY ‘Password’;

# mysql GRANT ALL PRIVILEGES ON `ocs`.* TO ‘ocs’@’%’;


# exit

After installation restart apache

# service httpd restart

# setenforce 0

# mysql -u root -p

# mysql> set global net_buffer_length=1000000;

Query OK, 0 rows affected (0.00 sec)

# mysql> set global max_allowed_packet=20480;

Query OK, 0 rows affected (0.00 sec)

SHOW VARIABLES LIKE ‘max_allowed_packet’

# chown -R root:root ocsreports


# chown -R apache:apache ocsreports

# chmod gou+rx ocsreports ocsreports/css ocsreports/files ocsreports/image


chmod 775 /usr/share/ocsinventory-reports/ocsreports

# chmod 775 /usr/share/ocsinventory-reports/ocsreports/


MySQL Login ocs

mySQLpassword Password

DatabaseName ocsweb

Mysql HostName localhost

rm /usr/share/ocsinventory-reports/ocsreports/install.php


user admin

password admin


Click to rate this post!
[Total: 0 Average: 0]