General Server Configurations
Follow the instructions below to configure general server configurations:
- Install MySQL.
sudo apt-get install mysql-server mysql-client
- Set the MySQL root password.
- Start the MySQL service.
sudo /etc/init.d/mysql start
Log in to the MySQL client as the root user
mysql -u root -p
You will be prompted to enter the password. In most systems, the default root password is blank. Press Enter without typing anything, if you have not changed the default root password.
In the MySQL prompt, create the database.
create database EMM_DB;
Give authorization for the database to the admin user as follows. Thereafter, exit the MySQL Console.
GRANT ALL ON EMM_DB.* TO admin@localhost IDENTIFIED BY "<MYSQL ADMIN PASSWORD>";
Run the MySQL scripts as follows:
mysql -u admin -p -DEMM_DB < <PRODUCT_HOME>/dbscripts/emm_mysql.sql;
Download the MySQL connector for Java, from http://dev.mysql.com/downloads/connector/j/Â and copy the JAR file downloaded to theÂ
<PRODUCT_HOME>/repository/components/lib
 directory.Update the following configuration (i.e., username, password, and more) in the
master-datasources.xml
 file, which is in theÂ<PRODUCT_HOME>/repository/confg/datasourcesÂ
directory.<datasource> <name>EMM_DB</name> <description>The datasource used for EMM</description> <jndiConfig> <name>jdbc/emmdb</name> </jndiConfig> <definition type="RDBMS"> <configuration> <url>jdbc:mysql://localhost:3306/EMM_DB</url> <username>[MySQL username]</username> <password>[MySQL password]</password> <driverClassName>com.mysql.jdbc.Driver</driverClassName> <maxActive>50</maxActive> <maxWait>60000</maxWait> <testOnBorrow>true</testOnBorrow> <validationQuery>SELECT 1</validationQuery> <validationInterval>30000</validationInterval> </configuration> </definition> </datasource>
Configure the email parameters as follows:
Create the
config.json
 file using the template in theÂ<PRODUCT_HOME>/repository/deployment/server/jaggeryapps/mdm/config/tempConfigs/
 directory. Add it inside the<PRODUCT_HOME>/repository/deployment/server/jaggeryapps/mdm/config/
directory and configure the email parameters.Copy the Â
config.json
 andÂui.json
  files, which are in theÂ<PRODUCT_HOME>/repository/deployment/server/jaggeryapps/mam/config/tempConfigs/
 directory, to theÂ<PRODUCT_HOME>/repository/deployment/server/jaggeryapps/mam/config/
 directory and configure the email parameters.Rename the
mam-config.json.temp
file, which is in theÂ<PRODUCT_HOME>/repository/deployment/server/jaggeryapps/publisher/config/
 directory, toÂmam-config.json
 and configure the email parameters.
Configure the
monitor_interval
parameter in theÂconfig.json
file, which is in theÂ<PRODUCT_HOME>/repository/deployment/server/jaggeryapps/mdm/config/
 directory. Specify this value in minutes. The EMM server uses this parameter to determine how often the devices enrolled with MDM need to be monitored.
For example:
"monitor_interv al" : "2"Â
Based on the nature of the environment as described in the table below, replace the parameters in the following files:Â
<PRODUCT_HOME>/repository/deployment/server/jaggeryapps/mdm/config/config.json
<PRODUCT_HOME>/repository/deployment/server/jaggeryapps/mam/config/config.jsonÂ
<PRODUCT_HOME>/repository/deployment/server/jaggeryapps/publisher/config/publisher.json
<PRODUCT_HOME>/repository/deployment/server/jaggeryapps/store/config/store.json
Environment Parameters Development "
%https.ip%"Â
"
%http.ip%"
Deployment "
%https.host%"
"%http.host%"
The IP address will be automatically fetched from the WSO2 Carbon server.
Navigate to the
sso-idp-config.xml
file, which is in the<PRODUCT_HOME>/repository/conf
 directory and modify the ‘localhost’ to one of the following:Server IP - if working in a testing environment.
Domain - if working in a production environment.Â
For a production deployment uncomment the following code in the
carbon.xml
 file, which is in theÂ<PRODUCT_HOME>/repository/conf
 directory and enter your organization domain.<HostName>www.wso2.org</HostName> <MgtHostName>www.wso2.org</MgtHostName>
- By default, an Identity Provider (IdP) has been bundled with the EMM binary pack. Modify the ‘host’ to the Server IP if you wish to use this default IdP. If you wish to use your own IdP, modify the ‘host’ to the IdP.
- Create a folder, with a name of your choice
<FOLDER_NAME>
, in theÂ<PRODUCT_HOME>/repository/deployment/server/jaggeryapps/publisher
 directory. Add the newly created folder name, as the
filePreciseLocation
element value, in themam-config.json
 file, which is in the<PRODUCT_HOME>/repository/deployment/server/jaggeryapps/publisher/config
 directory.{ 'filePreciseLocation': "/upload/", "email": { "companyName": "", "senderAddress": "", "emailPassword": "", } }