Aupatxo bueno ba debian-en eta gero archlinux-en inbizandoten oracle klientie instala baie edozein gnu/linux distribuziñuentzako balidxo dauela pentsaten dot:
- 1.- yaourt instala:
Edite: /etc/pacman.d/mirrorlist eta hurrengo textue sartun
x86-ntzako[archlinuxfr] Server = http://repo.archlinux.fr/i686
x86_64-ntzako
[archlinuxfr] Server = http://repo.archlinux.fr/x86_64
eta gorde, oin:
$ su # pacman -Syy # pacman -S yaourt # exit
- 2.- libaio instala:
$ yaourt -S libaio
- 3.- Oracle-n erregistre:
https://profile.oracle.com/jsp/reg/createUser.jsp?src=135736&act=74 - 4.- Oracle instantclient web orridxen aukeratu ordenadoran arkitekturie, adibidez nire kasuen: Linux x86_64 baie bidxetara imingot :)
http://www.oracle.com/technology/software/tech/oci/instantclient/index.html - 5.- x86:
http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.htmlPaketiek baja bier dizenak:
– Instant Client Package – Basic (ZIP)
– *Instant Client Package – SQL*Plus (ZIP)
– *Instant Client Package – SDK (ZIP)http://download.oracle.com/otn/linux/instantclient/112010/instantclient-basic-linux32-11.2.0.1.zip
http://download.oracle.com/otn/linux/instantclient/112010/instantclient-sqlplus-linux32-11.2.0.1.zip
http://download.oracle.com/otn/linux/instantclient/112010/instantclient-sdk-linux32-11.2.0.1.zip
Eta adibidez /tmp karpetara mobidu:
$ mv *.zip /tmp $ cd /tmp $ unzip instantclient-basic-linux32-11.2.0.1.zip $ unzip instantclient-sqlplus-linux32-11.2.0.1.zip $ unzip instantclient-sdk-linux32-11.2.0.1.zip
- 6.- x86_64:
http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxx86_64soft.htmlPaketiek baja bier dizenak:
– Instant Client Package – Basic (ZIP)
– *Instant Client Package – SQL*Plus (ZIP)
– *Instant Client Package – SDK (ZIP)Eta adibidez /tmp karpetara mobidu:
$ mv *.zip /tmp $ cd /tmp $ unzip oracle-instantclient11.2-basic-11.2.0.1.0-1.x86_64.zip $ unzip oracle-instantclient11.2-sqlplus-11.2.0.1.0-1.x86_64.zip $ unzip oracle-instantclient11.2-sdk-11.2.0.1.0-1.x86_64.zip
- Hametik aurrera in bidizen gauzek bardiñek diez:
- 7.- PATH batzuk sartun bidiez:
/root/.bashrcexport TNS_ADMIN=/opt/instantclient_11_2 export SQLPATH=instantclient_11_2 export LD_LIBRARY_PATH=/opt/instantclient_11_2:$LD_LIBRARY_PATH export PATH=$PATH:$SQLPATH
- 8.- artxibuek /opt-ra mobidu
$ su # mv instantclient_11_2/ /opt/ # cd /opt/instantclient_11_2/ # mv libclntsh.so.11.1 libclntsh.so # ln -s libclntsh.so libclntsh.so.11.1
Zeitzik eitzen’du gau?
checking Oracle Instant Client version... configure: error: Link from /opt/instantclient_11_2/libclntsh.so to libclntsh.so.11.1 not found ERROR: `/tmp/pear/temp/oci8/configure --with-oci8=instantclient,/opt/instantclient_11_2' failed
Hau errorie kentzieko
- 9.- Oin paketiek instala apache, php, pear: archlinux:
# pacman -S apache php php-pear php-apache
debian gnu/linux:
# apt-get install php-pear php5-dev apache2.2-common libapache2-mod-php5 php5
- 10.- oci8.so instala pear-etik:
# pecl install oci8
Please provide the path to the ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib' if you're compiling with Oracle Instant Client [autodetect] :
instantclient,/opt/instantclient_11_2
sartun :)
You should add "extension=oci8.so" to php.ini
archlinux:
# echo 'extension=oci8.so' >> /etc/php/php.ini # /etc/rc.d/httpd restart
debian gnu/linux:
# echo 'extension=oci8.so' >> /etc/php5/apache2/php.ini # echo 'extension=oci8.so' >> /etc/php5/cli/php.ini # echo 'extension=oci8.so' >> /etc/php5/cgi/php.ini # /etc/init.d/apache restart
- 11.- tnsnames.ora /opt/instantclient_11_2 -n imiñi:
Bakarrik falta dasku: tnsnames.ora /opt/instantclient_11_2 -ra kopidxetie:# cp tnsnames.ora /opt/instantclient_11_2/tnsnames.ora
tnsnames.ora adibidie:
MAKINIEN_IZENA.DOMINIUE.COM = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.10)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = ORCL) ) ) ...
Aldatu datuek zeuon gustora :)
Bueno ba hau da dana, okin kontutan $ komanduek usuaidxo normalagaz eitzen dizela eta # root moduen :)
Edit: libaio instalatie imintzie ahaztu izan dast, parkatu :(
One thought on “php + oci8 Oracle bezero (kliente) moduen imintzeko gnu/linux-en”