Skip to content

Instantly share code, notes, and snippets.

@johnfelipe
Last active August 29, 2015 14:16
Show Gist options
  • Save johnfelipe/7bc3847f57e196fbd87f to your computer and use it in GitHub Desktop.
Save johnfelipe/7bc3847f57e196fbd87f to your computer and use it in GitHub Desktop.
kohovolit.md

Installation

#. Install elasticsearch_:

    $ cd /tmp
    $ sudo wget -qO - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add -
    $ sudo echo 'deb http://packages.elasticsearch.org/elasticsearch/1.4/debian stable main' | sudo tee /etc/apt/sources.list.d/elasticsearch.list
    $ sudo apt-get update
    $ sudo apt-get install elasticsearch

Set its automatic start on system bootup:

    $ sudo update-rc.d elasticsearch defaults 95 10

and restart system:

    $ sudo reboot

#. Install PostgreSQL_:

    $ sudo apt-get install postgresql postgresql-server-dev-9.3

#. Install packages needed for thumbnails to work correctly (needed by Pillow used by Django easy_thumbnail application):

    $ sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk

#. Install sayit.parldata.eu repository into a virtual environment:

    $ sudo apt-get install python-virtualenv

posibles

    $ sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev
    $ sudo apt-get install python-dateutil python-docutils python-feedparser python-gdata python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid python-psycopg2 python-psutil python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-unittest2 python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi

Necesarios

    $ sudo apt-get install python-dev  libevent-dev libffi-dev libffi-dev yui-compressor libxml2-dev libxslt1-dev python-dev python-lxml git
    $ cd /home/
    $ sudo mkdir projects
    $ cd projects/
    $ sudo virtualenv /home/projects/.virtualenvs/sayit --no-site-packages
    $ source /home/projects/.virtualenvs/sayit/bin/activate
    (sayit)$ sudo git clone https://github.com/KohoVolit/sayit.parldata.eu.git sayit
    (sayit)$ cd /home/projects/sayit
    (sayit)$ sudo wget -P sayit_parldata_eu/importers https://raw.githubusercontent.com/KohoVolit/api.parldata.eu/master/client/vpapi.py
    (sayit)$ sudo wget -P sayit_parldata_eu/importers https://raw.githubusercontent.com/KohoVolit/api.parldata.eu/master/client/server_cert.pem
    (sayit)$ sudo pip install -r requirements.txt

Create a PostgreSQL user (with a real password instead of the example one):

    $ sudo -u postgres psql

postgres=#

    CREATE USER sayit WITH password 'sayit';

Create a file with private settings and adjust its content:

    $ cp conf/private-example.yml conf/private.yml

#. Set-up Apache configuration:

    $ sudo mkdir /var/www/sayit.parldata.eu
    $ sudo chown :www-data /var/www/sayit.parldata.eu
    $ sudo chmod g+w /var/www/sayit.parldata.eu
    $ cp /home/projects/sayit/sayit.parldata.eu-example.conf /etc/apache2/sites-available/sayit.parldata.eu.conf
    $ sudo mkdir /var/log/apache2/sayit.parldata.eu
    $ sudo a2ensite sayit.parldata.eu
    $ sudo service apache2 reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment