README.md 2.93 KB
Newer Older
1 2 3
### 1. Install RPM package with dependencies
--------------------------------------------

4
RPM package should install necessary dependencies automatically.
5

6
`yum install bc-flexisip-account-manager`
7

8 9
This package depends on `rh-php71` which will be installed in `/opt/rh/rh-php71/`.
If you don't have any other php installed on your server, use the following to be able to use php commands:
10

11
`ln -s /opt/rh/rh-php71/root/usr/bin/php /usr/bin/php`
12

13 14
### 2. Configure Apache server
------------------------------
15

16
The RPM will create a `flexisip-account-manager.conf` file inside `/opt/rh/httpd24/root/etc/httpd/conf.d/`
17

18
It simply contains an Alias directive, up to you to configure your virtual host correctly.
19

20
Once you're done, reload the configuration inside httpd: `service httpd24-httpd reload`
21 22 23 24

### 3. Install and setup MySQL database
---------------------------------------

25
For the account manager to work, you need a mysql database with a user that has read/write access.
26 27 28 29

### 4. Configure XMLRPC server
------------------------------

30
The RPM package has installed the configuration files in `/etc/flexisip-account-manager/`
31

32 33
Each file name should be explicit on which settings it contains. If you have any doubt, leave the default value.
At least you MUST edit the following file and fill the values you used in previous step:
34

35
`nano /etc/flexisip-account-manager/db.conf`
36

37
Now you can create the necessary tables in the database using our script:
38

39
`php /opt/belledonne-communications/share/flexisip-account-manager/tools/create_tables.php`
40

41
### 5. Install OVH SMS gateway dependency (optionnal)
42

43
To install OVH SMS PHP API create a `composer.json` file in `/opt/belledonne-communications/`:
44

45
`echo '{ "name": "XMLRPC SMS API", "description": "XMLRPC SMS API", "require": { "ovh/php-ovh-sms": "dev-master" } }' > /opt/belledonne-communications/share/flexisip-account-manager/composer.json`
46

47
Then download and install [composer](https://getcomposer.org/download/).
48

49
Finally start composer:
50

51
`cd /opt/belledonne-communications/share/flexisip-account-manager/ && composer install`
52

53 54
### 6. Miscellaneous
--------------------
55

56 57
- For remote provisioning create a `default.rc` file in `/opt/belledonne-communications/` and set the values you want
client side, set the provisioning uri to the same host but to `provisioning.php` instead of `xmlrpc.php`.
58

59 60
- If SELinux forbids mail sending you can try this command:
`setsebool -P httpd_can_sendmail=1`
61

62 63
- On CentOS firewalld might be running:
`firewall-cmd --state`
64

65 66
- If it is running you can add a rule to allow https traffic:
`firewall-cmd --zone public --permanent --add-port=444/tcp && firewall-cmd --reload`
67

68 69
- If you use the standard https port (443) or http (80) the following command might be better:
`firewall-cmd --zone public --permanent --add-service={http,https} && firewall-cmd --reload`
70

71 72
- Also it can listen on IPv6 only.
To fix that, edit `/opt/rh/httpd24/root/etc/httpd/conf.d/ssl.conf` and add/set: `Listen 0.0.0.0:444 https`
73