Skip to content
Arjen van Bochoven edited this page Dec 18, 2018 · 1 revision

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 with munki installed, a terminal (Terminal.app) and a web browser. It 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.

Note: make sure you have munki installed on your machine

Get munkireport

Visit https://github.com/munkireport/munkireport-php/releases/latest and scroll to the bottom of the page. Click on the 'munkireport-3.x.x.zip' Download 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-3/

Create the config file

MunkiReport needs a configuration file that contains all your local configuration items. For the demo we're creating a minimal configuration. Type:

echo "<?php \$conf['auth']['auth_noauth'] = [];" > config.php

to create a basic config file with no authentication

Initialize the database

To initialise the database, you first need to create an empty database file:

touch app/db/db.sqlite

then you need to run the migration script:

php database/migrate.php

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

Visit the website

Now you can visit http://localhost:8888

Configure the client

We're going to use your machine as client, type

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 managedsoftwareupdate

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 /usr/local/munki/munkilib/reportcommon.*
sudo rm /usr/local/munki/munkilib/purl.*
sudo rm /usr/local/munki/munkilib/phpserialize.* 
sudo rm -r /usr/local/munki/preflight*
sudo rm -r /usr/local/munki/postflight*
sudo rm /usr/local/munki/report_broken_client
sudo rm -f /usr/local/munki/smckit
sudo rm -rf /usr/local/munki/munkireport*
sudo rm /Library/Preferences/MunkiReport.plist
sudo pkgutil --forget com.github.munkireport
Clone this wiki locally