Install Oracle Instant Client and PHP OCI8 module

If you want to connect to an Oracle database with PHP, you can use Oracle’s Instant Client and the oci8 module from pear.

Download the Basic and the SDK packages from oracle.com. At the time of this writing, the filenames are instantclient-basic.zip and instantclient-sdk.zip.

Unzip these files in a new directory, e.g. /opt/oracle/instantclient.

Code:

sudo su
mkdir -p /opt/oracle/instantclient
cd /opt/oracle/instantclient
unzip instantclient-basic.zip
unzip instantclient-sdk.zip
echo /opt/oracle/instantclient >> /etc/ld.so.conf
ldconfig

The previous two lines are supposed to create symlinks named libclntsh.so and libocci.so which we will need later. In my case these symlinks were not created by ldconfig, so I created them manually.

Code:

ln -s libclntsh.so.11.1 libclntsh.so
ln -s libocci.so.11.1 libocci.so

In the next step we will download the oci8 module with pear. Pear is in the php-pear package.

Code:

apt-get install php-pear

Also, you need php5-dev and build-essential packages for compiling oci8 module.

Code:

apt-get install php-pear php5-dev build-essential

“Normally” we should be able to just use pecl install oci8 now, but apparently pear is not able to figure out where the instantclient libraries are. So we will just download the oci8 module and build it on our own.

Code:

mkdir -p /usr/local/src
cd /usr/local/src
pecl download oci8
tar xzf oci8-1.3.4.tgz
cd oci8-1.3.4
phpize
./configure --with-oci8=shared,instantclient,/opt/oracle/instantclient
make
make install

The oci8-1.3.4.tgz filename will of course change for newer releases.

To enable the oci8 module in the php.ini (/etc/php5/apache2/php.ini and /etc/php5/cli/php.ini), add a line
Code:

extension=oci8.so

(put this line after the examples starting with ;extension).

Now stop and start Apache. You should see the oci8 module in the output of phpinfo().

Good luck

  • Share/Bookmark

Nested X11 environment session


Hi :)

Instead of using a full-blown new virtual X for developing software you can use Xephyr to embed your KDE 4 session into your working KDE 3 or other X11 environment.

If you want to get a minimal KDE session up and running, just launch Xephyr (available in Kubuntu as xserver-xephyr; Gentoo users compile x11-base/xorg-server with USE=”kdrive”):

Xephyr :1 -extension GLX &

You can now launch KDE:

export DISPLAY=:1
/path/to/kde4/bin/startkde &

For other X11 environment just change /path/to/kde4 like:

/usr/bin/startx &

or

/usr/bin/startkde &

or

/usr/bin/startxfce&

You can use “locate” command to find paths like:

locate startkde

Appendix
Happy Nowruz 1387 (Iranian new year holiday)

Good Luck

  • Share/Bookmark

Webmin, Installing on Ubuntu Gutsy Gibbon (7.10)

Webmin
Hi :)
I wrote post about Webmin in ITPencil. My Persian friend like it. I decide to write post about Webmin and how to installing it on Ubuntu Gutsy Gibbon (7.10).
It’s very good for newbie.

from webmin.com:

Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console or remotely.

Installing Webmin On Ubuntu Gutsy Gibbon (7.10)
Webmin has some dependency package.
Install dependencies:

sudo aptitude install bash perl libnet-ssleay-perl openssl \
libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl

After install dependencies, you can download and install Webmin. Last version of Webmin is 1.390.
Download Webmin:

sudo wget http://prdownloads.sourceforge.net/webadmin/webmin_1.390_all.deb

Install Webmin:

sudo dpkg -i webmin*.deb

Log in and use it:
Copy this URL into your web browser: https://localhost:10000
(more…)

  • Share/Bookmark

How to install gOS on Ubuntu Gutsy Gibbon

ubuntu-logo-small.png
Hi

I installed gOS on Ubuntu Gutsy Gibbon.
It’s nice but I prefer Gnome windows desktop environment.

gos_screenshot.jpg

If you want to install gOS , from terminal do the following (ONE LINE AT A TIME HITTING ENTER AFTER EACH STEP):

  • Adding gOS repositories
    echo "deb http://packages.thinkgos.com/gos/ painful main"\
     | sudo tee -a /etc/apt/sources.list
    
    echo "deb-src http://packages.thinkgos.com/gos/ painful main"\
     | sudo tee -a /etc/apt/sources.list
    

  • In the terminal enter the command to import the public key of the repository so that the signatures could be verified as follows :
    wget -q http://www.thinkgos.com/files/gos_repo_key.asc -O-\
     | sudo apt-key add -
    
  • Next update your apt cache database using the command :
    sudo apt-get update
    
  • To install the necessary files which will allow you to run gOS on Ubuntu, run the following apt-get command :
    sudo apt-get install greenos-desktop
    
  • If you do not have enlightenment (e17) window manager (WM), then apt-get will have to download and install that too which could hike your download size by around 35 MB.
    • Once installed, you can select gOS/Enlightenment from sessions option in your login screen.

      Good Luck

      • Share/Bookmark

How to Change GNOME default media player

gnome
Hi

For changing GNOME default media player, please follow steps:
1. Press Alt+F2, then enter gconf-editor to run:

gconf-editor

2. Go to /desktop/gnome/applications/media/

3. Change value of exec key to your media player name. like Exaile:

gconf-editor-media-player-exec

Good bye

  • Share/Bookmark