For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.
Create and configuring the database for Application Center with Ant tasks
If you did not manually create the database, we can use Ant tasks to create and configure your database for Application Center. If your database already exists, we can perform only the configuration steps with Ant tasks.
Before you begin
Make sure that a database management system (DBMS) is installed and running on a database server, which can be on the same computer, or a different one.
The Ant tasks for Application Center are in the ApplicationCenter/configuration-samples directory of the MobileFirst Server distribution.
If we want to start the Ant task from a computer where MobileFirst Server is not installed, we must copy the following files to that computer:
- The library mf_server_install_dir/MobileFirstServer/mfp-ant-deployer.jar
- The directory that contains binary files of the aapt program, from the Android SDK platform-tools package: mf_server_install_dir/ApplicationCenter/tools/android-sdk
- The Ant sample files that are in mf_server_install_dir/ApplicationCenter/configuration-samples
Note: The mf_server_install_dir placeholder represents the directory where you installed MobileFirst Server.
- If you did not create your database manually, as described in Optional creation of databases, follow steps 1 to 3.
- If your database already exists, we must create only the database tables. Follow steps 4 to 7.
Procedure
If you did not create your database manually, as described in Optional creation of databases, complete the following steps:
- Copy the sample Ant file that corresponds to our DBMS. The files for creating a database are named after the following pattern:
create-appcenter-database-<dbms>.xml
- Edit the Ant file, and replace the placeholder values with the properties at the beginning of the file.
- Run the following commands to create the Application Center database:
ant -f create-appcenter-database-<dbms>.xml databasesWe can find the Ant command in mf_server_install_dir/shortcuts.
If the database already exists, then we must create only the database tables by completing the following steps:
- Copy the sample Ant file that corresponds to both your application server, and your DBMS. The files for configuring an existing database are named after this pattern:
configure-appcenter-<appServer>-<dbms>.xml
- Edit the Ant file, and replace the placeholder values with the properties at the beginning of the file.
- Run the following commands to configure the database:
ant -f configure-appcenter-<appServer>-<dbms>.xml databasesWe can find the Ant command in mf_server_install_dir/shortcuts.
- Save the Ant file. You might need it later to apply a fix pack, or perform an upgrade.
For more information, see Deploy the Application Center Console and Services with Ant tasks.
If you do not want to save the passwords, we can replace them by "************" (12 stars) for interactive prompting.
What to do next
Follow the procedure at Deploy the Application Center Console and Services with Ant tasks.
See also:
Parent topic: Install the Application Center with Ant tasks