本文介绍在Ubuntu 18.04系统上为Kamailio SIP安装Siremis管理界面的方法。
简介 Siremis是Kamailio SIP Server的Web管理界面,它允许你配置用户配置文件、路由规则、查看记帐、注册的电话、显示图表、以及通过xmlrpc与SIP服务器通信。一旦你有一个工作的Kamailio SIP服务器(在Ubuntu 18.04/CentOS 7系统上安装Kamailio SIP的方法),你安装Siremis以简化其管理。
在Ubuntu 18.04上安装Siremis所需要的依赖 Siremis需要在主机系统上安装Apache Web服务器和PHP,你还需要CURL模块就是使用JSONRPC命令面板,下载并安装这些依赖项: sudo apt-get update sudo apt-get install apache2 sudo a2enmod rewrite 安装PHP: sudo apt-get install php php-mysql php-gd php-curl php-xml libapache2-mod-php php-pear 为XMLRPC命令面板安装XML_RPC包: $ sudo pear install XML_RPC2 WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-update pear.php.net" to update downloading XML_RPC2-1.1.4.tgz ... Starting to download XML_RPC2-1.1.4.tgz (68,296 bytes) .................done: 68,296 bytes downloading HTTP_Request2-2.3.0.tgz ... Starting to download HTTP_Request2-2.3.0.tgz (119,717 bytes) ...done: 119,717 bytes downloading Cache_Lite-1.8.2.tgz ... Starting to download Cache_Lite-1.8.2.tgz (33,873 bytes) ...done: 33,873 bytes downloading Net_URL2-2.2.1.tgz ... Starting to download Net_URL2-2.2.1.tgz (20,010 bytes) ...done: 20,010 bytes install ok: channel://pear.php.net/Cache_Lite-1.8.2 install ok: channel://pear.php.net/Net_URL2-2.2.1 install ok: channel://pear.php.net/HTTP_Request2-2.3.0 install ok: channel://pear.php.net/XML_RPC2-1.1.4
在Ubuntu 18.04上安装Siremis 完成依赖项的安装后,可以从Github clone代码,此安装将从Github存储库源代码完成: sudo apt-get -y install make make-guile Clone存储库: # cd /var/www # git clone https://github.com/asipto/siremis Cloning into 'siremis'... remote: Counting objects: 8594, done. remote: Compressing objects: 100% (5/5), done. remote: Total 8594 (delta 0), reused 1 (delta 0), pack-reused 8589 Receiving objects: 100% (8594/8594), 12.63 MiB | 19.41 MiB/s, done. Resolving deltas: 100% (4900/4900), done. 生成Apache Virtualhost配置: # cd siremis # make apache24-conf 修改输出并将其放在/etc/apache2/sites-enabled/siremis.conf上: # siremis apache 2.4 conf snippet ... <VirtualHost *:80> ServerName siremis.computingforgeeks.com ServerAdmin webmaster@localhost DocumentRoot /var/www/siremis Alias /siremis "/var/www/siremis/siremis" <Directory "/var/www/siremis/siremis"> Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted <FilesMatch "\.xml$"> Require all denied </FilesMatch> <FilesMatch "\.inc$"> Require all denied </FilesMatch> </Directory> </VirtualHost> 运行以下命令创建.htaccess和Siremis配置文件: # make prepare24 updating htaccess file for apache 2.4 ... deploying htaccess files for apache 2.4 in subdirs ... updating app.inc file... creating folders... done 确保以下目录对Web服务器用户具有写访问权限: siremis/log siremis/session siremis/files siremis/themes/default/template/cpl 通过执行make chown命令完成的: # make chown changing onwner to www-data:www-data ... chown -R www-data:www-data .
配置数据库 如果在Kamailio安装期间没有这样做,请创建Kamailio数据库: # kamdbctl create MySQL password for root: INFO: test server charset INFO: creating database kamailio ... INFO: granting privileges to database kamailio ... INFO: creating standard tables into kamailio ... INFO: Core Kamailio tables succesfully created. Install presence related tables? (y/n): y INFO: creating presence tables into kamailio ... INFO: Presence tables succesfully created. Install tables for imc cpl siptrace domainpolicy carrierroute drouting userblacklist htable purple uac pipelimit mtree sca mohqueue rtpproxy rtpengine? (y/n): y INFO: creating extra tables into kamailio ... INFO: Extra tables succesfully created. Install tables for uid_auth_db uid_avp_db uid_domain uid_gflags uid_uri_db? (y/n): y INFO: creating uid tables into kamailio ... INFO: UID tables succesfully created. 创建数据库用户,该用户可以完全访问siremis数据库: # mysql -u root -p MariaDB [(none)]> GRANT ALL PRIVILEGES ON siremis.* TO siremis@localhost IDENTIFIED BY 'Password'; MariaDB [(none)]> quit
Siremis Web安装 启用Apache重写模块并重启apache: # sudo a2enmod rewrite Enabling module rewrite. $ sudo systemctl restart apache2 然后使用自己配置的域名/siremis/以启动安装向导,第一次执行此操作时,将被重定向到安装向导,按照提示操作即可:
在数据库配置中,选择所有选项,如下所示:
完成后,登录: 用户名:admin 密码:admin 通过单击页面顶部的我的帐户(My Account),在第一次登录时更改默认密码admin:
附:安装后的提示 删除安装目录:siremis/install 如果要再次运行安装向导: 恢复目录:siremis/install 删除文件:siremis/install.lock 至此,安装Siremis管理界面的操作全部完成了。
相关主题 |