Installation
From StatusNet
Contents |
[edit] Official Install Instructions
official installation instructions: http://gitorious.org/projects/laconica/repos/mainline/blobs/master/README
[edit] Frequently asked install questions
- How do I disable default plugins
unset($config['plugins']['default']['OpenID']);
- DB error help! "LOG_ERR: PEAR error: DB Error: extension not found : [DB Error: extension not found]"
mysqli now required in version 0.9x and above (check your db connection string)
[edit] Setup Notes
list of Statusnet Packages (ubuntu centric)
Some of these instructions are quite old. Please read the included README for the most accurate advice
That said there are some things not covered in the readme, and this is a good place for such things.
extra config.php settings, I will push these to the sample.config.php soon included are the extra options needed for the bi-directional twitter bridge.
Laconica on Ubuntu 8.04 Server Quick Start Has been expanded to include Sphinx and XMPP setup
Laconica on XAMPP on Windows step by step: InstallationWindows
Laconica on Debian Etch with PostgreSQL step by step: http://blog.ciarang.com/posts/laconica-etch-postgresql/
Laconica for speed on FreeBSD (no apache) using nginx and spawn-fcgi http://pbj.ca/FNMP-install-laconica.html
Dependencies (see /doc/README too)
- PEAR::Validate ('pear install validate')
- PEAR::DB and DB_DataObject ('pear install db_dataobject')
- PEAR::Mail
- PEAR::Net_SMTP
- PEAR::Mail_Mime and Mail_mimeDecode
- XMPPHP - http://code.google.com/p/xmpphp/ (this comes with laconica)
- php-openid-2.1.1 - http://openidenabled.com/
- OAuth.php - http://code.google.com/p/oauth/source/browse/code/php/OAuth.php
- markdown.php http://michelf.com/projects/php-markdown/
- PECL mailparse /etc/php5/cli/php.ini:extension=mailparse.so
The PEAR packages mentioned above can be installed via an unofficial meta-package:
or, for the paranoid:
- sudo pear install http://lir.talideon.com/~ken/metapackages/statusnet_pear.xml
Edit the config.php and add the external library paths to the $extra_path array().
Be sure to run the install.php
$config['db']['ini_your_db_name']
$config['db']['database']
[edit] Rewrite Rules
Add this to your statusnet section in the web server configuration.
RewriteEngine on
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [E=HTTP_AUTHORIZATION:%1]
There also is a htaccess.sample in your installation directory. See the chapter 'Fancy URLs' for more infos on this.
[edit] Distribution related Notes
- Debian/Etch provides php-5.2.0, which has no sys_get_temp_dir(); so use the function at the comments at http://de3.php.net/sys_get_temp_dir and include it with e.g. include(INSTALLDIR . '/extlib/get_temp_dir.php'); in config.php
- Debian/Etch also comes without GMP support compiled into php, which you need to use the OpenID functionality. You have to recompile php with this module included, see for example http://www.vortex-tech.com/blog/2008/03/17/php5-gmp-in-gutsy/
- Laconi.ca doesn't work on PHP 5.1.6. The XMLWriter libraries are missing some functions.
[edit] Translations on Debian/Ubuntu
For the translations to work on Debian-based systems, you must have the relevant locales installed at system level in order for Laconica to be able to reliably set and use them. You can see which you currently have installed using the following command:
locale -a
For example, if you want the French (fr_FR) language translation to work, you need to see fr_FR.utf8 in that list. If it's not there, you can add it using the following:
Debian: sudo dpkg-reconfigure locales (and then select fr_FR.utf8 from the list) Ubuntu: locale-gen fr_FR.UTF-8
In both cases, you need to restart Apache after installing the new locale for the change to take effect.
[edit] XMPP / IM
Laconica can interact with users via IM (Jabber/XMPP). To do this, you need to run the xmppdaemon.php from commandline/shell. Logging goes to syslog. The config.php XMPP section needs to describe a Jabber account that exists (ie. we don't auto-create it).
[edit] Hosting specific installation notes
- for federation allow_url_fopen=on in php, which is off on many shared hosting sites.
- kentbrewster's identica-badge calls needs the json php extension, which is not compiled in older versions of php
- LaconicaOnDreamhost
- OlderApacheRegExFix
[edit] System specific notes
[edit] Upgrading
[edit] Laconica 0.4.2
You can get 0xDECAFBAD's story of how he got a very old version (0.4.3) up and running (and federated) at http://decafbad.com/blog/2008/07/03/getting-laconica-up-and-running
follow http://decafbad.com/blog/2008/07/03/getting-laconica-up-and-running but instead of using http://xmpphp.googlecode.com/files/xmpphp-0.1beta-r21.tar.gz use the SVN version of xmpphp at svn://netflint.net/xmpphp
database upgrading from 0.4.1 to 0.4.2
$config['db']['database'] ALTER TABLE `confirm_address` ADD COLUMN `sent` datetime default NULL COMMENT 'date this was sent for queueing'; ALTER TABLE `confirm_address` ADD COLUMN `claimed` datetime default NULL COMMENT 'date this was claimed for queueing'; CREATE TABLE `queue_item` ( `notice_id` int(11) NOT NULL COMMENT 'notice queued', `created` datetime NOT NULL COMMENT 'date this record was created', `claimed` datetime default NULL COMMENT 'date this item was claimed', PRIMARY KEY (`notice_id`), KEY `queue_item_created_idx` (`created`) ) ENGINE=InnoDB
[edit] Laconica 0.4.3
- run fixup_notices_rendered.php once on console, give php more memory if needed (e.g. ini_set('memory_limit', '64M'); in config.php)
- run fixup_replies.php once on console
- Note: there are some new rewrite rules for search in httaccess.sample, in case you're using fancy urls.
database upgrading from 0.4.2 to 0.4.3
$config['db']['database'] ALTER TABLE `confirm_address` ADD COLUMN `sent` datetime default NULL COMMENT 'date this was sent for queueing'; ALTER TABLE `confirm_address` ADD COLUMN `claimed` datetime default NULL COMMENT 'date this was claimed for queueing'; CREATE TABLE `queue_item` ( `notice_id` int(11) NOT NULL COMMENT 'notice queued', `created` datetime NOT NULL COMMENT 'date this record was created', `claimed` datetime default NULL COMMENT 'date this item was claimed', PRIMARY KEY (`notice_id`), KEY `queue_item_created_idx` (`created`) ) ENGINE=InnoDB ALTER TABLE `avatar` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `confirm_address` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `consumer` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE nonce DROP FOREIGN KEY nonce_ibfk_1; # in case of problems check real name of key with show create table nonce ALTER TABLE `token` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `nonce` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `notice` ADD COLUMN `reply_to` int(11) default NULL COMMENT 'notice replied to (usually a guess)'; ALTER TABLE `notice` ADD COLUMN `rendered` text COMMENT 'HTML version of the content'; ALTER TABLE `notice` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `notice` ADD FULLTEXT (`content`); ALTER TABLE `oid_associations` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `oid_nonces` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `profile` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `profile` ADD FULLTEXT (`nickname` ,`fullname` ,`location` ,`bio` ,`homepage`); ALTER TABLE `queue_item` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `remember_me` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `remote_profile` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `sms_carrier` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `subscription` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `user` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `user_openid` ENGINE=InnoDB; # was ENGINE=InnoDB CREATE TABLE `reply` ( `notice_id` int(11) NOT NULL COMMENT 'notice that is the reply', `profile_id` int(11) NOT NULL COMMENT 'profile replied to', `modified` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP COMMENT 'date this record was modified', `replied_id` int(11) default NULL COMMENT 'notice replied to (not used, see notice.reply_to)', PRIMARY KEY (`notice_id`,`profile_id`), KEY `reply_notice_id_idx` (`notice_id`), KEY `reply_profile_id_idx` (`profile_id`), KEY `reply_replied_id_idx` (`replied_id`) ) ENGINE=InnoDB;
[edit] Laconica 0.4.4
- Note: there are some new rewrite rules for search in httaccess.sample, in case you're using fancy urls.
database upgrading from 0.4.3 to 0.4.4
$config['db']['database'] ALTER TABLE `confirm_address` ADD COLUMN `sent` datetime default NULL COMMENT 'date this was sent for queueing'; ALTER TABLE `confirm_address` ADD COLUMN `claimed` datetime default NULL COMMENT 'date this was claimed for queueing'; CREATE TABLE `queue_item` ( `notice_id` int(11) NOT NULL COMMENT 'notice queued', `created` datetime NOT NULL COMMENT 'date this record was created', `claimed` datetime default NULL COMMENT 'date this item was claimed', PRIMARY KEY (`notice_id`), KEY `queue_item_created_idx` (`created`) ) ENGINE=InnoDB ALTER TABLE `avatar` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `confirm_address` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `consumer` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE nonce DROP FOREIGN KEY nonce_ibfk_1; # in case of problems check real name of key with show create table nonce ALTER TABLE `token` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `nonce` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `notice` ADD COLUMN `reply_to` int(11) default NULL COMMENT 'notice replied to (usually a guess)'; ALTER TABLE `notice` ADD COLUMN `rendered` text COMMENT 'HTML version of the content'; ALTER TABLE `notice` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `notice` ADD FULLTEXT (`content`); ALTER TABLE `oid_associations` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `oid_nonces` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `profile` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `profile` ADD FULLTEXT (`nickname` ,`fullname` ,`location` ,`bio` ,`homepage`); ALTER TABLE `queue_item` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `remember_me` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `remote_profile` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `sms_carrier` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `subscription` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `user` ENGINE=InnoDB; # was ENGINE=InnoDB ALTER TABLE `user_openid` ENGINE=InnoDB; # was ENGINE=InnoDB CREATE TABLE `reply` ( `notice_id` int(11) NOT NULL COMMENT 'notice that is the reply', `profile_id` int(11) NOT NULL COMMENT 'profile replied to', `modified` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP COMMENT 'date this record was modified', `replied_id` int(11) default NULL COMMENT 'notice replied to (not used, see notice.reply_to)', PRIMARY KEY (`notice_id`,`profile_id`), KEY `reply_notice_id_idx` (`notice_id`), KEY `reply_profile_id_idx` (`profile_id`), KEY `reply_replied_id_idx` (`replied_id`) ) ENGINE=InnoDB; ALTER table `user` ADD COLUMN `emailnotifysub` tinyint default 1 comment 'Notify by email of subscriptions'; ALTER table `user` ADD COLUMN `jabberreplies` tinyint default 0 comment 'whether to send notices to jabber on replies';
[edit] Laconica 0.5
[edit] Later Versions
The README file contains detailed instructions on upgrading.

