Apache UserDir in CentOS 7

Quick steps to set it up (I assume you have apache installed):

  1. login as root
  2. edit userdir.conf

  3. restart Apache
  4. setup your directory
    as normal user enter:
  5. if you use SELinux as root enter:
  6. create simple html page

    enter this:
  7. change ownership of file
  8. start your browser and enter this address:


    and voila! 😉

HP Proliant ML 110 G5, CentOS 7 and Smart Array P400

Recently i had to reinstall my old (but still working) server. I have bought Smart Array P400 instead of my old Smart Array E200, added new harddrives (WD Caviar Black 1TB x 2). And there was an issue regarding that on CentOS 7.x (RHEL 7.x) there is no more drivers for that controller. This was bad for me.

I have started to google the internet and have found a solution for this:

Solution was simple:

  1. Download drivers from here http://elrepo.org/people/akemi/testing/el7/isos/
  2. Add above driver for CentOS 7 during boot process
  3. Install CentOS 7

Continue reading

ClearOS OpenVPN routing problem

I have a two routers based on ClearOS. On both of them i have OpenVPN service running. One of them connects with no problem but on the second one a cannot ping any device/server/printer on “the other side”.

I executed route command and got this:

So i figured out that there is no route to the remote place. As root I executed this command:

And finally i could access servers from “the other side”. The problem was in router/server which was running openvpn service.

I have had to edit /etc/openvpn/clients.conf and /etc/openvpn/clients-tcp.conf files and add this line at the end of both files:

After restarting the OpenVPN service on the server and connecting to the remote place via openvpn command everything goes right

The route command gave me this output:

which was good and everything was working as it was planned.

CentOS 6.x and Microsoft SQL Server ODBC Linux driver

Some days ago in my company someone asked me if we can access to our ERP software which is using Microsoft SQL Server. They want to get data to program which is writing by me using PHP and MySQL. I started to googling the net but I only found that Microsoft is providing drivers for ODBC connection. Those drivers can be found here.

Here is what i have done: (I assume that you have LAMP server setup on your CentOS 6.x)

Next step was to download proper driver: For CentOS 5.x

For CentOS 6.x

Next I have to untar it

and then build it

After that:

And the last

Now I have to setup ODBC, so we have to edit /etc/odbc.ini file and setup proper DSNName values

To test it I have to use the isql command

I have seen something like this below

OK, now it’s time to test PHP connection – because this is what my cooworkers wanted. So let’s wrote some PHP code:

I save it under odbctest.php file. Now it’s time to test it in the linux terminal:

I have seen something like:

Which was good. Now it’s time to test it under Apache, so a I copied this odbctest.php file under /var/www/html

After that i run

the download seems not working. The problem was in selinux permissions. If I do

then wget command will work and my webpage was accessible – until next reboot. Another way was to change the semanage context

Now after reboot it was working 🙂

Important information!

In CentOS 7 all steps will work until →# php odbctest.php. The problem is that Microsoft does’nt provide driver for RHEL/CentOS 7 branch. It only works with PHP up to 5.4 🙁

CentOS 6.x Apache, MySQL and PHP Installation

Installing LAMP (Linux, Apache, MySQL, PHP) is very easy on CentOS 6.x. You should only do something like:

Don’t forget to open port 80 in /etc/sysconfig/iptables by adding

That’s all folks!


I forgot to write one thing – you have to start & enable httpd service to start during restarts 😉

CentOS 7 EPEL and RepoForge repositories

Steps to add EPEL and RepoForge repositories to CentOS 7

That’s all 🙂

Installing SARG on ClearOS 6.x

Today i have successfully installed and configured SARG on my work ClearOS 6.x based router. Main goal was to get better reports from existing data.

What we need is:

  1. Installing WGET
  2. Installing RPMForge repo

    Now we have to disable rpmforge repo to avoid conflicts between different software (for example during yum update process). You have to edit /etc/yum.repos.d/rpmforge.repo and change enabled=1 to 0 (zero).
  3. Installing SARG
  4. Configuring SARG
    You can edit /etc/sarg/sarg.conf to modify any variables you want. Also we have to fix problem with subdirectories
  5. Testing SARG – generate one-shoot report
  6. Access SARG reports from your IP
    To see reports generated by SARG you have to edit “/etc/httpd/conf.d/sarg.conf” and the line “# Allow from your-workstation.com” to the IP of your workstation. You can add as many IP as you want. After that it is required to restart webserver
  7. Testing SARG scripts

    There should be no information after running those scripts
  8. The end
    If feverything goes ok, you should visit http://you-server-ip/sarg/ to see reports generated by SARG 🙂

ps. Thanks Tony Ellis from clearfundation forum for tips how to do it right.

cmd.fm not working under ubuntu chromium

After reinstalling my laptopt to Ubuntu 12.04 cmd.fm – site which is using SoundCloud to play music stop working under chromium, but under Firefox it was…

After some searching in the internet i have found that the problem could be in chromium codecs. Typing:

solved the problem.