mark.bockenstedt.net header image
Twitter
Gaming Linux Mac Software Tech
mu Updates
Web
Musings Rants & Raves Rumor Sports Weather
Video Reviews

How To Install Laconica

September 15th, 2008 · 5 Comments

If you’re interested in setting up a Laconica 0.5.0 instance of your own, you can follow the directions I’ve outlined below. I got the general outline from decafbad.com but had to do some modifications of my own to get it running. This how-to requires you to be fairly knowledgeable with web systems and databases. If you don’t know what you’re doing, don’t bother. This setup is tricky to say the least. To preserve my own sanity, I will not help you get your system going.

Edit: That may be a little harsh. I can offer some limited advice, but I can’t hold your hand through the whole process.

Get the Code

You can grab the latest stable version from laconi.ca. Extract it to the location you want the server to be.

Install Dependent Libraries

sudo apt-get install libapache2-mod-php5 php5-cgi php5-cli php-pear php5-gd php5-mysql

You’ll also want to make sure you have Apache2, PHP, and MySQL installed, otherwise nothing will work. Once you have those, you’ll need to grab some PEAR libraries:

sudo pear channel-update pear.php.net
sudo pear install channel://pear.php.net/Validate-0.8.1
sudo pear install DB_DataObject
sudo pear install Mail
sudo pear install Net_SMTP

Then you’ll need to grab a whole bunch of external libraries. I’ve taken the liberty of creating a tarball containing those libraries, which you can grab here. Extract this file in the root of your Laconica instance.

Database Setup

You’ll need to create a database named laconica to use with this project. Then, you’re also going to need a user that has all access on that table – I used a user named laconica also. Once you’ve got those setup, run the laconica.sql file that’s in the db folder against the laconica database.

Configuration

You’ll need to add the following two lines in config.php right below the first line of code:

define('INSTALLDIR', dirname(__FILE__));
set_include_path(get_include_path() . PATH_SEPARATOR . INSTALLDIR . '/extlib');

There are a few other lines you’ll want to change in the config.php file also:

$config['site']['name'] = 'Micronica';
$config['site']['server'] = 'laconica.bockenstedt.net';
$config['site']['path'] = ''; # in my case blank because it's its own subdomain
$config['site']['theme'] = 'stoica'; # not the them we're using
$config['site']['email'] = 'mark@bockenstedt.net';
$config['site']['broughtby'] = 'microblink.com';
$config['site']['broughtbyurl'] = 'http://microblink.com/';
$config['db']['database'] = 'mysql://laconica:PASSWORD@localhost/laconica';
$config['db']['ini_laconica'] = $config['db']['schema_location'].'/stoica.ini';

The next step is to change the permissions on the avatar directory:

sudo chown -R www-data avatar
sudo chmod -R ug+rw avatar/

At this point, you should have a functioning laconica instance!

Forge on for the rest of the setup…

Configure .htaccess

If you don’t care about ugly URLs, this step is optional. There’s already an htaccess sample file included; I simply had to rename it to .htaccess and everything was fine. I can’t guarantee yours will be that simple, but it’s worth a shot. I’m really not that good with .htaccess, so you’re kind of on your own here.

If you do try to rewrite the URLs, be sure to tell config.php that you’re doing that with:

$config['site']['fancy'] = true;

Tweak

That should be a pretty inclusive set of directions for getting things going. As stated earlier, tweaks and modifications are up to you. You can check out my installation at laconica.bockenstedt.net to see how it turned out for me. As a reminder, the theme you’ll see there is NOT the Default or Stoica themes that come with the installer, but is a custom theme. Custom themes are actually pretty simple to make provided you know some CSS.

SMS, IM, and posting by e-mail still don’t work for me as I haven’t figured out how to get those systems up. Otherwise, it seems like everything else works (including OpenID).

Again, thanks to @lmorchard for the original directions. Be sure to check out his site decafbad.com.

Categories: How-To · Social Media
Tags:, , ,



4 comments so far ↓

  • 1: JC says:
    October 29th, 2008 at 9:51 am

    Any idea as to how the error message:

    Call to undefined function bindtextdomain()

    Could be resolved? Thanks.

  • 2: Mark says:
    October 29th, 2008 at 11:34 am

    @JC
    Which version are you using? The version that’s walked through above is no longer the current version and the newest one (0.6.1) is supposed to be much easier to install, I just haven’t gotten around to installing that one yet.

  • 3: Frederic says:
    November 19th, 2008 at 10:54 pm

    To JC

    bindtextdomain() is part of the PHP gettext extension. You have to recompile php with it!

  • 4: Tyghe says:
    February 24th, 2009 at 5:18 pm

    Hey just read your post. Trying to find a theme and ran across it, anyways if your still looking into getting im to work I’ve been fighting it for a day and a half and have finally broken down and used a gtalk user for the laconica bot.

    http://blog.montana.edu/acg-sysadmin/2009/02/24/laconica-xmpp-bot-using-gtalk/

    Hope that helps

1 pingback so far ↓