Brian Waters | 13d9601 | 2017-12-08 16:53:31 -0600 | [diff] [blame^] | 1 | See http://www.freediameter.net/trac/wiki/DebRepository for instructions on how to |
| 2 | install freeDiameter from existing package. |
| 3 | |
| 4 | See INSTALL file for general instructions on building freeDiameter from sources. |
| 5 | |
| 6 | The remaining of this file contains specific instructions for building the freeDiameter |
| 7 | package files for Debian and Ubuntu systems. |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | freeDiameter is shipped with the necessary files to generate the Debian package. |
| 13 | All related files are in the directory "contrib/debian" of the distribution. |
| 14 | As a first step, you have to link this directory from your top-level dir: |
| 15 | ln -s contrib/debian |
| 16 | |
| 17 | ============================================ |
| 18 | |
| 19 | The following packages are required to compile freeDiameter from source: |
| 20 | cmake make gcc g++ flex bison libsctp1 libsctp-dev libgnutls-dev libgcrypt-dev libidn11-dev |
| 21 | |
| 22 | (note that libidn and libsctp can be avoided by defining DISABLE_SCTP and DIAMID_IDNA_REJECT) |
| 23 | |
| 24 | Additionnaly, these ones may be useful: |
| 25 | mercurial gdb |
| 26 | |
| 27 | Extensions additional dependencies: |
| 28 | app_acct: |
| 29 | libpq-dev |
| 30 | |
| 31 | app_sip: |
| 32 | app_diameap: |
| 33 | libmysqlclient-dev |
| 34 | |
| 35 | dict_legacy_xml: |
| 36 | libxml2-dev |
| 37 | |
| 38 | dbg_interactive: |
| 39 | swig python-dev |
| 40 | |
| 41 | ============================================ |
| 42 | |
| 43 | If your debhelper environment is recent (> 7.3.9 for cmake support), |
| 44 | the following commands should generate the freeDiameter packages for you: |
| 45 | |
| 46 | # Install the dependencies for building the source: |
| 47 | sudo apt-get -y install mercurial cmake make gcc g++ bison flex libsctp-dev libgnutls-dev libgcrypt-dev libidn11-dev ssl-cert debhelper fakeroot \ |
| 48 | libpq-dev libmysqlclient-dev libxml2-dev swig python-dev |
| 49 | |
| 50 | # Retrieve the latest version of the source package |
| 51 | cd |
| 52 | hg clone http://www.freediameter.net/hg/freeDiameter |
| 53 | cd freeDiameter |
| 54 | |
| 55 | # Prepare for Debian package |
| 56 | ln -s contrib/debian |
| 57 | |
| 58 | # Build the packages |
| 59 | fakeroot dh binary |
| 60 | |
| 61 | # Install the packages |
| 62 | cd .. |
| 63 | sudo dpkg -i *.deb |
| 64 | |
| 65 | |
| 66 | # The following lines may help you getting started.... (execute as root) |
| 67 | ln -s /etc/ssl/certs/ssl-cert-snakeoil.pem /etc/ssl/certs/freeDiameter.pem |
| 68 | ln -s /etc/ssl/private/ssl-cert-snakeoil.key /etc/ssl/private/freeDiameter.key |
| 69 | zcat /usr/share/doc/freediameter-daemon/examples/freediameter.conf.sample.gz > /etc/freeDiameter/freeDiameter.conf |
| 70 | echo "Identity=\"localhost.localdomain\";" >> /etc/freeDiameter/freeDiameter.conf |
| 71 | freeDiameterd |
| 72 | |
| 73 | =========================================== |
| 74 | |
| 75 | freeDiameter is tested regularly on all current Ubuntu distributions since Intrepid (compiled from source as described below) |
| 76 | Ubuntu Hardy support is known to be broken. |
| 77 | |
| 78 | The Debian package has been generated with success on Debian (>=Squeeze) and Ubuntu (>=Karmic). |
| 79 | |
| 80 | |
| 81 | ===========================================- |
| 82 | Step by step instructions without using the debhelper tools: |
| 83 | |
| 84 | 1) Install all packages dependencies |
| 85 | # sudo apt-get install mercurial cmake make gcc g++ bison flex libsctp-dev libgnutls-dev libgcrypt-dev libidn11-dev |
| 86 | |
| 87 | 2) (OPTION) If you will compile modules that require postgresql, also install: |
| 88 | # sudo apt-get install libpq-dev |
| 89 | and for mysql: |
| 90 | # sudo apt-get install libmysqlclient-dev |
| 91 | |
| 92 | 3) (OPTION) If you want a more user-friendly interface, install this: |
| 93 | # sudo apt-get install cmake-curses-gui |
| 94 | |
| 95 | 4) Retrieve the source files |
| 96 | # hg clone http://www.freediameter.net/hg/freeDiameter |
| 97 | |
| 98 | 5) Create a build directory, and enter it |
| 99 | # mkdir fDbuild |
| 100 | # cd fDbuild |
| 101 | |
| 102 | 6) Configure and generate the Makefiles |
| 103 | # cmake ../freeDiameter |
| 104 | # make edit_cache |
| 105 | |
| 106 | 7) Compile all files: |
| 107 | # make |
| 108 | |
| 109 | 8) (OPTION) See available targets: |
| 110 | # make help |
| 111 | |
| 112 | 9) (OPTION) Check the software has a correct basic behavior on your environment. -- only if you did not disable the tests in step 6 |
| 113 | # make test |
| 114 | |
| 115 | 10) (OPTION) Install the software in configured locations: |
| 116 | # sudo make install |
| 117 | |
| 118 | |
| 119 | =========================================== |
| 120 | |
| 121 | Note: On Ubuntu Quantal Quetzal, you may have to force use of python 2.7 |
| 122 | library for the dbg_interactive extension, as on some systems CMake selects the 3.2 library |
| 123 | by default. |