Tuesday, May 20, 2014

Apache + PHP + Oracle + Linux

It is good to be back. I hope I can be more consistent. Most of my days work centers on the subject of this post.

PHP, Apache, Linux and Oracle. MySQL is the database is use for most of the projects I undertake mainly due to ease of use and also the scale of the projects.

In this post I will be talking about adding Oracle to the list of supported database on  PHP. The operating system on which the setup was done is Open Suse 11 64 bit.

The steps are are follows.

Download instantclient-basic-linux.x64-12.1.0.1.0-1.x86_64.rpm or rpm version and instantclient-sdk-linux.x64-12.1.0.1.0-1.x86_64.rpm header files from www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html

Install the rpms.

rpm -ivh instantclient-basic-linux.x64-12.1.0.1.0-1.x86_64.rpm
rpm -ivh instantclient-sdk-linux.x64-12.1.0.1.0-1.x86_64.rpm

The first RPM puts Oracle libraries in /usr/lib/oracle/12.1/client64/lib and the second creates headers in /usr/include/oracle/12.1/client64.

Install header files for php and install gcc

yum install php-devel
yum install gcc

Now install Oracle OCI8 extensions

pecl install oci8

Add the Instant Client directory to apache2 under /etc/sysconfig

cd /etc/sysconfig
vi apache2
add export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib

Restart apache

service apache2 restart

Verify oci8 extention by creating a php file containing the function below

phpinfo();

Tuesday, April 2, 2013

Redhat Enterprise Linux Registration

Its good to be back! I cant remember the last time I wrote anything.

I am a fun of rpm based systems, fedora is my OS of choice. Recently the company i work for purchased a licensed copy of Redhat enterprise linux and my task was to install and ensure that, the latest patches and updates where applied.

The installation was normal if you have installed fedora before, however the update process has completely changed. The normal yum update command yielded no responses. A few googling around enlighten me thus the birth of this post.

Note the procedure below was tested on Redhat enterprise linux 6 and the registration process was command line.

First register you installation with Redhat. One needs to have a customer account with Redhat. It is acquired by purchasing the product from your nearest vendor.

1. subscription-manager register

The above command registers you installation after a correct user name and password have been supplied.

The Next step is to subscript to updates.

2. rhn_register

The above will pup up a wizard which will guide you through the installation. Again one needs to provide a valid user name and password.

Finally execute the update command.

3. yum update

That is all it takes to subscribe to redhat updates through the command line.

Note: one can start from step two and it will still work.

Done!

Sunday, January 2, 2011

How to install fonts in GNOME

Fonts have become and integral part of every system that displays text. For this reason one of the things I do when customizing GNOME is to install my favourite fonts.

Most often I switch to KDE only to install fonts for GNOME via Font Installer.

However this is totally not necessary. These steps should help you install  fonts in GNOME with no effort.

1. Log in to the account where you need the fonts installed.

2. Under your home directory create a hidden folder named fonts.

     i. cd ~

      ii. mkdir .fonts

3. Copy the true type fonts (TTF) you wish to install into this folder.

    i. cp -R ~/myttf/* ~/.fonts.
 
4. Refresh your profile. I prefer a log off.

In order to verify if the fonts are installed, open Open Office Writer and click on the fonts drop down in the format toolbar to see if your newly installed font is in the list.

That's it folks.