Difference between revisions of "Compile OpenSIPS"
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
Line 83: | Line 83: | ||
# make all && make include_modules="acc mysql textops sl enum db_mysql" modules && make install | # make all && make include_modules="acc mysql textops sl enum db_mysql" modules && make install | ||
+ | |||
+ | |||
+ | Copykan scripts ke /usr/local/src/opensips/opensipsctl | ||
+ | |||
+ | # cp -Rf /usr/local/src/openser-1.5.0-notls/scripts/* /usr/local/lib/opensips/opensipsctl | ||
+ | |||
Line 128: | Line 134: | ||
Kadang kala ada bug dalam proses instalasi, entah kenapa tidak semua module tercopy ke folder yang benar. | Kadang kala ada bug dalam proses instalasi, entah kenapa tidak semua module tercopy ke folder yang benar. | ||
+ | |||
+ | Copykan scripts ke /usr/local/lib/opensips/opensipsctl | ||
+ | |||
+ | # cp -Rf /usr/local/src/openser-1.5.0-notls/scripts/* /usr/local/lib/opensips/opensipsctl | ||
+ | |||
+ | atau | ||
+ | |||
+ | # cp -Rf /usr/local/src/openser-1.5.0-notls/scripts/* /usr/local/lib/opensips/opensipsctl | ||
+ | |||
+ | |||
+ | |||
Kita kadang kala perlu mengcopy secara manual | Kita kadang kala perlu mengcopy secara manual | ||
− | # cp /usr/local/src/openser-1. | + | # cp /usr/local/src/openser-1.5.0-notls/modules/mysql/mysql.so /usr/lib/openser/modules/ |
− | # cp /usr/local/src/openser-1. | + | # cp /usr/local/src/openser-1.5.0-notls/modules/sl/sl.so /usr/lib/openser/modules/ |
− | # cp /usr/local/src/openser-1. | + | # cp /usr/local/src/openser-1.5.0-notls/modules/textops/textops.so /usr/lib/openser/modules/ |
− | # cp /usr/local/src/openser-1. | + | # cp /usr/local/src/openser-1.5.0-notls/modules/enum/enum.so /usr/lib/openser/modules/ |
Atau jika anda mengcompile di /usr/local/src kemungkinan path yang dibutuhkan adalah | Atau jika anda mengcompile di /usr/local/src kemungkinan path yang dibutuhkan adalah | ||
− | # cp /usr/local/src/openser-1. | + | # cp /usr/local/src/openser-1.5.0-notls/modules/mysql/mysql.so /usr/local/lib/openser/modules/ |
− | # cp /usr/local/src/openser-1. | + | # cp /usr/local/src/openser-1.5.0-notls/modules/sl/sl.so /usr/local/lib/openser/modules/ |
− | # cp /usr/local/src/openser-1. | + | # cp /usr/local/src/openser-1.5.0-notls/modules/textops/textops.so /usr/local/lib/openser/modules/ |
− | # cp /usr/local/src/openser-1. | + | # cp /usr/local/src/openser-1.5.0-notls/modules/enum/enum.so /usr/local/lib/openser/modules/ |
Revision as of 20:31, 3 April 2009
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 \ libmysql++3 libmysql++-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 OpenSIPS
Ambil source code dari
http://www.opensips.org/index.php?n=Resources.Downloads#osippub http://www.opensips.org/index.php?n=Resources.Downloads#osipsf
Jika anda tidak menggunakan TLS, lakukan
# cp opensips-1.5.0-notls_src.tar.gz /usr/local/src/ # cd /usr/local/src/ # tar zxvf opensips-1.5.0-notls_src.tar.gz # cd opensips-1.5.0-notls
Jika anda menggunakan TLS, lakukan
# cp opensips/opensips-1.5.0-tls_src.tar.gz /usr/local/src/ # cd /usr/local/src/ # tar zxvf opensips-1.5.0-tls_src.tar.gz # cd opensips-1.5.0-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 OpenSIPS di folder /usr/sbin, maka sebaiknya kita install menggunakan perintah
# make prefix=/usr/ install
Jika anda ingin agar modul "acc", "mysql", "textops", "sl", "db_mysql" dan "enum" di compile lakukan
# make all && make include_modules="acc mysql textops sl enum db_mysql" modules && make install
Copykan scripts ke /usr/local/src/opensips/opensipsctl
# cp -Rf /usr/local/src/openser-1.5.0-notls/scripts/* /usr/local/lib/opensips/opensipsctl
Kadang kala tidak ada path ke arah binary openser di /usr/local/sbin. Agar bisa di run dari /usr/sbin/, copy opensips* di /usr/local/sbin ke /usr/sbin
# cp /usr/local/sbin/opensips* /usr/sbin # cp -Rf /usr/local/lib/opensips/ /usr/lib/
Kalau anda menginginkan dapat juga mengcopy
# cp -Rf /usr/local/etc/opensips /etc
Konfigurasi Dasar OpenSER
Semua file konfigurasi openser hasil compile terdapat di
/usr/local/etc/opensips
Edit /usr/local/etc/opensips/opensips.cfg
# vi /usr/local/etc/opensips/opensips.cfg
Pastikan
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
Lakukan
# touch /tmp/opensips_fifo
Cek apakah ada kesalahan dalam konfigurasi file
# opensips -c -f /usr/local/etc/opensips/opensips.cfg
Beberapa Bug
Kadang kala ada bug dalam proses instalasi, entah kenapa tidak semua module tercopy ke folder yang benar.
Copykan scripts ke /usr/local/lib/opensips/opensipsctl
# cp -Rf /usr/local/src/openser-1.5.0-notls/scripts/* /usr/local/lib/opensips/opensipsctl
atau
# cp -Rf /usr/local/src/openser-1.5.0-notls/scripts/* /usr/local/lib/opensips/opensipsctl
Kita kadang kala perlu mengcopy secara manual
# cp /usr/local/src/openser-1.5.0-notls/modules/mysql/mysql.so /usr/lib/openser/modules/ # cp /usr/local/src/openser-1.5.0-notls/modules/sl/sl.so /usr/lib/openser/modules/ # cp /usr/local/src/openser-1.5.0-notls/modules/textops/textops.so /usr/lib/openser/modules/ # cp /usr/local/src/openser-1.5.0-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.5.0-notls/modules/mysql/mysql.so /usr/local/lib/openser/modules/ # cp /usr/local/src/openser-1.5.0-notls/modules/sl/sl.so /usr/local/lib/openser/modules/ # cp /usr/local/src/openser-1.5.0-notls/modules/textops/textops.so /usr/local/lib/openser/modules/ # cp /usr/local/src/openser-1.5.0-notls/modules/enum/enum.so /usr/local/lib/openser/modules/