juin
24
2009
10

Google Earth on fedora 11 64 bit

Here the way I follow to install and make work Google Earth on Fedora 11 x86-64:

First download the linux version of Google Earth at : http://earth.google.fr/

open a terminal and become root:

su -
yum install google*

with an nvidia card you’ll need:

yum install xorg-x11-drv-nvidia-libs*.i586 (search with software install gui if it doesn't work)

and for ati card (thanks to space-hunter):

yum install xorg-x11-drv-catalyst-libs.i586

you’ll need these 32 bit libraries for Google to run quietly

yum install glibc-2.10.1-2.i686 libxml2.i586 freetype.i586 libXrender.i586 libXrandr.i586 mesa-libGL.i586 xorg-x11-drv-nvidia-libs.i586

Additions from Otto Mäkelä :

yum install libcanberra-gtk2.i586 bug-buddy.i586 PackageKit-gtk-module.i586

Then run :

sh GoogleEarthLinux.bin

it’s all…

Written by admin in: linux | Mots-clefs :, , , ,
juin
05
2009
4

Oracle backup export script (cron job)

Here is script that I’ve created to make a logical backup of the entire database every day

######################### START OF SCRIPT #########################

#!/bin/bash
#Backup script by Cédric Sougné.
ORACLE_BASE=/opt/oracle
ORACLE_HOME=$ORACLE_BASE/product/db10g
ORACLE_SID=<yoursid>
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export ORACLE_BASE ORACLE_HOME PATH ORACLE_SID

ADMIN_EMAIL= »<yourdbamail> »
LOGFILE=$ORACLE_BASE/admin/$ORACLE_SID/backup_logs/expdp-`date +%d%m%y%H%M%S`.log

EXPORT_PATH=/opt/oracle/export_backup
DMP_FILE= »expdp-`date + »%d%m%Y_%H%M%S »`.dmp »
LOG_FILE= »expdp-`date + »%d%m%Y_%H%M%S »`.log »

echo « Starting … » > $LOGFILE
expdp \’sys/<yousyspassword> as sysdba\’ FULL=y DIRECTORY=EXPORT_BACKUP_DIR DUMPFILE=$DMP_FILE LOGFILE=$LOG_FILE
#expdp mrmrs/mrmrs TABLES=resident,sejour DIRECTORY=EXPORT_BACKUP_DIR DUMPFILE=$DMP_FILE LOGFILE=$LOG_FILE
cat $EXPORT_PATH/$LOG_FILE >> $LOGFILE
echo « Backup Completed. » >> $LOGFILE

echo « gzipping … » >> $LOGFILE
gzip $EXPORT_PATH/$DMP_FILE >> $LOGFILE
echo « gzipping Completed. » >> $LOGFILE

echo « Deleting old files » >> $LOGFILE
find $EXPORT_PATH -type f -mtime +31 | xargs rm >> $LOGFILE
echo « Delete Completed » >> $LOGFILE

cat $LOGFILE | mail -s « expdp-`date + »%d%m%Y_%T »` » $ADMIN_EMAIL

######################### END OF SCRIPT #########################

here is for the cron tab:

00 22 * * * /opt/oracle/admin/acisora1/scripts/export_backup.sh >> /dev/null

the script will be executed avery at 10 pm

Written by admin in: bash, linux, oracle | Mots-clefs :, , , ,
juin
02
2009
4

Oracle from PHP on Centos 5

1) install apache, php …

yum install httpd php php-mysql php-pear php-devel zlib zlib-devel
yum groupinstall « Development Tools »

2) Download and install oracle instant client (basic and devel) from there:

http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html

rpm -Uvh oracle-instantclient-basic-<VERSION>.i386.rpm
rpm -Uvh oracle-instantclient-devel-<VERSION>.i386.rpm

3) Add the Oracle instant client to dynamic linker

echo /usr/include/oracle/<VERSION>/client/lib/ > /etc/ld.so.conf.d/oracle_client.conf
ldconfig -v

4) Untar the PECL package and prepare it for compiling

tar -xzvf oci-<VERSION>.tgz
cd oci-<VERSION>
phpize

5) Configure the PECL package as a shared object using the instant client and specifying where the Oracle client libraries are. Then build and install it.

./configure –with-oci8=shared,instantclient,/usr/lib/oracle/<VERSION>/client/lib
make
make install

6) Add the library shared object for PHP

echo extension=oci8.so > /etc/php.d/oci8.ini

7) Start Apache

’service httpd start’ _or_ ‘/etc/init.d/httpd restart’

8) Create a PHP info page and checked to see if the Oracle (oci8) driver is listed:

echo <? phpinfo(); ?> > /var/www/html/phpinfo.php

Written by admin in: linux, oracle, php | Mots-clefs :, , , ,