Creating the Jamf Pro Database Using the Jamf Pro Server Tools Command-Line Interface
This article explains how to create the Jamf Pro database using the Jamf Pro Server Tools command-line interface (CLI). The Jamf Pro web application stores its data in the Jamf Pro database and requires credentials for a user that has full access to that database.
-
The Jamf Pro Server Tools CLI can still be used when Jamf Pro and MySQL are installed on different servers. However, it may be necessary to install the CLI on all servers. The appropriate settings will need to be set with the CLI on each server.
-
It is recommended that Jamf Pro be installed before the Jamf Pro database is created. The advantage is that the Jamf Pro Server Tools CLI is installed with the Jamf Pro installer. The CLI simplifies the process of creating the database as opposed to creating the database manually. In addition, while the Jamf Pro database can be created and configured before Jamf Pro is installed, the Jamf Pro-to-MySQL connection information cannot be configured until after Jamf Pro is installed.
Creating the Jamf Pro database and configuring the connection information involves the following steps:
-
Verifying the Jamf Pro Server Tools CLI Version
-
Creating the Jamf Pro Database and MySQL User Account
-
Configuring MySQL
-
Verifying Settings
-
Restarting the Services
-
Accessing Jamf Pro
Red Hat Enterprise Linux:
sudo jamf-pro ...
commands provided below return a "command not found" error, make sure the CLI is accessible from the root path by executing the following command:sudo ln -s /usr/local/bin/jamf-pro /bin/jamf-pro
General Requirements
MySQL should already be installed and running on the target server. For more information, see the Installing Java and MySQL for Jamf Pro 10.14.0 or Later article.
Step 1: Verifying the Jamf Pro Server Tools CLI Version
Step 2: Creating the Jamf Pro Database and MySQL User Account
Step 3: Configuring MySQL
Configuration changes are made in the MySQL configuration file: my.cnf
(Linux and macOS) or my.ini
(Windows).
- Creating the my.cnf File on macOS
- On macOS with MySQL 5.7.18 or later, the MySQL configuration file (
my.cnf
) does not get created by default. To determine if themy.cnf
file can be found by the Jamf Pro Server Tools CLI, execute the following command:sudo jamf-pro database config list
An error like the following indicates that themy.cnf
file could not be found:Error: MySQL config file not found in any of these locations: /etc /etc/mysql /usr/local/mysql /usr/local/mysql/etc Use 'jamf-pro config set --mysql-home "<path>"' to specify your custom installation folder
To provide a path to themy.cnf
file (if it exists in a non-standard location), use the command suggested in the error message (where<path>
is the path to themy.cnf
file):jamf-pro config set --mysql-home "<path>"
To create amy.cnf
file, execute a command similar to the following using your preferred path:sudo touch /etc/my.cnf
For a complete list of MySQL-supported paths, see the following webpage: https://dev.mysql.com/doc/refman/8.0/en/option-files.html
Step 4: Verifying Settings
Step 5: Restarting the Services
Step 6: Accessing Jamf Pro
Access Jamf Pro by opening a web browser and typing the protocol, IP address or hostname of the server, and port. For example: https://jamfpro.mycompany.com:8443/