Project

General

Profile

Build Core On Ubuntu » History » Version 5

seezer, 10/17/2009 01:34 PM

1 1 miohtama
h1. Building Quassel core with PostgreSQL support on Ubuntu Hardy
2 1 miohtama
3 1 miohtama
These instructions tell how to build the latest quassel core for your Ubuntu 8.04 Hardy Heron server. PostgreSQL database backend will be used instead of the default SQLite backend, since it scales better with many users and much of history. 
4 1 miohtama
5 1 miohtama
Make sure repositores are up-to-date
6 1 miohtama
<pre>
7 1 miohtama
sudo apt-get update
8 1 miohtama
</pre>
9 1 miohtama
10 1 miohtama
Install required dependencies and build tools
11 1 miohtama
<pre>
12 1 miohtama
sudo apt-get install git-core postgresql-8.3 qt4-dev-tools libqt4-dev libqt4-sql-psql screen
13 1 miohtama
</pre>
14 1 miohtama
15 1 miohtama
Pull out source codes
16 1 miohtama
<pre>
17 1 miohtama
git clone git://git.quassel-irc.org/quassel.git
18 1 miohtama
</pre>
19 1 miohtama
20 1 miohtama
Build it
21 1 miohtama
<pre>
22 4 seezer
mkdir quassel/build
23 4 seezer
cd quassel/build
24 4 seezer
cmake -DWANT_CORE=1 -DWANT_QTCLIENT=0 -DWANT_MONO=0 ../
25 4 seezer
make
26 4 seezer
optional step: make install
27 1 miohtama
</pre>
28 1 miohtama
29 4 seezer
Another common option to cmake would be:
30 4 seezer
<pre>-DINSTALL_PREFIX=/path/where/it/should/be/installed</pre>
31 5 seezer
Otherwise /usr/local/ is used as the install prefix.
32 4 seezer
33 1 miohtama
Setup PostgreSQL database master user
34 1 miohtama
35 3 miohtama
* "Follow these Ubuntu specific instructions":https://help.ubuntu.com/community/PostgreSQL
36 1 miohtama
37 2 miohtama
Setup quassel PostgreSQL database. The database password will be asked later by the Quassel client configuration wizard.
38 1 miohtama
39 1 miohtama
<pre>
40 1 miohtama
sudo -i
41 1 miohtama
sudo -u postgres psql
42 1 miohtama
postgres=# CREATE USER quassel ENCRYPTED PASSWORD 'somepassword';
43 1 miohtama
CREATE ROLE
44 1 miohtama
postgres=# CREATE DATABASE quassel WITH OWNER quassel ENCODING 'UTF8';
45 1 miohtama
CREATE DATABASE
46 1 miohtama
</pre>
47 1 miohtama
48 1 miohtama
Create SSL certificate:
49 1 miohtama
50 1 miohtama
<pre>
51 1 miohtama
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout ~/.config/quassel-irc.org/quasselCert.pem -out ~/.config/quassel-irc.org/quasselCert.pem
52 1 miohtama
</pre>
53 1 miohtama
54 1 miohtama
h2. Running Core
55 1 miohtama
56 1 miohtama
"Screen":http://www.debuntu.org/2006/07/04/72-how-to-screen-the-ultimate-admin-tool is a terminal tool which allwos you to leave terminal sessions running background even when you are logged out.
57 1 miohtama
58 1 miohtama
We run quassel in screen so that core keeps running as long as it is killed or the server is restarted
59 1 miohtama
60 1 miohtama
<pre>
61 1 miohtama
screen
62 4 seezer
cd quassel/build
63 1 miohtama
./quasselcore
64 1 miohtama
</pre>
65 1 miohtama
66 1 miohtama
Now you can shut down your terminal and the quassel core still keeps running. 
67 1 miohtama
68 1 miohtama
Later we can reattach to this screen session to check out the quassel core terminal output to see if there has been any problems. Login in and type:
69 1 miohtama
70 1 miohtama
<pre>
71 1 miohtama
screen -x
72 1 miohtama
</pre>
73 1 miohtama
74 1 miohtama
Now you should how you left your terminal last time you shut it down.
75 1 miohtama
76 1 miohtama
77 1 miohtama
h2. Starting using it
78 1 miohtama
79 1 miohtama
Configuration wizard will guide you through the rest of the setup when you connect to your Quassel core using Quassel client for the first time. Remember to choose PostgreSQL backend instead of SQLite when asked.