Difference between revisions of "Instalasi SER"

From OnnoWiki
Jump to navigation Jump to search
Line 38: Line 38:
  
 
  export SIP_DOMAIN="foo.bar”
 
  export SIP_DOMAIN="foo.bar”
 +
 +
Sebaiknya di test dulu ini, kadang-kadang membuat masalah di saat login
 +
 +
  
  

Revision as of 09:58, 7 March 2008

Siapkan MySQL Server

# apt-get install mysql-server libmysqlclient15-dev 
# apt-get install libphp-adodb
# apt-get install libgd2-xpm libgd2-xpm-dev
# apt-get install php5-mysql
# apt-get install php5-gd
# apt-get install php5-curl
# apt-get install php-image-graph php-image-canvas php-pear

Siapkan Password Root untuk MySQL

mysql
mysql> SET PASSWORD FOR root@localhost=PASSWORD('password');


Instalasi SER

Install SER

# apt-get install ser
# apt-get install ser-mysql-module

Restart SER

# /etc/init.d/ser restart




Siapkan /etc/profile

# vi /etc/profile

Pastikan ada parameter SIP_DOMAIN

export SIP_DOMAIN="foo.bar”

Sebaiknya di test dulu ini, kadang-kadang membuat masalah di saat login



Siapkan Database MySQL untuk SER

Siapkan Database MySQL untuk SER

# ser_mysql.sh create
MySql password for root: (masukan password root MySQL)
Domain (realm) for the default user 'admin': (masukan domain / realm / ip-address mesin anda)
creating database ser ...
#


Cek apakah database telah dibuat dengan baik

# mysql -u root -p
password: (masukan password root MySQL)
mysql> connect mysql;
mysql> select * from user;
| Host               | User  | Password         | Select_priv | ...
| %                  | ser   | 4e633cf914a735a0 | N           | ... 
| localhost          | ser   | 4e633cf914a735a0 | Y           | ...
| %                  | serro | 7cb73a267cb7bd5f | N           | ...
| localhost          | serro | 7cb73a267cb7bd5f | Y           | ...
mysql> connect ser;
mysql> show tables;
mysql> select * from subscriber;
| phplib_id                        | USERNAME | PASSWORD | FIRST_NAME | ...
| 4cefa7a4d3c8c2dbf6328520bd873a19 | admin     | heslo | first        | ...

Perhatikan default password admin adalah heslo.


Siapkan ser.cfg Untuk MySQL

Edit /etc/ser/ser.cfg

# vi /etc/ser/ser.cfg


Uncomment beberapa module agar

loadmodule "/usr/lib/ser/modules/mysql.so" 
loadmodule "/usr/lib/ser/modules/auth.so"
loadmodule "/usr/lib/ser/modules/auth_db.so"




Agar SER menggunakan database & menulis semua ke database, maka pastikan

#modparam ("usrloc", "db_mode", 0)
modparam ("usrloc", "db_mode", 2)

Catatan untuk db_modes,

  • Mode 0 - Disables writes to the database. Contact information will not be preserved if the server is restarted.
  • Mode 1 - Writes all changes to the database immediately. Contact information is saved to the database immediately. This can slow the response to clients as they connect.
  • Mode 2 - Periodically writes contact information to the database based in the in memory cache.




Pada saat debuging akan lebih mudah jika password di tulis dalam text. Agar memudahkan kita, maka uncomment,

modparam ("auth", "calculate_ha1", yes)
modparam ("auth", "password_column", "password")


Save perubahan & keluar dari ser.cfg




Restart SER

# /etc/init.d/ser restart