Difference between revisions of "Compile OpenSER"

From OnnoWiki
Jump to navigation Jump to search
(New page: Siapkan software pendukung - gcc / suncc / icc : gcc >= 2.9x; 4.[012] recommended (it will work with older version but it might require some options tweaking for best performance) -...)
 
 
(36 intermediate revisions by the same user not shown)
Line 1: Line 1:
Siapkan software pendukung
+
Menginstalsi OpenSER dengan cara mengcompile jauh lebih sulit daripada menginstalasi menggunakan apt-get install.
 +
Sayangnya untuk OpenSER versi 1.3.x tampaknya lebih aman di jalankan dengan cara mengcompile.
  
- gcc / suncc / icc : gcc >= 2.9x; 4.[012] recommended (it will work with
 
  older version but it might require some options tweaking for best
 
  performance)
 
- bison or yacc (Berkley yacc)
 
- flex
 
- GNU make (on Linux this is the standard "make", on FreeBSD and Solaris is
 
  called "gmake") version >= 3.79.
 
- sed and tr (used in the makefiles)
 
- GNU tar ("gtar" on Solaris) and gzip if you want "make tar" to work
 
- GNU install or BSD install (on Solaris "ginstall") if you want "make
 
  install", "make bin", "make sunpkg" to work
 
- openssl if you want to compile the TLS support
 
- libsctp if you want to compile the SCTP support
 
- libmysqlclient & libz (zlib) -libs and devel headers- if you want mysql DB
 
  support (the mysql module)
 
- libpq / postgresql -libs and devel headers- if you want postgres DB
 
  support (the postgres module)
 
- unixodbc -libs and devel headers- if you want unixodbc DB
 
  support (the unixodbc module)
 
- libexpat if you want the jabber gateway support (the jabber module) or the
 
  XMPP gateway support
 
- libxml2 if you want to use the cpl-c (Call Processing Language) or
 
  the presence modules (presence and pua*)
 
- libradius-ng -libs and devel headers- if you want to use functionalities
 
  with radius support - authentication, accounting, group support, etc
 
- unixodbc - libs and devel headers - if you want UNIXODBC support as
 
  DB underlayer
 
- libxmlrpc-c3 - libs and devel headers - if you want to have XML-RPC support
 
  for the Management interface (MI)
 
- libperl - libs and devel headers - if you want PERL connector to support
 
  perl scripting from you config file (perl module)
 
- libsnmp9 - libs and devel headers - if you want SNMP client functionality
 
  (SNMP AgentX subagent) for openser
 
- libldap libs and devel headers v2.1 or greater - if you want LDAP support
 
- libconfuse
 
  libconfuse-dev
 
  
 +
==Siapkan Software Pendukung==
  
 +
Untuk Ubuntu 8.10 dapat menggunakan perintah berikut
 +
 +
# apt-get install flex bison gcc make libperl5.10 libperl-dev libxmlrpc-c3 libxmlrpc-c3-dev \
 +
unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
 +
libexpat1 libexpat1-dev libldap-2.4-2 libldap2-dev libsnmp15 libsnmp-dev libconfuse0 libconfuse-dev \
 +
libmysqlclient15off libmysqlclient15-dev mysql-client-5.0 mysql-server zlib1g zlib1g-dev
 +
 +
 +
Untuk Ubuntu 8.04 dapat menggunakan perintah berikut
 +
 +
# apt-get install flex bison gcc make libperl5.8 libperl-dev libxmlrpc-c3 libxmlrpc-c3-dev \
 +
unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
 +
libexpat1 libexpat1-dev libldap-2.4-2 libldap2-dev libsnmp15 libsnmp-dev libconfuse0 libconfuse-dev \
 +
libmysqlclient15off libmysqlclient15-dev mysql-client-5.0 mysql-server zlib1g zlib1g-dev
 +
 +
 +
Untuk Ubuntu 7.10 dapat menggunakan perintah berikut
 +
 +
# apt-get install flex bison gcc make libperl5.8 libperl-dev libxmlrpc-c3 libxmlrpc-c3-dev \
 +
unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
 +
libexpat1 libexpat1-dev libldap2 libldap2-dev libsnmp10 libsnmp-dev libconfuse0 libconfuse-dev \
 +
libmysqlclient15off libmysqlclient15-dev mysql-client-5.0 mysql-server zlib1g zlib1g-dev
 +
 +
 +
Jika kita ingin menggunakan PostgresQL, kita perlu menginstalasi PostgresQL melalui perintah
 +
 +
# apt-get install libpq5 libpq-dev
 +
 +
 +
 +
==Ambil dan Buka Source Code OpenSER==
  
 
Ambil source code dari
 
Ambil source code dari
  
 
  http://www.openser.org/pub/openser/latest/src/
 
  http://www.openser.org/pub/openser/latest/src/
 +
http://www.openser.org/pub/openser/1.3.2/src/
 +
 +
 +
Jika anda tidak menggunakan TLS, lakukan
 +
 +
# cp openser-1.3.2-notls_src.tar.gz /usr/local/src/
 +
# cd /usr/local/src/
 +
# tar zxvf openser-1.3.2-notls_src.tar.gz
 +
# cd openser-1.3.2-notls
 +
 +
 +
Jika anda menggunakan TLS, lakukan
 +
 +
# cp openser-1.3.2-tls_src.tar.gz /usr/local/src/
 +
# cd /usr/local/src/
 +
# tar zxvf openser-1.3.2-tls_src.tar.gz
 +
# cd openser-1.3.2-tls
 +
 +
 +
==Compile==
 +
 +
 +
Compile menggunakan perintah
 +
 +
# make
 +
# make modules
 +
# make install
 +
 +
 +
Atau
 +
 +
# make && make modules && make install
 +
 +
 +
Atau
 +
 +
# make all && make install
 +
 +
 +
Jika anda ingin menginstalasi OpenSER di folder /usr/sbin, maka sebaiknya kita install menggunakan perintah
 +
 +
# make prefix=/usr/ install
 +
 +
 +
Jika anda ingin agar modul "acc", "mysql", "textops", "sl" dan "enum" di compile lakukan
 +
 +
# make all && make include_modules="acc mysql textops sl enum" modules && make install
 +
 +
 +
Kadang kala tidak ada path ke arah binary openser di /usr/local/sbin.
 +
Agar bisa di run dari /usr/sbin/, copy openser* di /usr/local/sbin ke /usr/sbin
 +
 +
# cp /usr/local/sbin/openser* /usr/sbin
 +
# cp -Rf /usr/local/lib/openser/modules /usr/lib/openser/
 +
 +
 +
 +
 +
==Konfigurasi Dasar OpenSER==
 +
 +
 +
Semua file konfigurasi openser hasil compile terdapat di
 +
 +
/usr/local/etc/openser
 +
 +
 +
Edit /usr/local/etc/openser/openser.cfg
 +
 +
# vi /usr/local/etc/openser/openser.cfg
 +
 +
Pastikan
 +
 +
modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
 +
  
 
Lakukan
 
Lakukan
  
  # cp openser-1.3.0-notls_src.tar.gz /usr/local/src/
+
# touch /tmp/openser_fifo
  # cd /usr/local/src/
+
 
  # tar zxvf openser-1.3.0-notls_src.tar.gz
+
 
  # cd openser-1.3.0-notls
+
Cek apakah ada kesalahan dalam konfigurasi file
  #
+
 
 +
# openser -c -f /usr/local/etc/openser/openser.cfg
 +
 
 +
 
 +
 
 +
==Beberapa Bug==
 +
 
 +
Kadang kala ada bug dalam proses instalasi, entah kenapa tidak semua module tercopy ke folder yang benar.
 +
Kita kadang kala perlu mengcopy secara manual
 +
 
 +
  # cp /usr/local/src/openser-1.3.2-notls/modules/mysql/mysql.so /usr/lib/openser/modules/
 +
# cp /usr/local/src/openser-1.3.2-notls/modules/sl/sl.so /usr/lib/openser/modules/
 +
# cp /usr/local/src/openser-1.3.2-notls/modules/textops/textops.so /usr/lib/openser/modules/
 +
  # cp /usr/local/src/openser-1.3.2-notls/modules/enum/enum.so /usr/lib/openser/modules/
 +
 
 +
Atau jika anda mengcompile di /usr/local/src kemungkinan path yang dibutuhkan adalah
 +
 
 +
  # cp /usr/local/src/openser-1.3.2-notls/modules/mysql/mysql.so /usr/local/lib/openser/modules/
 +
# cp /usr/local/src/openser-1.3.2-notls/modules/sl/sl.so /usr/local/lib/openser/modules/
 +
  # cp /usr/local/src/openser-1.3.2-notls/modules/textops/textops.so /usr/local/lib/openser/modules/
 +
  # cp /usr/local/src/openser-1.3.2-notls/modules/enum/enum.so /usr/local/lib/openser/modules/
 +
 
 +
 
 +
==Pranala Menarik==
 +
 
 +
* [[OpenSER Softswitch]]
 +
* [[Konfigurasi Minimal OpenSER]]
 +
* [[Menggunakan openserctl]]
 +
* [[Menggunakan openserdbctl]]
 +
* [[Masalah File /tmp/openser_fifo]]
 +
* [[Instalasi OpenSER administrator]]
 +
* [[Linux Howto]]
 +
* [[VoIP]]

Latest revision as of 20:27, 1 February 2009

Menginstalsi OpenSER dengan cara mengcompile jauh lebih sulit daripada menginstalasi menggunakan apt-get install. Sayangnya untuk OpenSER versi 1.3.x tampaknya lebih aman di jalankan dengan cara mengcompile.


Siapkan Software Pendukung

Untuk Ubuntu 8.10 dapat menggunakan perintah berikut

# apt-get install flex bison gcc make libperl5.10 libperl-dev libxmlrpc-c3 libxmlrpc-c3-dev \
unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
libexpat1 libexpat1-dev libldap-2.4-2 libldap2-dev libsnmp15 libsnmp-dev libconfuse0 libconfuse-dev \
libmysqlclient15off libmysqlclient15-dev mysql-client-5.0 mysql-server zlib1g zlib1g-dev


Untuk Ubuntu 8.04 dapat menggunakan perintah berikut

# apt-get install flex bison gcc make libperl5.8 libperl-dev libxmlrpc-c3 libxmlrpc-c3-dev \
unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
libexpat1 libexpat1-dev libldap-2.4-2 libldap2-dev libsnmp15 libsnmp-dev libconfuse0 libconfuse-dev \
libmysqlclient15off libmysqlclient15-dev mysql-client-5.0 mysql-server zlib1g zlib1g-dev


Untuk Ubuntu 7.10 dapat menggunakan perintah berikut

# apt-get install flex bison gcc make libperl5.8 libperl-dev libxmlrpc-c3 libxmlrpc-c3-dev \
unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
libexpat1 libexpat1-dev libldap2 libldap2-dev libsnmp10 libsnmp-dev libconfuse0 libconfuse-dev \
libmysqlclient15off libmysqlclient15-dev mysql-client-5.0 mysql-server zlib1g zlib1g-dev


Jika kita ingin menggunakan PostgresQL, kita perlu menginstalasi PostgresQL melalui perintah

# apt-get install libpq5 libpq-dev


Ambil dan Buka Source Code OpenSER

Ambil source code dari

http://www.openser.org/pub/openser/latest/src/
http://www.openser.org/pub/openser/1.3.2/src/


Jika anda tidak menggunakan TLS, lakukan

# cp openser-1.3.2-notls_src.tar.gz /usr/local/src/
# cd /usr/local/src/
# tar zxvf openser-1.3.2-notls_src.tar.gz 
# cd openser-1.3.2-notls


Jika anda menggunakan TLS, lakukan

# cp openser-1.3.2-tls_src.tar.gz /usr/local/src/
# cd /usr/local/src/
# tar zxvf openser-1.3.2-tls_src.tar.gz
# cd openser-1.3.2-tls


Compile

Compile menggunakan perintah

# make
# make modules
# make install


Atau

# make && make modules && make install


Atau

# make all && make install


Jika anda ingin menginstalasi OpenSER di folder /usr/sbin, maka sebaiknya kita install menggunakan perintah

# make prefix=/usr/ install


Jika anda ingin agar modul "acc", "mysql", "textops", "sl" dan "enum" di compile lakukan

# make all && make include_modules="acc mysql textops sl enum" modules && make install


Kadang kala tidak ada path ke arah binary openser di /usr/local/sbin. Agar bisa di run dari /usr/sbin/, copy openser* di /usr/local/sbin ke /usr/sbin

# cp /usr/local/sbin/openser* /usr/sbin
# cp -Rf /usr/local/lib/openser/modules /usr/lib/openser/



Konfigurasi Dasar OpenSER

Semua file konfigurasi openser hasil compile terdapat di

/usr/local/etc/openser


Edit /usr/local/etc/openser/openser.cfg

# vi /usr/local/etc/openser/openser.cfg

Pastikan

modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")


Lakukan

# touch /tmp/openser_fifo


Cek apakah ada kesalahan dalam konfigurasi file

# openser -c -f /usr/local/etc/openser/openser.cfg


Beberapa Bug

Kadang kala ada bug dalam proses instalasi, entah kenapa tidak semua module tercopy ke folder yang benar. Kita kadang kala perlu mengcopy secara manual

# cp /usr/local/src/openser-1.3.2-notls/modules/mysql/mysql.so /usr/lib/openser/modules/
# cp /usr/local/src/openser-1.3.2-notls/modules/sl/sl.so /usr/lib/openser/modules/
# cp /usr/local/src/openser-1.3.2-notls/modules/textops/textops.so /usr/lib/openser/modules/
# cp /usr/local/src/openser-1.3.2-notls/modules/enum/enum.so /usr/lib/openser/modules/

Atau jika anda mengcompile di /usr/local/src kemungkinan path yang dibutuhkan adalah

# cp /usr/local/src/openser-1.3.2-notls/modules/mysql/mysql.so /usr/local/lib/openser/modules/
# cp /usr/local/src/openser-1.3.2-notls/modules/sl/sl.so /usr/local/lib/openser/modules/
# cp /usr/local/src/openser-1.3.2-notls/modules/textops/textops.so /usr/local/lib/openser/modules/
# cp /usr/local/src/openser-1.3.2-notls/modules/enum/enum.so /usr/local/lib/openser/modules/


Pranala Menarik