wiki:Installation

Before the install

There are some things that you should understand in order to know what do you do and why. Thiblo is written in Perl, with some parts in Bash and Zsh. It uses PostgreSQL 8.1 as its primary database management system and it has several databases for different purposes: PROJECTNAME for production and PROJECTNAME_test for automatic unit and functional testing.

Unfortunately, Thiblo can't run “in a folder” because there are files where we use webserver relative paths like /users/list.html. However, when you run make (we will talk more about it later) our code autogenerates a lot of important files from their .in templates and, almost always, the paths there are absolute.

Another important note, is that Thiblo allows users to run their own PostgreSQL and Apache without root privileges and it sometimes even wrong to run our utilities as a root. So, don't get confused with ./sbin folder. Run all files there as a normal user, not as a superuser.

Required packages

To install Thiblo on our computer, you will need these packages installed:

  • apache2-mpm-prefork
  • libapache2-mod-fcgid
  • libapache2-request-perl
  • libcgi-fast-perl
  • libclass-dbi-perl
  • libdbd-pg-perl
  • libdbix-contextualfetch-perl
  • libhtml-mason-perl
  • liblog-dispatch-perl
  • libxml-easyobj-perl
  • postgresql-8.1
  • postgresql-pltcl-8.1
  • libterm-readline-gnu-perl
  • libterm-readkey-perl
  • zsh
  • language-pack-hu

NOTE: Ubuntu users should not forget to put universe and multiverse repositories to your /etc/apt/sources.list and run sudo apt-get update.

See also: Packages list for Mac OS X?,  Information about repositories in Ubuntu

As mentioned earlier, Thiblo runs with Apache 2 as a web server and PostgreSQL as a DBMS, so it should be obvious why do we need all these apache and pg libraries. We use Perl as our main programming language for Thiblo so you should install it too and don't be scared with zsh package: we use Zsh in some initialization files.

Some of these packages have dependencies (and who don't in this complex world?), so, e.g. on  Ubuntu, you can end up with something like that:

The following NEW packages will be installed:
  apache2-common apache2-mpm-prefork apache2-utils libapache2-mod-apreq2
  libapache2-mod-fcgid libapache2-mod-perl2 libapache2-request-perl libapreq2
  libcache-cache-perl libcgi-fast-perl libclass-accessor-perl
  libclass-container-perl libclass-data-inheritable-perl libclass-dbi-perl
  libclass-trigger-perl libclone-perl libdbd-pg-perl libdbi-perl
  libdbix-contextualfetch-perl libdevel-stacktrace-perl libdevel-symdump-perl
  libdigest-sha1-perl liberror-perl libexception-class-perl libfcgi-perl
  libhtml-mason-perl libima-dbi-perl libio-stringy-perl libipc-sharelite-perl
  liblog-dispatch-perl libnet-daemon-perl libparams-validate-perl libpcre3
  libplrpc-perl libpq4 libuniversal-moniker-perl libversion-perl
  libxml-dom-perl libxml-easyobj-perl libxml-regexp-perl postgresql-8.1
  postgresql-client-8.1 postgresql-client-common postgresql-common zsh

Installation and configuration

NOTE: If you are reading this, you are a developer (or we went public and I forgot to change this part). If you are a developer contact Kovacs Baldvin in order to get your account for the repository.

Create the appropriate svn configuration file in the ~/.ssh/config and check out the source code:

svn co svn+ssh://thiblo.com/trunk thiblo

Then move to that directory (thiblo, in our case) and create your local configuration file, if you are not satisfied with the defaults. Local configuration files should be created in the config.d/ directory. You can override all properties from the main config there.

For example, Ubuntu Edgy does not have the Apache 2.2 in its repository, so run something like this (assume, that you are also not satisfied with the default port and want to override it too):

cat > config.d/$USER\@`hostname -s` <<EOF
BASE_PORT = 42501
APACHE22 = 0
HOST_NAME = "localhost"
EOF

Note that Thiblo uses three ports so, in our case, 42501, 42502 and 42503 will be used. It is important when there's a more than one Thiblo instance running on one server.

Now, create some databases and generate required files by running:

make
make init

Finally, you can start your application (including internal Apache and Postgre) and fill the database with some initial data:

./bin/start
./bin/alapos import devel/initial-content

Now, if everything was okay, you can open  http://localhost:42501 in your favorite browser.

Troubleshooting

Problem: I have imported initial content via the ./bin/alapos import devel/initial-content but the system can't find any blog.

Solution: Add an ALAP_BLOG variable in your configuration file. In your case (with initial content) write ALAP_BLOG="alapos" there.

---

Problem: I can't connect to the thiblo's database server via the system-wide psql program.

Solution: We use sameuser ident map in the pg_hba.conf so you have to install some ident daemon (e. g. ident2) and then run psql -h localhost -p {YOUR IP} -U {YOU LOGIN} alapos. Note, that this will work only if you did not change the DB_USER variable in the configuration.

See also: How to use external Apache?, How to use external Postgre?