logo

Installing Zoook on Ubuntu

Installing Zoook on Ubuntu Part 1

Apache and PostgreSQL

Installing Zoook on Ubuntu Part 1

Puede disponer del Artículo: Installing Zoook on Ubuntu Part 1 también en Castellano.

What is Zoook?

Zoook is a web shop canal developed by Zikzak Media.

It is based on Django and is to 100% compatible with OpenERP without any connectors. The orders, the stock, postage and prices (to list just a few features) come straight from OpenERP.

Whar are we going to install?

  • Apache 2
  • PostgreSQL 9.11
  • pgAdmin3 1.14.0
  • Python 2.7
  • the mod_wsgi module for Apache 2
  • Zoook.

In this series of articles we are going into the details of how to install Zoook on Ubuntu 11.00.

The aim of these articles is to document the steps to implement a Zoook in a development as well as in an actual production environment and to give the user the solutions to possible problems that can come up during the installation and configuration process.

The whole process it is going to be split up into four parts with this one being the first explaining how to set up Apache 2 and PostgreSQL.

1 Install Apache 2 (production environment)

Django incorporates a server for development environments that is recommended to use as it simplifies the debugging process. So this step is not needed in development environments.

To install Apache 2 open up a terminal and execute:

$ sudo apt-get install apache2

2 Install PostgreSQL

Python as well as Apache support various database back ends. But, this article is centred on the usage of PostgreSQL.

To install PostgreSQL execute:

$ sudo apt-get install postgresql

3 Install pgAdmin3

The next step is to install pgAdmin3. A graphical interface to PostgreSQL that makes the management of the PostgreSQL server easier. Actually the last available version is 1.14.0. But, in the repository of Ubuntu is only te version 1.12.3-1.

3.1 Installation from the repositories

To install the version 1.12.3-1 from the repositories:

$ sudo apt-get install pgadmin3

3.2 Compilation and Installation of the source code

If you prefer to install the last version, you have to fetch the source code and compile it. Download the source and unpack it:

$ tar xvzf pgadmin3-1.14.0.tar.gz

Change to the directory where you unpacked it:

$ cd pgadmin3-1.14.0

Before you can install it make sure that all the dependencies are satisfied:

$ sudo apt-get install build-essential libwxgtk2.8-dev libxml2-dev 
 libxslt1-dev  libgtk2.0-dev

After this execute

$ ./configure

The next step would be to execute make. But, if you do that now it’ll raise the error:

./db/keywords.c:33:34: error: parser/kwlist.h: No such file or directory

This error is produced because there is a bug in the PostgreSQL constructor that misses to install the necessary file in the appropriate directory. To solve this you have to download this file and create the directory /usr/include/postgresql/parser:

$ sudo mkdir -p /usr/include/postgresql/parser

Move the downloaded archive to this directory:

$ sudo mv kwlist.h /usr/include/postgresql/parser

Now, you can execute

$ make

and afterwards

$ make install

The installation should have succeed correctly.

Additionally create a symbolic link to the pgadmin3 executable:

$ sudo ln -s /usr/local/pgadmin3/bin/pgadmin3 /usr/local/bin/pgadmin3

This way you can execute it via:

$ pgadmin3

instead of:

$ /usr/local/bin/pgadmin3

4 Configure PostgreSQL user

PostgreSQL has the default setting ident sameuser for local connections. This permits a system user to access the same account on the SQL server. For this reason you have to create a new user on the SQL server with the same name under which the server is running.

$ sudo -u postgres createuser --superuser YOUR_USER_NAME
$ sudo -u postgres psql
postgres=# password YOUR_USER_NAME

Re-initiate the Apache server after all these changes:

$ sudo /etc/init.d/apache2 restart

Now the system is set up to continue with the following steps to install Python, Django, mod_wsgi and Zoook.

Read more http://www.domatix.com/installing-zoook-on-ubuntu-part-i-apache-and-postgresql

You could find more information in our web relacionated whit installing Zoook on Ubuntu Part 1: https://openerpspain.com/odoo/