4. Apache, MySQL and packages installation

4.1 Install Apache and prerequisites

First, install Apache:

apt-get install apache2 -y

then install Apache packages:

apt-get install -y php5-common libapache2-mod-php5 php-pear php5-cli php5-ldap libxml-simple-perl libio-compress-perl libdbi-perl libdbd-mysql-perl libapache-dbi-perl libnet-ip-perl libsoap-lite-perl libarchive-zip-perl libphp-pclzip php5-gd php5-curl php-soap libsoap-lite-perl

configure modules with CPAN:

cpan -i XML::Entities

Now, restart Apache:

service apache2 restart

and check if it works. Navigate to either IP Address or Hostname/FQDN if you have DNS Service on some local server:

http://ocsng_ip/

You should get something like below:

Next, we need to install MySQL server and php-myslql mod:

apt-get install -y mysql-server php5-mysql

Provide Root Password for Database

Now, lets add phpMyAdmin

apt-get install -y phpmyadmin

Select Apache as web server, press Yes to configure db for phpMyAdmin with dbconfig-common, provide Root Password from previous step

Create symbolic link to phpMyAdmin .conf for Apache in Apache sites-enabled and restart it:

ln -s /etc/phpmyadmin/apache.conf /etc/apache2/sites-enabled/phpmyadmin.conf
service apache2 restart 

and try to browse address: http://ocsng_ip/phpmyadmin

VOILA!

First success!

If we are on this page let’s create a DB and user for OCS server!

4.2 Configure OCS Database and user

Remember the “Generate Passwords” part of Preparations, right?

Login to your DB with Root login and Password set earlier.

Now, navigate to „Users” and click „Add User

In the new form fill in User Name and Password. I simply pressed Generate, check the field to create a DB with the same name and grand all privileges to it:

BIG IF HERE: If you would like to use this user to connect from other hosts to this DB (for example GLPI server) do not change Host field to localhost!

Otherwise, continue:

Let’s sum up what we have so far:

  • We have working linux
  • Working Apache
  • Working phpMyAdmin
  • Installed all necessary packages and mods

Let’s finally install that OCS NG Server!

Loading