Disu

De MochilaWiki
Ir para navegaçãoIr para pesquisar

Disu significado olho em Kimbundo

testes em ubuntu 14.04

instalando pyicecastlogreader

dependencias via apt

apt-get install libyaml-dev build-essential python-sqlalchemy python-psycopg2 python-pip python-dev python-yaml

dependencias via pip

pip install ua-parser user-agents apachelog

instalando postgresql

# apt-get install postgresql

colocando senha no usuario postgresql

# su - postgres
$ psql postgres
postgres=# alter user postgres with encrypted password '123456';

ajustando permisses externas no postgresql

echo "listen_addresses = '*'" >>  /etc/postgresql/9.3/main/postgresql.conf
echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf
/etc/init.d/postgresql restart

restaurando a base log e d_date pro pyicecastlogreader

createdb -h localhost -p 5432 -U postgres log
psql --host localhost --port 5432 --username "postgres" --password --dbname "log" -f /tmp/log.sql
pg_restore --host localhost --port 5432 --username "postgres" --password --dbname "log" --verbose "/tmp/d_date"

rodando pyicecastlogreader

python pyicecastlogreader.py --arquivo /var/log/icecast/access.log

instalando dependencias pro painel

apt-get install php5-pgsql apache2 libapache2-mod-php5

usando