Difference between revisions of "Instalasi CDRTool"

From OnnoWiki
Jump to navigation Jump to search
Line 5: Line 5:
  
 
  # apt-get install apache2 libapache2-mod-php5 php5 php5-cli php5-mysql \
 
  # apt-get install apache2 libapache2-mod-php5 php5 php5-cli php5-mysql \
php5-curl php-pear php-soap mrtg php5-memcache memcached monit smarty
+
php5-curl php-pear php-soap mrtg php5-memcache memcached monit smarty
  
 
Download Source Code CDRTool dari situs
 
Download Source Code CDRTool dari situs

Revision as of 12:22, 14 July 2008

Tingkat kesulitan menginstalasi CDRTool cukup tinggi, kemungkinan gagal sangat besar.


Siapkan software pendukung

# apt-get install apache2 libapache2-mod-php5 php5 php5-cli php5-mysql \
php5-curl php-pear php-soap mrtg php5-memcache memcached monit smarty

Download Source Code CDRTool dari situs

http://cdrtool.ag-projects.com/
http://download.dns-hosting.info/CDRTool/


Instalasi yang mudah mungkin

# cp -Rf cdrtool_6.2.3_all.deb /usr/local/src/
# cd /usr/local/src/
# dpkg -i cdrtool_6.2.3_all.deb


Siapkan database CDRTool di MySQL

# mysql -u root -p
Enter password: 
mysql> create database cdrtool;
mysql> grant INSERT,SELECT on root.* to cdradmin@localhost;
mysql> grant INSERT,SELECT on root.* to locker@localhost;
mysql> GRANT ALL ON cdrtool.* TO cdradmin@localhost IDENTIFIED by 'PASSWORD'; 
mysql> GRANT ALL ON cdrtool.* TO cdradmin IDENTIFIED by 'PASSWORD'; 
mysql> GRANT ALL ON cdrtool.* TO locker@localhost IDENTIFIED by 'lockadm18';
mysql> GRANT ALL ON cdrtool.* TO locker IDENTIFIED by 'lockadm18';
mysql> exit

Lakuan

# cd /var/www/CDRTool/setup/mysql
# mysql -u root -p<password-root> mysql < ./create_users.mysql
# mysql -u root -p<password-root> cdrtool < ./create_tables.mysql
# mysql -u root -p<password-root> cdrtool < ./create_data.mysql

Alternatif lain yang mungkin bisa dilakukan juga adalah

# ./setup_mysql.sh <password-root-MySQL> <ip-address-database-server>


Copykan setup Apache Web Server

# cd /var/www/CDRTool
# cp setup/apache2/conf.d/cdrtool /etc/apache2/conf.d/
# cp setup/apache2/sites-available/cdrtool.example.com /etc/apache2/sites-enabled

Edit file

# vi /etc/apache2/sites-enabled/cdrtool.example.com

Pastikan isinya

<VirtualHost sipcdr.example.com:443>
  ServerName          sipcdr.example.com
  DocumentRoot        /var/www/
  CustomLog           /var/log/apache2/cdrtool-access.log combined
  ErrorLog            /var/log/apache2/cdrtool-errors.log
  SetEnvIf User-Agent ".*MSIE.*"      nokeepalive ssl-unclean-shutdown
  # To enable SSL:
  # a2enmode ssl
  # add Listen 443 to ports.conf file
  # generate site certificates
  # SSLEngine           On
  # SSLCertificateFile    /etc/apache2/ssl/snakeoil-rsa.crt
  # SSLCertificateKeyFile /etc/apache2/ssl/snakeoil-rsa.key
  # RewriteEngine is required for Multimedia Service Platform
  #
  # a2enmode rewrite proxy
  # RewriteEngine       On
  # RewriteRule         ^/ngnpro/voicemail/(.*) http://10.0.0.1:9200/$1 [L,P]
  # RewriteRule         ^/ngnpro/(.*) http://10.0.0.2:9200/$1 [L,P]
  # ProxyVia            On
  # <Proxy *>
  #      Order Allow,Deny
  #      Allow from all
  # </Proxy>
       <Directory /var/www/CDRTool>
               Options FollowSymLinks
               AllowOverride All
       </Directory>
</VirtualHost>


Atau yang lebih sederhana

<VirtualHost cdrtool.example.com:80>
  ServerName          cdrtool.example.com
  DocumentRoot        /var/www/
  CustomLog           /var/log/apache2/cdrtool-access.log combined
  ErrorLog            /var/log/apache2/cdrtool-errors.log
  SetEnvIf User-Agent ".*MSIE.*"      nokeepalive ssl-unclean-shutdown
  # To enable SSL:
  # a2enmode ssl
  # add Listen 443 to ports.conf file
  # generate site certificates
  # SSLEngine           On
  # SSLCertificateFile    /etc/apache2/ssl/snakeoil-rsa.crt
  # SSLCertificateKeyFile /etc/apache2/ssl/snakeoil-rsa.key
</VirtualHost>



Edit /etc/default/cdrtool

# vi /etc/default/cdrtool

Pastikan

RUN_ratingEngine=yes
START_MEMCACHE=yes


Edit konfigurasi

# cd /var/www/CDRTool
# cp setup/global.inc.new.installation global.inc

Edit global.inc

# vi global.inc

Pastikan


$RatingEngine=array("socketIP"   => "127.0.0.1",
                   "socketPort" => "9024",
                   "CDRS_class" => "ser_radius",
                   "prepaid_lock" => true,
                   "log_delay"   => 0.05
                   );



$CDRTool['normalize']['defaultCountryCode']      = "62";



###########################################
# CDRTool datasources
class DB_CDRTool extends DB_Sql {
 var $Host     = "127.0.0.1.";
 var $Database = "cdrtool";
 var $User     = "cdradmin";
 var $Password = "PASSWORD";
 var $Halt_On_Error ="yes";
}
class DB_Locker extends DB_Sql {
 var $Host     = "127.0.0.1.";
 var $Database = "cdrtool";
 var $User     = "locker";
 var $Password = "PASSWORD";
 var $Halt_On_Error ="no";
}
class DB_radius extends DB_Sql {
 var $Host     = "127.0.0.1.";
 var $Database = "radius";
 var $User     = "radius";
 var $Password = "PASSWORD";
 var $Halt_On_Error ="no";
}
class DB_radius2 extends DB_Sql {
 var $Host     = "127.0.0.1.";
 var $Database = "radius";
 var $User     = "radius";
 var $Password = "PASSWORD";
 var $Halt_On_Error ="no";
}





# set IP server
if ($_SERVER['REMOTE_ADDR']=="192.168.0.2") {
   //$verbose=1;
} else {
   // prevent set of verbose via post/get
   unset($verbose);




Restart

# /etc/init.d/cdrtool restart
# /etc/init.d/apache2 restart


Mencoba akses ke

http://localhost/CDRTool/index.phtml

Username password default admin/admin


Pranala Menarik