...
Main manager options are in /usr/local/FlashphonerWebCallServer/conf/wcs-manager.properties file.
Setting | Default value | Description |
---|---|---|
spring.datasource.url | jdbc:h2:C:/tmp/wcs_manager;FILE_LOCK=NO | JDBC URL of the database |
spring.datasource.driverClassName | org.h2.Driver | Class of the database driver |
spring.datasource.database | org.hibernate.dialect.H2Dialect | SQL dialect used |
spring.datasource.username | admin | Username |
spring.datasource.password | admin | Password |
spring.datasource.ddlMode | update | Should the required tables be created in the database upon the first run create - create tables validate - do not create tables, validate integrity update - do not create tables, update the scheme |
spring.jpa.hibernate.ddl-auto | update | Automatically create and fill the database upon start: create - create validate - do not create, validate integrity update - do not create, update the scheme create-drop - create, drop tables in the end of the session |
spring.jpa.hibernate.naming_strategy | org.hibernate.cfg.ImprovedNamingStrategy | Table naming strategy in the database |
spring.jpa.database | H2 | Database dialect used |
spring.jpa.show-sql | true | Show SQL queries to the database. |
server.port | 9091 | The HTTP port, WCS Manager will respond to incoming HTTP requests to, including REST API requests. |
manager.enable_https | true | Enable HTTPS |
manager.https_port | 8888 | HTTPS port |
manager.keystore | wss.jks | SSL certificate store |
manager.keystore_password | password | Password to the SSL certificate store |
spring.profiles.active | dev | Active profile dev - if this profile is enabled, WCS Manager will listen for HTTP port and will not require authentication. production - if this profile is enabled, WCS Manager will listen for HTTPS port and will require Basic-authentication from incoming HTTPS connections. The profile can be redefined upon server startup as well as other settings. See the Startup options section. |
node_api.port | 1098 | Local WCS Core port WCS Manager will connect using the RMI interface to for data exchange. |
node_api.service_name | NodeApi | Name under which WCS Core is registered in the RMI register |
node_api.host | localhost | Host the RMI request is addressed to. |
rest_template.allow_self_signed | true | Accept self-signed certificated from the Web server when accessing the Web server via HTTPS/REST. |
shell.disabled-commands | autoconfig*,beans*,cron*,dashboard*,egrep*,endpoint*,env*,filter*,java*,jmx*,jul*,jvm*,jpa*,jdbc*,jndi*,less*,mail*,metrics*,shell*,sleep*,sort*,system*,thread*,repl* | Filters out unnecessary commands |
spring.main.show_banner | false | Show the banner |
node.enable_stdout | false | Enable logging of WCS Server to logs/server_stdout.log. /Can be used for debugging. |
sun.rmi.dgc.client.gcInterval | 36000000000 | Sets interval for the garbage collector for the RMI client, in milliseconds. This setting allows you to turn off forced execution of the garbage collector to increase performance of the server |
sun.rmi.dgc.server.gcInterval | 36000000000 | Sets interval for the garbage collector for the RMI server, in milliseconds. This setting allows you to turn off forced execution of the garbage collector to increase performance of the server |
stream_stat_persist_data | false | Record stream statistics to the database |
server.session-timeout | 10 | Session timeout, in minutes |
loggc | /usr/local/FlashphonerWebCallServer/logs/gc-manager- | Location and prefix of the log file of the garbage collector. The name is constructed as /usr/local/FlashphonerWebCallServer/logs/gc-manager-YYYY-MM-DD_HH-MM.log |
Settings file log4j.properties
...
The base is filled up with default values (users, groups, applications etc.) only if there is no a super-group record.
In all other cases the contents of the database remain intact.
...
Migrating to MySQL
...
Instead of the embedded H2 database you can use other databases, for example, MySQL.
...
MySQL installation and setup
Install MySQL (on CentOS 7 example) with command
Code Block | ||||
---|---|---|---|---|
| ||||
rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
yum install mysql-server |
Launch MySQL and set root password
Code Block | ||||
---|---|---|---|---|
| ||||
/sbin/service mysqld start
/usr/bin/mysqladmin -u root password 'rootpassword'
|
Log in to MySQL as root
Code Block | ||||
---|---|---|---|---|
| ||||
mysql -uroot -prootpassword |
Create database and user, grant to the user privileges to the database
Code Block | ||||
---|---|---|---|---|
| ||||
create database wcs_db;
create user 'webcallserver'@'localhost' identified by 'password';
grant all privileges on wcs_db.* to 'webcallserver'@'localhost'; |
WCS configuration
Add the following strings to wcs-manager.properties file
Code Block | ||||
---|---|---|---|---|
| ||||
spring-Dspring.datasource.url=jdbc:mysql://localhost/wcs_db spring-Dspring.datasource.driverClassName = com.mysql.jdbc.Driver spring-Dspring.datasource.database=org.hibernate.dialect.MySQL5Dialect spring-Dspring.datasource.username=userwebcallserver spring-Dspring.datasource.password=password |
Where
- 'wcs_db' is the database name
- 'webcallserver' and 'password' is user name and password
Restart WCS server
Code Block | ||||
---|---|---|---|---|
| ||||
service webcallserver restart |
Upon first startup of WCS, set spring.datasource.ddlMode=create in wcs-manager.properties. In this case all required tables will be created automatically. Upon a subsequent run, switch this setting to
...
language | bash |
---|---|
theme | RDark |
...
to spring.datasource.ddlMode=validate
...
. As a result connection to the existing database is performed without creating tables.
Data import from H2 to MySQL
Migrating from H2 to MySQL, data exported from H2 database can be imported to MySQL database::
a) using SQL script
Code Block | ||||
---|---|---|---|---|
| ||||
mysql -uroot -prootpassword wcs_db < wcs_h2_db.sql; |
b) loading data to tables from CSV files:
stop WCS server
Code Block | ||||
---|---|---|---|---|
| ||||
service webcallserver stop |
log in to MySQL
Code Block | ||||
---|---|---|---|---|
| ||||
mysql -uroot -prootpassword |
select database
Code Block | ||||
---|---|---|---|---|
| ||||
use wcs_db; |
load data from CSV file to existing table, e.g.,
Code Block | ||||
---|---|---|---|---|
| ||||
LOAD DATA INFILE "/var/lib/mysql-files/STREAM_INFO_3.csv"
REPLACE INTO TABLE stream_info_3
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 LINES; |
However, SQL script and CSV files generated by H2 are not fully compatible with MySQL and would have to be changed for importing. E.g., for table STREAM_INFO_3 it would be required to change Boolean values.