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! 😉

Mounting Windows share in CentOS 7

Today i have to connect to Windows share from CentOS 7. This is how I done it:

then I have created directory in /mnt

after that:

That’s all 🙂

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:
https://www.centos.org/forums/viewtopic.php?f=49&t=47011&start=20
and
https://www.centos.org/forums/viewtopic.php?f=49&t=51302&sid=850e80707bfb3db598f2c5be00ae5e51&start=10

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

Google Chrome in CentOS 7

First we have to create entry in yum.repos.d

After that we need to enter following information into that file

Now we are ready to go 🙂

 

Adding Windows partition to grub menu after installing CentOS 7

After installing CentOS 7 on my laptop there was no entry pointing to Windows in the grub menu. Here is what i have done:

I have found entry:

So first i have created copy of old grub.cfg in /boot/grub2/grub.cfg like this:

and then i have done this:

After above operations I was able to enter my Windows OS 😉

CentOS 7 on HP Compaq 6710b and 16GB micro sd card

Yesterday i have installed CentOS 7 on my old HP Compaq 6710b laptop. I don’t wanted to remove my current OS (ubuntu) because I did’nt know if I find all software which i am using, so i decided to install it on 16GB micro sd card (!).

After install i have done this:

  1. add EPEL repo
  2. add RPMForge repo
  3. add NUX-Dextop repo (for remmina)
  4. add Google repo (for Google Chrome)
  5. add Adobe repo (for flashplayer)

After two days of working on it (Geany, GIMP, OpenVPN, Remmina) I must say that everything is working fine.

How-to upgrade ownCloud 7 to 8 on CentOS 6.x

Since php on CentOS 6.x is on version 5.3.x (that was on my machine) i have to add remi repository to my CentOS to do the upgrade of ownCloud server

After that i done this:

Now I was ready to upgrade my ownCloud server to 8.1.1.

Now I can enjoy ownCloud in the newest version. Cheers 🙂

CentOS 6.5 and OpenFire

Yesterday i have installed OpenFire on one of my CentOS servers. First I had to download it from here, and then install it via yum:

Because i had 64 bit version of CentOS I had to install also glibc.i686

After that i had to do some things in MySQL:

After that:

Ok, now we have to allow some ports on firewall:

And add those lines

After that we have to start the openfire service and make it run through server restart

OK, last thing is to go to your http://your.ip.address:9090 and install it 🙂

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!

[Edit]

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