Pinba Tutorial - andreydiveev/wiki GitHub Wiki

Debian 8:

# apt-get install cmake libncurses5-dev libevent-dev libjudy-dev curl libcurl3 libcurl3-dev php5-curl dpkg-dev mc git automake libtool libmysqlclient-dev build-essential protobuf-compiler libmysqlclient-dev libjudydebian1 libevent-dev libjudy-dev git libevent-2.0-5 libtool libevent-core-2.0-5 libevent-extra-2.0-5 libevent-openssl-2.0-5 libevent-pthreads-2.0-5 libprotobuf-dev php5-mysql nginx php5-fpm php5-pinba
# apt-get install mysql-server
# command git clone 'https://github.com/tony2001/pinba_engine' '/tmp/pinba_engine'
# command pushd '/tmp'
# command apt-get source mysql-server
# command popd
# MYSQL_SOURCES="$(command find '/tmp' -maxdepth 1 -type d -name 'mysql-*')"
# command cp '/usr/include/mysql/mysql_version.h' "${MYSQL_SOURCES}/include"
# command cp '/usr/include/mysql/my_config.h' "${MYSQL_SOURCES}/include"
# OPTIONS="$(VISUAL="$(command which 'cat')" command mysqlbug | command grep 'Configured with' | command sed -e 's/.*configure -v //')"
# command pushd '/tmp/pinba_engine'
# ./buildconf.sh
# command bash -c "./configure ${OPTIONS} --with-mysql='${MYSQL_SOURCES}' --with-judy --with-protobuf --with-event --libdir='/usr/lib/mysql/plugin/'"
# command make
# command make install
# command popd
# command mysql --execute="INSTALL PLUGIN pinba SONAME 'libpinba_engine.so';" --user=root -p
# command mysql --execute="CREATE DATABASE pinba DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci;" --user=root -p
# command mysql -p --user=root 'pinba' < '/tmp/pinba_engine/default_tables.sql'
# command wget 'https://raw.github.com/biapy/howto.biapy.com/master/mysql/pinba.cnf' --quiet --no-check-certificate --output-document='/etc/mysql/conf.d/pinba.cnf'
# CURRENT_IPV4=$(/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{print $1}')
# sed -i "s/pinba_address = 127.0.0.1/pinba_address = $CURRENT_IPV4/g" /etc/mysql/conf.d/pinba.cnf
# service mysql restart
# cd ~/
# curl -sS https://getcomposer.org/installer | php
# cd /var/www/
# git clone git://github.com/intaro/pinboard.git
# cd pinboard/
# php ~/composer.phar install
# ./console migrations:migrate
# ./console register-crontab
# mcedit /etc/nginx/sites-available/pinboard.conf
# ln -s /etc/nginx/sites-available/pinboard.conf /etc/nginx/sites-enabled/pinboard.conf
# rm /etc/nginx/sites-enabled/default
# service nginx restart
# sed -i "s/cache: apc/cache: array/g" /var/www/pinboard/config/parameters.yml
# ./console aggregate