not logged in | [Login]
radiusd -X when debugging!
./configure make make install
This works on most Solaris systems. You will need to have a compiler installed, and libraries for any services you intend to use. (OpenSSL, LDAP, Oracle, etc.)
If you're using OpenCSW you can just do
sudo pkg-util -i -y gcc4-core, to get GCC and the other required utilities.
These instructions should also work on Solaris 10 (x86_64) with minimal changes.
The source compiles perfectly once OS dependencies etc. are met. The main additional modules compiled here were
Solaris 10 will likely require you to fix the system headers.
Do the following as root:
cd /usr/local/lib/gcc-lib/sparc-sun-solaris2.10/3.3.2/install-tools/ vi mkheaders.conf
Then put the line
SHELL=/bin/sh on the first line of the
mkheaders.conf file. It should look something like the following:
SHELL=/bin/sh SYSTEM_HEADER_DIR="/usr/include" OTHER_FIXINCLUDES_DIRS="" FIXPROTO_DEFINES="" STMP_FIXPROTO="stmp-fixproto" STMP_FIXINC="stmp-fixinc"
Then run the following command as root. It may take several minutes to rebuild the headers.
Solaris 10 has versions of Openssl and OpenLDAP installed, however they do not fullfill the compile requirements for freeradius functionality. You should go to http://sunfreeware.com/ and get the packages there, and also resolve any unmet dependencies.
If you have other modules you are concerned with that are not building correctly, don't trust the OS packages. Look for equiv packages and try the build with them installed as well.
download package gunzip packagename.gz sudo pkgadd -d packagename
Now you can use the standard, configure make sudo make install.
In order for the ldap queries to work, the following needs to be set as an environmental variable, OR if you're handy with compiler flags you can take care of it during the compile with the
-RLIBDIR linker flag.
The two locations in the above path are for access to the
libgcc_s.so.1 libraries and the
rlm_ldap libraries respectively.
Notes for building on Solaris. (SPARC or x86 shouldn't matter)
LD_LIBRARY_PATHat runtime, which then defines a pathlike structure for loading libs at runtime. If you build most server software from source, -R is recommended if you want to know what, which and where stuff goes and which versions of of libraries are linked to. Note: Setting
LD_LIBRARY_PATHnegates and runtime paths already encoded in binaries.
From the above the next few lines can be used to build freeradius on solaris (you can use this approach to build any software).
export PATH='/usr/sbin:/usr/bin:/opt/csw/bin:/opt/csw/gcc3/bin:/usr/ccs/bin:/opt/SUNWspro/bin' export CFLAGS='-I/usr/local/openldap/include/ -I/usr/local/mysql/include/mysql/ -I/opt/csw/include/' export LDFLAGS='-L/usr/local/openldap/lib/ -R/usr/local/openldap/lib -L/usr/local/mysql/lib -R/usr/local/mysql/lib -L/opt/csw/lib -R/opt/csw/lib' export LD_OPTIONS='-L/usr/local/openldap/lib/ -R/usr/local/openldap/lib -L/usr/local/mysql/lib -R/usr/local/mysql/lib -L/opt/csw/lib -R/opt/csw/lib' ./configure --prefix=/usr/local/freeradius-1.1.2-mysql-ldap --with-ldap --with-mysql-dir=/usr/local/mysql-5.0.21 gmake gmake install
Building freeradius3 and dependencies from source
Make sure you use FreeRadius 3.0.11 or later, earlier versions won't compile on Solaris 11.
Here, you can find instructions to compile a freeradius on solaris 11, with modules for rlm_ldap, rlm_sql_mysql, rlm_perl (threaded), rlm_eap (separate openssl)
Install sunstudio (used for openssl + perl) and gcc(used for LDAP libs + freeradius)
pkg install developer/gcc pkgadd -d http://get.opencsw.org/now/opt/csw/bin/pkgutil vim /etc/opt/csw/pkgutil.conf --> mirror=http://mirror.opencsw.org/opencsw/unstable /opt/csw/bin/pkgutil -U /opt/csw/bin/pkgutil -i CSWlibtalloc2 /opt/csw/bin/pkgutil -i CSWlibtalloc-dev /opt/csw/bin/pkgutil -i mysql_dev libmysqlclient15 libmysqlclient_r15
Solaris LDAP libraries are non-standard and won't work with FreeRadius. To compile your own: Download OpenLDAP sources and compile with
./configure --enable-slapd=no --enable-backends=no --enable-overlays=no --prefix=/usr/local/freeradius_ldap gmake depend gmake gmake install
Only of you need threaded/multiplicity in your perl module, otherwise standard perl libs will be just fine Download Perl sources and compile with
./Configure -Dprefix='/usr/local/freeradiusperl' -Dusethreads -Duselargefiles -Duse64bitint -Dusemultiplicity -Dcf_email="firstname.lastname@example.org" -Dldflags="-lsocket -lnsl -ldl -lm -lc" -Duseshrplib -d make make test make install
Only needed if you want seperate OpenSSL libraries Download OpenSSL sources and compile with
./Configure solaris-sparcv9-cc -m32 shared --openssldir=/usr/local/ssl --prefix=/usr/local/ssl make make test make install
To compile FreeRadius with all of the above: Download sources and compile with:
Moving the awk command is needed because of a borked/broken awk command is used as standard in Solaris. We replace it with a symlink to nawk, so the configure command can use it.
export PATH="/usr/local/freeradiusperl/bin:$PATH" mv /usr/bin/awk /usr/bin/awk_old ln -s /usr/bin/nawk /usr/bin/awk ./configure --prefix=/usr/local/freeradius3 --with-ldap --with-mysql-lib-dir=/usr/sfw/lib --with-mysql-include-dir=/usr/sfw/include --with-rlm-perl-lib-dir=/usr/local/freeradiusperl/lib/5.20.1/sun4-solaris-thread-multi-64int/CORE --with-openssl-include=/usr/local/ssl/include --with-openssl-libraries=/usr/local/ssl/lib --includedir=/usr/local/ssl --with-mysql-lib-dir=/opt/csw/lib --with-mysql-include-dir=/opt/csw/include --with-talloc-lib-dir=/opt/csw/lib --with-talloc-include-dir=/opt/csw/include --with-udpfromto=no --with-rlm-ldap-lib-dir=/usr/local/freeradius_ldap/lib --with-rlm-ldap-include-dir=/usr/local/freeradius_ldap/include --enable-developer gmake gmake test gmake install
SMF manifest and installation instructions for Solaris 10 can be found here.
Last edited by Sander Eerdekens (sandereerd), 2016-01-27 07:26:00
Sponsored by Network RADIUS