FreeRadius 2.1.10 with Oracle support under Fedora 14

Fajar A. Nugraha list at fajar.net
Wed Jul 6 13:11:45 CEST 2011


On Wed, Jul 6, 2011 at 4:44 PM, Fajar A. Nugraha <list at fajar.net> wrote:
> On Wed, Jul 6, 2011 at 4:39 PM, Aurélien Lafranchise
> <aurelien_lafranchise at snype.org> wrote:
>> I am a newbie to FreeRadius, I prefer some kind of validation/authorization
>> before.
>
> Wiki is basically a collaborative tool. I agree with Arran, just add
> it to the wiki. If someone else finds a wrong info somewhere, or finds
> that some workarounds are no longer needed, they can always edit your
> post later.
>
> --
> Fajar
>
>>
>> 2011/7/6 Arran Cudbard-Bell <a.cudbardb at freeradius.org>
>>>
>>> Why don't you add it to the wiki ;)
>>> -Arran
>>> On Jul 6, 2011, at 10:59 AM, Aurélien Lafranchise wrote:
>>>
>>> Hi all,
>>> As I said, here is the step by step when using Oracle Instant Client 11 :

... and if you're going to add it to the wiki, I think it'd be better
to add "get the source for your respective freeradius version". (e.g.
if you're currently using 2.1.10, then get the source of that).

>>> 1. Decompress the tar file.
>>> 2. In src/modules/rlm_sql/drivers/rlm_sql_oracle :
>>> 2.1. Do "autoconf"
>>> 2.2 .and then ./configure
>>> --with-oracle-lib-dir=/usr/lib/oracle/11.2/client64/lib --with-oracle-include-dir=/usr/lib/oracle/11.2/client64
>>> 2.3. then "make" and you should have a .libs directory with a
>>> file rlm_sql_oracle-2.1.11.so
>>> 3. cp .libs/ rlm_sql_oracle-2.1.11.so /usr/lib64/freeradius/
>>> 4. ln
>>> -s  /usr/lib64/freeradius/rlm_sql_oracle-2.1.11.so /usr/lib64/freeradius/rlm_sql_oracle.so

the directory .libs should have both rlm_sql_oracle-2.1.11.so and
rlm_sql_oracle.so, so it's easier to just use "cp -a" to copy both.

>>> 5.1  in /etc/raddb cnfigure sql.conf
>>> 5.2 radiusd.conf(uncomment $INCLUDE sql.conf)
>>> 5.3 site-available/default uncomment linewith sql in the wanted section
>>> 5.4 from the decopressed archive cp -r raddb/sql/oracle /etc/raddb/sql/
>>> 6. Be sure that environnement variables for the user who launch radiusd to
>>> have export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib and export

you SHOULD be able to edit configure.in, edit the line that says

                        ORACLE_LIBDIR_SWITCH="-L${oracle_lib_dir} "

and change it to

                        ORACLE_LIBDIR_SWITCH="-L${oracle_lib_dir}
-R${oracle_lib_dir} "

with that, it should be able to find the needed libraries without the
need for LD_LIBRARY_PATH. Of course you need to rerun autoconf,
configure and friends.

>>> ORACLE_HOME=/usr/include/oracle/11.2/client64

I really hate having to set environment variables :)
Have you tested using easy connect syntax (i.e.
"host[:port][/service_name]") for radius_db? You should be able to
connect without having to set ORACLE_HOME

-- 
Fajar




More information about the Freeradius-Users mailing list