Project

General

Profile

Build Core On Ubuntu » History » Version 6

seezer, 11/08/2009 11:41 PM
Hardy is out of date - rephrase to a general ubuntuish "from source" installation howto; to get some anchors, also added some headings

1 6 seezer
h1. Building Quassel core from source on Ubuntu
2 1 miohtama
3 6 seezer
These instructions tell how to build the latest quassel core for your Ubuntu server.
4 6 seezer
Since it scales better with many users and huge amounts of history, using PostgreSQL database as backend will be explained, too.
5 1 miohtama
6 6 seezer
h4. Make sure repositores are up-to-date
7 6 seezer
8 1 miohtama
<pre>
9 1 miohtama
sudo apt-get update
10 1 miohtama
</pre>
11 1 miohtama
12 6 seezer
h4. Install required dependencies and build tools
13 6 seezer
14 1 miohtama
<pre>
15 6 seezer
sudo apt-get install git-core qt4-dev-tools libqt4-dev libqt4-sql-sqlite screen
16 1 miohtama
</pre>
17 1 miohtama
18 6 seezer
Also install the sql driver for your planned backend.
19 6 seezer
20 6 seezer
- For sqlite (Quassels default, suggested for single user setups):
21 1 miohtama
<pre>
22 6 seezer
sudo apt-get install libqt4-sql-sqlite
23 6 seezer
</pre>
24 6 seezer
25 6 seezer
- For PostgreSQL (suggested for multiuser setups):
26 6 seezer
<pre>
27 6 seezer
sudo apt-get install libqt4-sql-psql
28 6 seezer
</pre>
29 6 seezer
30 6 seezer
h4. Get the sources
31 6 seezer
32 6 seezer
<pre>
33 1 miohtama
git clone git://git.quassel-irc.org/quassel.git
34 1 miohtama
</pre>
35 1 miohtama
36 6 seezer
h4. Build it
37 6 seezer
38 4 seezer
<pre>
39 1 miohtama
mkdir quassel/build
40 1 miohtama
cd quassel/build
41 1 miohtama
cmake -DWANT_CORE=1 -DWANT_QTCLIENT=0 -DWANT_MONO=0 ../
42 4 seezer
make
43 1 miohtama
optional step: make install
44 1 miohtama
</pre>
45 1 miohtama
46 1 miohtama
Another common option to cmake would be:
47 6 seezer
<pre>
48 6 seezer
-DINSTALL_PREFIX=/path/where/it/should/be/installed
49 6 seezer
</pre>
50 4 seezer
Otherwise /usr/local/ is used as the install prefix.
51 5 seezer
52 6 seezer
h2. Optional Step: Use PostgreSQL as backend
53 1 miohtama
54 6 seezer
h4. Setup PostgreSQL database master user
55 6 seezer
56 1 miohtama
* "Follow these Ubuntu specific instructions":https://help.ubuntu.com/community/PostgreSQL
57 2 miohtama
58 6 seezer
h4. Setup quassel PostgreSQL database. The database password will be asked later by the Quassel client configuration wizard.
59 1 miohtama
60 1 miohtama
<pre>
61 1 miohtama
sudo -i
62 1 miohtama
sudo -u postgres psql
63 1 miohtama
postgres=# CREATE USER quassel ENCRYPTED PASSWORD 'somepassword';
64 1 miohtama
CREATE ROLE
65 1 miohtama
postgres=# CREATE DATABASE quassel WITH OWNER quassel ENCODING 'UTF8';
66 1 miohtama
CREATE DATABASE
67 1 miohtama
</pre>
68 1 miohtama
69 6 seezer
h2. Optional Step: Create SSL certificate:
70 1 miohtama
71 1 miohtama
<pre>
72 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
73 1 miohtama
</pre>
74 1 miohtama
75 1 miohtama
h2. Running Core
76 1 miohtama
77 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.
78 1 miohtama
79 1 miohtama
We run quassel in screen so that core keeps running as long as it is killed or the server is restarted
80 1 miohtama
81 1 miohtama
<pre>
82 1 miohtama
screen
83 4 seezer
cd quassel/build
84 1 miohtama
./quasselcore
85 1 miohtama
</pre>
86 1 miohtama
87 1 miohtama
Now you can shut down your terminal and the quassel core still keeps running. 
88 1 miohtama
89 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:
90 1 miohtama
91 1 miohtama
<pre>
92 1 miohtama
screen -x
93 1 miohtama
</pre>
94 1 miohtama
95 1 miohtama
Now you should how you left your terminal last time you shut it down.
96 1 miohtama
97 1 miohtama
98 1 miohtama
h2. Starting using it
99 1 miohtama
100 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.