Difference between revisions of "SERWEB Menggunakan OpenSER"

From OnnoWiki
Jump to navigation Jump to search
Line 167: Line 167:
 
  -
 
  -
 
  - "\n";
 
  - "\n";
 +
 +
 +
----
 +
 +
Edit /var/www/serweb/data_layer/method.get_acc_entries.php
 +
 +
# vi /var/www/serweb/data_layer/method.get_acc_entries.php
 +
 +
Lakukan
 +
 +
  
  

Revision as of 20:27, 7 March 2008

Install software pendukung

# pear install MDB2
# pear install DB
# pear install lOG
# pear install XML_RPC

Install runkit karena Ubuntu terbaru mengunakan PHP 5

# apt-get install php5-dev
# pecl install -f runkit

Kemungkinan gagal tinggi dalam menginstalasi runkit masih banyak bug di runkit, kalau ada punya nyali ada baiknya mengedit source code runkit jika terjadi bug

# cd /tmp/pear/cache/runkit-0.9/
# vi runkit_import.c

Buang kalimat

#ifdef ZEND_ENGINE_2
   zend_unmangle_property_name(key, &cname, &pname);
#endif

Save file runkit_import.c, lakukan

# ./configure
# make
# make install
# make test (untuk melihat apakah runkit berjala dengan benar)

Jangan lupa mengaktifkan extension runkit.so tersebut

# vi /etc/php5/apache2/php.ini

Pastikan ada

extension=runkit.so

Jangan lupa untuk me-restart Apache Web Server

# /etc/init.d/apache2 restart



Ambil source code SERWEB dari

http://ftp.iptel.org/pub/serweb/

Copykan source code SERWEB ke Folder Web

# cp serweb-0.9.6.tar.gz /var/www/
# cd /var/www
# tar zxvf serweb-0.9.6.tar.gz
# mv serweb-0.9.6 serweb
# chown -Rf www-data /var/www/serweb


# cp -Rf /var/www/serweb/phplib/ /var/www
# chown -Rf www-data /var/www/phplib



Edit konfigurasi Apache agar ada alias utk SERWEB

# vi /etc/apache2/httpd.conf

Isi dengan entry

Alias /serweb "/var/www/serweb/html"




Edit file /var/www/serweb/config/config_data_layer.php

# vi /var/www/serweb/config/config_data_layer.php

Ubah parameter berikut agar cocok dengan openser

$i=0;
$config->data_sql->host[$i]['host']="localhost";        //database host
$config->data_sql->host[$i]['port']="";                 //database port - leave empty for default
$config->data_sql->host[$i]['name']="openser";          //database name
$config->data_sql->host[$i]['user']="openser";          //database conection user
$config->data_sql->host[$i]['pass']="openserrw";        //database conection password
// If you want to configure additional backup SQL servers, do so below.
/*
$i++;
$config->data_sql->host[$i]['host']="localhost";        //database host
$config->data_sql->host[$i]['port']="";                 //database port - leave empty for default
$config->data_sql->host[$i]['name']="openser";          //database name
$config->data_sql->host[$i]['user']="openser";          //database conection user
$config->data_sql->host[$i]['pass']="openserrw";        //database conection password
*/
// If you want to configure more SQL backup servers, copy and paste the above (including the "$i++;")


Lanjut ..

- $config->data_sql->table_user_preferences_types="preferences_types";
+ $config->data_sql->table_user_preferences_types="usr_preferences_types";


Lanjut

- $config->fifo_server="/tmp/ser_fifo";
+ $config->fifo_server="/tmp/openser_fifo";



Edit /var/www/serweb/config/config_paths.php

# vi /var/www/serweb/config/config_paths.php

Edit

- $config->fifo_server="/tmp/ser_fifo";
+ $config->fifo_server="/tmp/openser_fifo";



Edit /var/www/serweb/data_layer/method.add_contact.php

# vi /var/www/serweb/data_layer/method.add_contact.php 

Lakukan

-
- ($config->ul_replication ? 			// if replication is supported by FIFO 
-		$replication."\n":
-		"").
-
- ($config->ul_flags ?				// if flags is supported by FIFO
-		$flags."\n":
-		"").
-
- "\n";
+ "0\n128\n4294967295\n"; // replication/flags/methods 



Edit /var/www/serweb/data_layer/method.add_new_alias.php

# vi /var/www/serweb/data_layer/method.add_new_alias.php 


Lakukan

+ "0\n128\n4294967295\n"; // replication/flags/methods
- ($config->ul_replication ? 			// if replication is supported by FIFO 
-		$replication."\n":
-		"").
-
- ($config->ul_flags ?				// if flags is supported by FIFO
-		$flags."\n":
-		"").
-
-	"\n";



Edit /var/www/serweb/data_layer/method.get_acc_entries.php

# vi /var/www/serweb/data_layer/method.get_acc_entries.php

Lakukan



Pranala Menarik