Project

General

Profile

Build Core On Ubuntu » History » Version 7

Version 6 (seezer, 11/08/2009 11:41 PM) → Version 7/20 (seezer, 11/08/2009 11:45 PM)

h1. Building Quassel core from source on Ubuntu

These instructions tell how to build the latest quassel core for your Ubuntu server.
Since it scales better with many users and huge amounts of history, using PostgreSQL database as backend will be explained, too.

h3. h4. Make sure repositores are up-to-date

<pre>
sudo apt-get update
</pre>

h3. h4. Install required dependencies and build tools

<pre>
sudo apt-get install git-core qt4-dev-tools libqt4-dev libqt4-sql-sqlite screen
</pre>

Also install the sql driver for your planned backend.

- For sqlite (Quassels default, suggested for single user setups):
<pre>
sudo apt-get install libqt4-sql-sqlite
</pre>

- For PostgreSQL (suggested for multiuser setups):
<pre>
sudo apt-get install libqt4-sql-psql
</pre>

h3. h4. Get the sources

<pre>
git clone git://git.quassel-irc.org/quassel.git
</pre>

h3. h4. Build it

<pre>
mkdir quassel/build
cd quassel/build
cmake -DWANT_CORE=1 -DWANT_QTCLIENT=0 -DWANT_MONO=0 ../
make
optional step: make install
</pre>

Another common option to cmake would be:
<pre>
-DINSTALL_PREFIX=/path/where/it/should/be/installed
</pre>
Otherwise /usr/local/ is used as the install prefix.

h2. Optional Step: Use PostgreSQL as backend

h3. h4. Setup PostgreSQL database master user

* "Follow these Ubuntu specific instructions":https://help.ubuntu.com/community/PostgreSQL

h3. h4. Setup quassel PostgreSQL database. The database password will be asked later by the Quassel client configuration wizard.

<pre>
sudo -i
sudo -u postgres psql
postgres=# CREATE USER quassel ENCRYPTED PASSWORD 'somepassword';
CREATE ROLE
postgres=# CREATE DATABASE quassel WITH OWNER quassel ENCODING 'UTF8';
CREATE DATABASE
</pre>

h2. Optional Step: Create SSL certificate:

<pre>
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout ~/.config/quassel-irc.org/quasselCert.pem -out ~/.config/quassel-irc.org/quasselCert.pem
</pre>

h2. Running Core

"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.

We run quassel in screen so that core keeps running as long as it is killed or the server is restarted

<pre>
screen
cd quassel/build
./quasselcore
</pre>

Now you can shut down your terminal and the quassel core still keeps running.

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:

<pre>
screen -x
</pre>

Now you should how you left your terminal last time you shut it down.

h2. Starting using it

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.