Installing Blackfire should take less than 5 minutes and this document will guide you through the steps:
If you get stuck in the process, have a look at the Troubleshooting section or contact our support.
Before starting, it's important to understand the main components of Blackfire.
Before installing Blackfire, make sure that your system meets these technical requirements:
Quick Links:
Blackfire uses a custom Debian repository to distribute its packages; it is compatible with most Debian-based distributions like Ubuntu and Linux-Mint.
wget -O - https://packagecloud.io/gpg.key | sudo apt-key add -
deb http://packages.blackfire.io/debian any main to
/etc/apt/sources.list.d/blackfire.list:echo "deb http://packages.blackfire.io/debian any main" | sudo tee /etc/apt/sources.list.d/blackfire.list
sudo apt-get update
blackfire-agent package:sudo apt-get install blackfire-agent
sudo blackfire-agent -register
This command will ask for your Blackfire server credentials, log in or sign up now:
or Sign Up
/etc/init.d/blackfire-agent
service was created to start, stop, and restart it.sudo /etc/init.d/blackfire-agent restart
If something goes wrong, check out the log file generated by
default in /var/log/blackfire/agent.log
(you can changethe log file and the log level in the
agent configuration.)
blackfire-agent package:sudo apt-get install blackfire-agent
config command to initialize the client:blackfire config
This command will ask for your Blackfire client credentials, log in or sign up now:
or Sign Up
To profile from your browser, install the Google Chrome extension.
blackfire-php package:sudo apt-get install blackfire-php
To debug problems, you can change the log level and the log file in the probe configuration.
Please note that PHP compiled with debug are not supported
and that the Probe may conflict with XDebug or
XHProf; disable those extensions when enabling the Probe.
The Probe conflicts with some PHP extensions like Pinba.
Support for ZTS versions of PHP on MacOS X is
currently in beta.
Quick Links:
Blackfire uses a custom Red Hat repository to distribute its packages; it is compatible with most Red Hat-based distributions like Fedora and CentOS.
pygpgme package used to verify GPG signatures:sudo yum install pygpgme
wget -O - "http://packages.blackfire.io/fedora/blackfire.repo" | sudo tee /etc/yum.repos.d/blackfire.repo
With old releases, you can encounter the following message
Gpg Keys not imported, cannot verify repomd.xml for repo blackfire
This is often due to the lack of pygpgme on those platforms
and can be fixed by editing /etc/yum.repos.d/blackfire.repo
and changing the value of repo_gpgcheck to 0
blackfire-agent package:sudo yum install blackfire-agent
sudo blackfire-agent -register
This command will ask for your Blackfire server credentials, log in or sign up now:
or Sign Up
/etc/init.d/blackfire-agent
service was created to start, stop, and restart it.sudo /etc/init.d/blackfire-agent restart
If something goes wrong, check out the log file generated by
default in /var/log/blackfire/agent.log
(you can changethe log file and the log level in the
agent configuration.)
blackfire-agent package:sudo yum install blackfire-agent
config command to initialize the client:blackfire config
This command will ask for your Blackfire client credentials, log in or sign up now:
or Sign Up
To profile from your browser, install the Google Chrome extension.
blackfire-php package:sudo yum install blackfire-php
To debug problems, you can change the log level and the log file in the probe configuration.
Please note that PHP compiled with debug are not supported
and that the Probe may conflict with XDebug or
XHProf; disable those extensions when enabling the Probe.
The Probe conflicts with some PHP extensions like Pinba.
Support for ZTS versions of PHP on MacOS X is
currently in beta.
Quick Links:
Blackfire provides a homebrew tap to distribute its packages. Make sure
that you have brew installed in your system or download and install it.
brew tap blackfireio/homebrew-blackfire
If you are not using Homebrew and don't want to install Homebrew, use the manual install procedures.
blackfire-agent package:brew install blackfire-agent
sudo blackfire-agent -register
This command will ask for your Blackfire server credentials, log in or sign up now:
or Sign Up
blackfire-agent service:ln -sfv /usr/local/opt/blackfire-agent/*.plist ~/Library/LaunchAgents
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.blackfire-agent.plist
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.blackfire-agent.plist
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.blackfire-agent.plist
If something goes wrong, check out the log file generated by
default in /usr/local/var/log/blackfire/agent.log
(you can changethe log file and the log level in the
agent configuration.)
blackfire-agent package:brew install blackfire-agent
config command to initialize the client:blackfire config
This command will ask for your Blackfire client credentials, log in or sign up now:
or Sign Up
To profile from your browser, install the Google Chrome extension.
If you use Homebrew-PHP, execute
the command below replacing 56 by the installed PHP version:
brew install blackfire-php56
When using a PHP different than the one shipped with MacOS X, please
ensure the php binary from your PATH is the one you want
to use Blackfire on.
For example if you are using MAMP, when you run
which php, the path returned should mention MAMP.
Please also note you may have to edit two php.ini files, one for the web and one for the command line.
For MAMP Pro users, please note that you should not directly edit the php.ini file used in web mode. Instead you need to edit the template from the MAMP Pro interface.
Execute the command below replacing 56 by the installed PHP version
and follow the instructions in the command output:
brew install blackfire-php56 --without-homebrew-php
Append -zts on package name:
brew install blackfire-php56-zts
To debug problems, you can change the log level and the log file in the probe configuration.
Please note that PHP compiled with debug are not supported
and that the Probe may conflict with XDebug or
XHProf; disable those extensions when enabling the Probe.
The Probe conflicts with some PHP extensions like Pinba.
Support for ZTS versions of PHP on MacOS X is
currently in beta.
In order to be able to use the blackfire curl command,
you need to have curl.exe installed on your system and
available in your PATH environment variable.
You can download it on the
official cURL website.
blackfire-agent.exe and blackfire.exe files to a directory
(e.g. C:\Programs\Blackfire) and add it to your PATH environment variable.
blackfire-agent -register
This command will ask for your Blackfire server credentials, log in or sign up now:
or Sign Up
blackfire-agent.exe command.
blackfire-agent.exe and blackfire.exe files to a directory
(e.g. C:\Programs\Blackfire) and add it to your PATH environment variable.
config command to initialize the client:blackfire config
This command will ask for your Blackfire client credentials, log in or sign up now:
or Sign Up
To profile from your browser, install the Google Chrome extension.
<?php echo 'packages.blackfire.io/binaries/blackfire-php/1.14.1/blackfire-php-windows_x'.(PHP_INT_SIZE-4?64:86).'-php-'.(10*PHP_VERSION).(PHP_ZTS?'':'_nts').'.dll';
php -i | grep 'extension_dir'
When using a PHP different than the one of your server, please
ensure the php binary from your PATH is the one you want
to use Blackfire on.
blackfire[...].dll corresponding to your PHP version and architecture to this directory.
To debug problems, you can change the log level and the log file in the probe configuration.
Please note that PHP compiled with debug are not supported
and that the Probe may conflict with XDebug or
XHProf; disable those extensions when enabling the Probe.
The Probe conflicts with some PHP extensions like Pinba.
Support for ZTS versions of PHP on MacOS X is
currently in beta.
In order to be able to use the blackfire curl command,
you need to have curl installed on your system and
available in your PATH.
Please use the manual installation procedure.
config command to initialize the client:blackfire config
This command will ask for your Blackfire client credentials, log in or sign up now:
or Sign Up
To profile from your browser, install the Google Chrome extension.
Please use the manual installation procedure.
Blackfire is natively available on many platforms; Configuration is easier for them:
Besides supporting traditional way of installing Blackfire, you might be interested in the integrations with the following tools:
If you need to install the stack manually because every other
installation methods failed,
please contact us
and mention your platform and PHP version.
In the meantime, continue the following steps and you will be guided through manual installation.
You are strongly advised to use the other installation methods available if possible as they give you seamless upgrade methods.
blackfire-agent file to a directory in
your path (e.g. /usr/local/bin) and make the file
executable.
sudo blackfire-agent -register
This command will ask for your Blackfire server credentials, log in or sign up now:
or Sign Up
You can manually launch the agent each time you want to profile a page
or a script by using blackfire-agent, but it is better to
register a service in order to have it launched automatically and avoid
any troubles.
Please refer to your OS documentation to determine how to register a service (eg. using upstart, init.d, systemd or launchtl.)
If something goes wrong, check out the log file generated by
default in /var/log/blackfire/agent.log
(you can changethe log file and the log level in the
agent configuration.)
config command to initialize the client:blackfire config
This command will ask for your Blackfire client credentials, log in or sign up now:
or Sign Up
To profile from your browser, install the Google Chrome extension.
php -i | grep 'extension_dir'
When using a PHP different than the one shipped with MacOS X, please
ensure the php binary from your PATH is the one you want
to use Blackfire on.
For example if you are using MAMP on MacOS X, when you run
which php, the path returned should mention MAMP.
Please also note you may have to edit two php.ini files, one for the web and one for the command line.
For MAMP Pro users, please note that you should not directly edit the php.ini file used in web mode. Instead you need to edit the template from the MAMP Pro interface.
blackfire.so file to this directory.
On Linux systems, check that the /var/run/blackfire/
directory exists and is accessible by both the Agent and the Probe.
For MacOS users, check that the /usr/local/var/run/
directory exists and is accessible by both the Agent and the Probe.
To debug problems, you can change the log level and the log file in the probe configuration.
Please note that PHP compiled with debug are not supported
and that the Probe may conflict with XDebug or
XHProf; disable those extensions when enabling the Probe.
The Probe conflicts with some PHP extensions like Pinba.
Support for ZTS versions of PHP on MacOS X is
currently in beta.