Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install Blackfire on Debian/Ubuntu
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
# Register the packagecloud key
wget -O - https://packagecloud.io/gpg.key | sudo apt-key add -
# 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
# Update the repositories
apt-get update
# Install the blackfire-agent package and install the PHP Probe
apt-get install blackfire-agent blackfire-php -y
# Configure your Blackfire credentials
blackfire-agent -register
# Restart the service
/etc/init.d/blackfire-agent restart
# Initialize the client
blackfire config
echo extension=/usr/lib/blackfire-php/amd64/blackfire-20151012.so >> /etc/php/7.0/cli/php.ini
echo extension=/usr/lib/blackfire-php/amd64/blackfire-20151012.so >> /etc/php/7.0/fpm/php.ini
# Restart some services
service php7.0-fpm restart
service nginx restart
@pascalbaljet

This comment has been minimized.

Copy link
Owner Author

@pascalbaljet pascalbaljet commented Feb 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment