Oracle linux remi repo

Remi’s RPM repository — Blog

As the question is raised quite often, here is my installation notes.

1. Context

2 extensions exist allowing access to Oracle databases from PHP:

To use these extensions, you need to have the client library available.

It exists various ways to install this library, including using RPM, but it is not possible to properly handle the dependencies of the packages providing the extensions, so installation often results in an unusable configuration.

$ php -v PHP Warning: PHP Startup: Unable to load dynamic library 'oci8' (tried: /usr/lib64/php/modules/oci8 (/usr/lib64/php/modules/oci8: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/oci8.so (libclntsh.so.21.1: cannot open shared object file: No such file or directory)) in Unknown on line 0

2. PHP and extension installation

For proper installation of PHP, simply follow the configuration wizard instructions.

Then you can install the Oracle extension

3. Client version

To know which version of the library is required, see the package description

$ yum info php-oci8 . : The extension is linked with Oracle client libraries 21.1 : (Oracle Instant Client). For details, see Oracle's note : "Oracle Client / Server Interoperability Support" (ID 207303.1). : : You must install libclntsh.so.21.1 to use this package, provided : in the database installation, or in the free Oracle Instant Client : available from Oracle. .

For now, you need version 21.1 which allows to connect to databases version 11.2 and later.

4. RPM usage

The simple way is to install the library RPM provided by Oracle

Currently, you need the oracle-instantclient-basic-21.1.0.0.0-1.x86_64.rpm package

If not already present, you also need to install the libnsl package (dependency is not handled by the package)

This is enough and you can verify using:

$ php --ri oci8 oci8 OCI8 Support => enabled OCI8 DTrace Support => enabled OCI8 Version => 2.2.0 Oracle Run-time Client Library Version => 21.1.0.0.0 Oracle Compile-time Instant Client Version => 21.1

5. Manual installation

In a more complex case, e.g. if another version of the server is already installed on the same computer, or if you prefer to use an already installed library, you have to configure the library search path.

Читайте также:  Copy all directory contents linux

Example, installation of instantclient-basic-linux.x64-21.1.0.0.0.zip in /opt

# mkdir /opt/oracle; cd /opt/oracle # unzip /tmp/instantclient-basic-linux.x64-21.1.0.0.0.zip

5.1 Settings default path

If you have a single version of the library in the system, the simplest way is to add the directory to the linker default search path, which will be used by all users and all services

# echo "/opt/oracle/instantclient_21_1" >/etc/ld.so.conf.d/oracle.conf # ldconfig

5.2 User specific path

If you prefer to set the path for each user (the more complex case)

$ export LD_LIBRARY_PATH=/opt/oracle/instantclient_21_1

For web servers, httpd (if you are still using mod_php) or php-fpm, you have to change the environment of the service by overriding the unit file

[Service] Environment=LD_LIBRARY_PATH=/opt/oracle/instantclient_21_1

You may also need to set, in FPM pool configuration:

6. Other

6.1 tnsnames.ora

If you still use this file for SID configuration (optional using EasyConnect), you have to add its path to httpd or php-fpm environment

[Service] Environment=TNS_ADMIN=/path/to/network/admin

6.2 SELinux

When database access use the network, you have to explicitly allow it

# setsebool -P httpd_can_network_connect on

6.3 Web server

As for any new extension installation, don’t forget to restart the web server (httpd) or the FPM service (php-fpm).

7. Conclusion

For memory, I start building my PHP packages more than 15 years ago especially to have these extensions.

Their installation has never been easy, particularly because of the impossibility to properly manage the dependencies or to provide my own packages because of the Oracle’s Licence.

With these installations notes, I hope this will be simpler, and clearer.

During PHP update, remind to check if the required library version has not changed.

Commentaires

These installation notes are for Fedora and RHEL / CentOS >= 7 (systemd)

For RHEL / CentOS 6, as version 19.x requires glibc 2.14, library used version is

The path configuration is mandatory, even using the RPM. For the web server, it must be added in the /etc/sysconfig/http file.

2. Le mercredi 28 avril 2021, 14:00 par Remi

Version 21.1 is now used by recent PHP builds, it allow to connect to Oracle Database 12.1 or later (11.2 works but is not officially supported)

Licence information

  • This site content is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
  • Le contenu de ce site est mis à disposition selon les termes de la Licence Creative Commons Attribution — Partage dans les Mêmes Conditions 4.0 International.

Peace message

Informations

Statistiques de téléchargement Download counter

  • RPM : 1101475477
  • Date : lundi 17 juillet 2023 — 08:55

Источник

Remi’s RPM repository

Next year Web hosting budget, until July 2024:

Overflow will be used to buy and extend the new builder (Intel i9-9900K based). Thank you for your support.

Information

Forum

Blog / Social network

Also @RemiRepository on Twitter
and #remirepo IRC channel on Libera.chat

Читайте также:  Как сделать установку linux

Download mirrors — Full content

  • AM: http://remi.mirrors.arminco.com/ — full mirror (Armenia, IPv4, IPv6)
  • AT: http://mirror.digitalnova.at/remi/ — full mirror (Austria, IPv4)
  • AU: http://remi.conetix.com.au/ — full mirror (Australia, IPv4)
  • AU: https://remi.mirror.digitalpacific.com.au/ — full mirror (Australia, IPv4, IPv6, rsync, https)
  • AZ: http://mirror.yer.az/remi/ — full mirror (Azerbaijan, IPv4)
  • BE: http://remi.mirrors.cu.be/ — full mirror (Belgium, IPv4, IPv6)
  • BD: http://mirror.xeonbd.com/remi/ — full mirror (Bangladesh, IPv4)
  • BG: http://mirrors.neterra.net/remi/ — full mirror (Bulgaria, IPv4, IPv6, rsync)
  • BG: http://mirrors.netix.net/remi/ — full mirror (Bulgaria, IPv4, IPv6)
  • BG: https://mirrors.uni-ruse.bg/remi/ — full mirror (Bulgaria, IPv4, IPv6, rsync, https)
  • CN: https://mirrors.tuna.tsinghua.edu.cn/remi/ — full mirror (China, IPv4, IPv6, rsync, https)
  • CO: http://mirror.upb.edu.co/remi/ — full mirror (Colombia, IPv4, IPv6)
  • CZ: https://remi.mirror.karneval.cz/ — full mirror (Czech Republic, IPv4, IPv6, rsync, https)
  • CZ: https://merlin.fit.vutbr.cz/mirrors/remi/ — full mirror (Czech Republic, IPv4, IPv6, https)
  • DE: https://mirror.23m.com/remi/ — full mirror (Germany, IPv4, IPv6, rsync, https)
  • DE: http://remi.schlundtech.de/ — full mirror (Germany, IPv4, IPv6)
  • DE: https://mirror.dogado.de/remi/ — full mirror (Germany, IPv4)
  • DK: https://mirror.netsite.dk/remi/ — full mirror (Denmark, IPv4, https)
  • DK: https://mirror.dk.team.blue/remi/ — full mirror (Denmark, IPv4, https)
  • EC: http://mirror.cedia.org.ec/remi/ — full mirror (Ecuador, IPv4, IPv6, rsync)
  • EC: http://mirror.uta.edu.ec/remi/ — full mirror (Ecuador, IPv4, rsync)
  • FR: https://remi.mirror.ate.info/ — full mirror (France, IPv4, IPv6, rsync, https)
  • FR: https://mir01.syntis.net/remirepo/ — full mirror (France, IPv4, rsync, https)
  • FR: http://remirepo.reloumirrors.net/ — full mirror (France, IPv4, IPv6, rsync)
  • HK: http://mirror.innosol.asia/remi/ — full mirror (Hong Kong, IPv4)
  • ID: https://mirror.telkomuniversity.ac.id/remi/ — full mirror (Indonesia, IPv4, https)
  • IL: https://remi.mivzakim.net/ — full mirror (Israel, IPv4, https)
  • IN: https://repo.extreme-ix.org/remi/ — full mirror (India, IPv4, https)
  • JP: http://ftp.riken.jp/Linux/remi/ — full mirror (Japan, IPv4)
  • KZ: http://mirror.neolabs.kz/remi/ — full mirror (Kazakhstan, IPv4, rsync)
  • KZ: http://mirror.hoster.kz/remi/ — full mirror (Kazakhstan, IPv4)
  • MA: https://mirror.marwan.ma/remi/ — full mirror (Morocco, IPv4, IPv6, https)
  • MD: https://mirror.ihost.md/remi/ — full mirror (Moldova, IPv4, https)
  • MD: https://mirror.mangohost.net/remi/ — full mirror (Moldova, IPv4, https)
  • NL: https://mirror.oxilion.nl/remi/ — full mirror (Netherlands, IPv4, IPv6, rsync, https)
  • NL: https://remi.mirror.wearetriple.com/ — full mirror (Netherlands, IPv4, IPv6, https)
  • NL: https://mirror.serverion.com/remi/ — full mirror (Netherlands, IPv4, https, rsync)
  • NL: https://remi.mirror.liteserver.nl/ — full mirror (Netherlands, IPv4, IPv6, https, rsync)
  • NO: https://cdn.centos.no/remi/ (worldwide) and https://mirror.centos.no/remi/ (Norway) — full mirror (Norway, IPv4, IPv6, https, rsync)
  • PR: https://mirrors.upr.edu/remi/ — full mirror (Puerto Rico, IPv4, IPv6, https, rsync)
  • PT: https://mirrors.ptisp.pt/remi/ — full mirror (Portugal, IPv4, IPv6, https)
  • RO: https://mirrors.chroot.ro/remi/ — full mirror (Roumania, IPv4, IPv6, https)
  • RU: http://mirror.reconn.ru/remi/ — full mirror (Russia , IPv4, IPv6, rsync)
  • RU: https://mirror.docker.ru/remi/ — full mirror (Russia , IPv4, https)
  • SI: http://ftp.arnes.si/mirrors/remi/ — full mirror (Slovenia , IPv4, IPv6, rsync)
  • TH: http://mirrors.thzhost.com/remi/ — full mirror (Thailand , IPv4, IPv6, rsync)
  • TR: http://mirror.veriteknik.net.tr/remi/ — full mirror (Turkey , IPv4, IPv6, rsync)
  • UA: http://mirrors.bytes.ua/remi/ — full mirror (Ukraine , IPv4)
  • UK: http://mirrors.ukfast.co.uk/sites/remi/ — full mirror (United Kingdom, IPv4, IPv6, https, rsync)
  • UK: https://mirror.netweaver.uk/remi/ — full mirror (United Kingdom, IPv4, IPv6, https)
  • US: https://mirror.sjc02.svwh.net/remi/ — full mirror (California, USA, IPv4, IPv6, https, rsync)
  • US: https://mirror.usi.edu/pub/remi/ — full mirror (Indiana, USA, IPv4, IPv6, https, rsync)
  • US: https://mirror.pit.teraswitch.com/remi/ — full mirror (Pennsylvania, USA, IPv4, IPv6, https, rsync)
  • US: http://repo1.dal.innoscale.net/remi/ — full mirror (Texas, USA, IPv4, IPv6, rsync)
  • US: http://repo1.ash.innoscale.net/remi/ — full mirror (Virginia, USA, IPv4, IPv6, rsync)
  • US: http://repo1.sea.innoscale.net/remi/ — full mirror (Washington, USA, IPv4, IPv6, rsync)
  • US: https://mirror.team-cymru.com/remi/ — full mirror (Illinois, USA, IPv4, IPv6, https, rsync)
Читайте также:  Linux исправление ошибок жестких дисков

Mirrors’ location

Primary mirror

  • https://rpms.remirepo.net/ — primary (IPv4, IPv6, https)
    Limited bandwidth, please avoid using it 😉

Download mirrors — Partial content

  • FR: http://fr2.rpmfind.net/linux/remi/ — full mirror without repoview (France, IPv4, rsync)
  • RU: http://mirror.awanti.com/remi/ — enterprise only mirror (Russia, IPv4)

Distribution choice — Repository content

Maintained Enterprise Linux (RHEL / CentOS / Alma / Rocky / Other clones)

  • Enterprise Linux 9 — repository auto-configuration package : remi-release-9.rpm
  • Enterprise Linux 8 — repository auto-configuration package : remi-release-8.rpm
  • Enterprise Linux 7 — repository auto-configuration package : remi-release-7.rpm

Fedora — Maintained version

  • Fedora 38 — repository auto-configuration package : remi-release-38.rpm
  • Fedora 37 — repository auto-configuration package : remi-release-37.rpm
  • Fedora 36 — repository auto-configuration package : remi-release-36.rpm

EOL Enterprise Linux — No more package update — Upgrade strongly recommended

EOL Fedora — No more package update — Upgrade is mandatory

  • Fedora 35
  • Fedora 34
  • Fedora 33
  • Fedora 32
  • Fedora 31
  • Fedora 30
  • Fedora 29
  • Fedora 28
  • Fedora 27
  • Fedora 26
  • Fedora 25
  • Fedora 24
  • Fedora 23
  • Fedora 22
  • Fedora 21
  • Fedora 20 (Heisenbug)
  • Fedora 19 (Schrödinger’s Cat)
  • Fedora 18 (Spherical Cow)
  • Fedora 17 (Beefy Miracle)
  • Fedora 16 (Verne)
  • Fedora 15 (Lovelock)
  • Fedora 14 (Laughlin)
  • Fedora 13 (Goddard)
  • Fedora 12 (Constantine)
  • Fedora 11 (Leonidas)
  • Fedora 10 (Cambridge)
  • Fedora 9 (Sulphur)
  • Fedora 8 (Werewolf)
  • Fedora 7 (Moonshine)
  • Fedora Core 6 (Zod)
  • Fedora Core 5 (Bordeaux)
  • Fedora Core 4 (Stentz)
  • Fedora Core 3 (Heidelberg)

Other resources

  • KEYS.txt: fingerprints of all below gnupg keys
  • RPM-GPG-KEY-remi2023: the GnuPG public key of the key pair used to sign my packages (new .src.rpm)
  • RPM-GPG-KEY-remi2022: the GnuPG public key of the key pair used to sign my packages (Fedora 36-37)
  • RPM-GPG-KEY-remi2021: the GnuPG public key of the key pair used to sign my packages (Fedora 34-35 and EL-9)
  • RPM-GPG-KEY-remi2020: the GnuPG public key of the key pair used to sign my packages (Fedora 32-33)
  • RPM-GPG-KEY-remi2019: the GnuPG public key of the key pair used to sign my packages (Fedora 30-31)
  • RPM-GPG-KEY-remi2018: the GnuPG public key of the key pair used to sign my packages (Fedora 28-29 and EL-8)
  • RPM-GPG-KEY-remi2017: the GnuPG public key of the key pair used to sign my packages (Fedora 26-27)
  • RPM-GPG-KEY-remi: the GnuPG public key of the key pair used to sign my packages (Fedora

Paypal:

1M1tNcXFXrcjn5mBj4hz4RMxL5xpdPpUjp

Mirror hosted by

Designed for Remi by Trashy graphism by Bruno Bellamy

Источник

Оцените статью
Adblock
detector