Skip to content
Alex Narvey edited this page Jul 7, 2024 · 15 revisions

You can run a quick demo on your local machine to see what MunkiReport is all about. The only thing you need is a macOS machine, php, a terminal (Terminal.app) and a web browser. The demo uses the built-in web server of php, which is not very secure or robust but will suffice for the purpose of a quick demonstration and for development purposes.

Get MunkiReport

Visit https://github.com/munkireport/munkireport-php/releases/latest and scroll to the bottom of the page. Click on the munkireport-5.x.x.zip download link to get the latest version. Unpack the zip file (if the browser didn't do that for you).

Get into the terminal

Open Terminal.app (it's in the /Applications/Utilities folder). In the terminal window, we need to step inside the downloaded MunkiReport folder. Type

cd ~/Downloads/munkireport-php-v5/

Create the config file

MunkiReport uses a configuration file that contains all your settings. The filename is .env. For the demo we're creating a minimal configuration. Type:

echo 'AUTH_METHODS="NOAUTH"' > .env

to create a basic config file with no authentication

Initialize the database

To initialise the database, you need to run the migration script:

./please migrate

Start the development server

Now we can start the web server. Type:

php -S localhost:8888 --docroot public

This will start the php development server on port 8888

Leave that running, and open a new Terminal window (or tab) to follow the rest of this tutorial.

Visit the website

Now you can visit http://localhost:8888

Configure the client

We're going to use your machine as the client.

First download and install version 3.10 of Mac Admins Python that can be found on this page: https://github.com/macadmins/python/releases/tag/v3.10.11.80742 For details see the Client Setup page: https://github.com/munkireport/munkireport-php/wiki/Client-setup

In Terminal run:

sudo /bin/bash -c "$(curl -s 'http://localhost:8888/index.php?/install')"

This will install and configure MunkiReport on your local machine. Now run:

sudo /usr/local/munkireport/munkireport-runner

to populate your MunkiReport server with client data

Stop the server

If you want to stop the server, type Ctrl-C to quit

Uninstall MunkiReport

To uninstall MunkiReport just remove the installed files:

sudo rm -r /usr/local/munkireport/
sudo rm /usr/local/munki/postflight
sudo rm /usr/local/munki/report_broken_client
sudo rm /Library/Preferences/MunkiReport.plist
sudo rm -r /Library/MunkiReport
sudo rm /Library/LaunchDaemons/com.github.munkireport.runner.plist
sudo pkgutil --forget com.github.munkireport
Clone this wiki locally