postgresql etiketli yazı

PostgreSQL 10’u 12’ye güncelleme

Notebook'umda kullandığım PostgreSQL 10 sürümü veritabanıdağıtımını sonunda 12 sürümüne çekme kararı verdim. Daha önce kullandığım işletim sistemi emrivaki yapıp 12 sürümünü yükledikten sonra güncellemeyi de kendin yap diyince, acil işim olduğundan kurulan 12 sürümünü pruge edip 10 sürümünden devam etmiştim. Devamı...

Preparing virtual environment for running with apache mod_wsgi & postgresql

For completing postgresql requirements of virtual environment, install “libpq-dev” and “python-dev” packages, outside of virtual environment.

$ deactivate (if you are in virtual environment)
$ sudo apt-get install libpq-dev python-dev

Re-activate virtual environment and install psycopg2 from pip repo.

$ pip install psycopg2

By the way, in the name of  conformist approach install ipython in virtual environment.

$ pip install ipython

PostgreSQL engine and python connection libraries are ready.
Now, lets prepare wsgi file for current project. (I assumed apache and mod_wsgi installed and configured) I’m going to use /var/www/project path for example for environment root in wsgi file.

ENV_DIR = [‘/var/www/project’]

import site, os, sys

base = os.path.dirname(__file__)
sys.path.insert(0, base)
...

Devamı...

squeeze/sid'e PostgeSQL entegreli eJabberD kurulumu

apt-get install ejabberd postgresql

mkdir ejabberd-modules
:~$ svn checkout http://svn.process-one.net/ejabberd-modules ejabberd-modules
:~$ cd ejabberd-modules/pgsql/trunk
:~/ejabberd-modules/pgsql/trunk$ ./build.sh
:~/ejabberd-modules/pgsql/trunk$ cd ebin
:~/ejabberd-modules/pgsql/trunk/ebin$ sudo cp * /usr/lib/ejabberd/ebin/
:~/ejabberd-modules/pgsql/trunk/ebin$ cd ~/
:~$ wget http://svn.process-one.net/ejabberd/tags/ejabberd-2.1.2/src/odbc/pg.sql

:~$ sudo su postgres -c psql template1
Welcome to psql 8.2.7, the PostgreSQL interactive terminal. Type: copyright for distribution terms h for help with SQL commands ? for help with psql commands g or terminate with semicolon to execute query q to quit
postgres=# ALTER USER postgres WITH PASSWORD ‘my_postgres_user_password_here’;
ALTER ROLE
...

Devamı...