DreamHost Friendica Install Guide

abinoam edited this page Feb 12, 2012 · 12 revisions

Table of Contents

DreamHost Friendica Install Guide

Comprehensive Step by Step (and... with bonus "screenshots"!!!)


This guide is based on the official Friendica INSTALL.txt specially commented for an easy install on DreamHost.

Creating the domain

On the webpanel sidebar, click on "Manage Domains".

Now you should choose your domain (or sub-domain). It has to be a previous registered one (or a sub-domain of it) or a new one. Note that, for new domains DreamHost fees may apply. And, as always, new domains take a day or two to propagate through the internet. And please, follow the INSTALL.txt advice:

"Put some thought into this - because changing it (the domain name) is currently not-supported."

You should choose PHP 5.3 as it's required to federate with diaspora pods.

Just go on! Choose "The Blue Button"!

If everything went well you're gonna receive this greeting from DreamHost guys! (cheers)

Setting up a shell user

You will need a user with shell permissions to make the things better. Just click on "Manage Users".

Add a new user. And don't forget your username and password because you're gonna need it later.

For whom to call? - You'll need to know in what DreamHost server your Friendica installation will be hosted so that you can ssh into it. To discover it you should click no the top right Account Status drop-down menu.

Pay attention to the Your Web Server entry. Take note of your webserver address. Remember, the full url will be yourmachine.dreamhost.com (changing 'yourmachine' for whatever it is on your setup).

Setting up MySQL database

Friendica uses MySQL as its backend database. So you will need to have a database set and with the appropriate permissions. At the Goodies menu, click on MySQL Databases.

Now we will add a MySQL Hostname.

If you feel comfortable with this, just pick mysql as the name to be pre-pended to your domain name. It's easier to remember later a name like mysql.yourdomain.com. Yes, of course you should take note of the MySQL hostname you are creating now because you will need it later.

Now that you know where your MySQL installation is, you should create a database that will hold all the Friendica tables. It's good practice to pick a database name easy to remember too. Something like your domain name in snake case will do it fine, like your_domain_com (no dots in it). At "Use Hostname:" select your "MySQL Hostname" that you've just created. "First User:"? Right, that's the user you have created at the begining.

If everything is ok the DreamHost guys will congratulate you once more. Look at the suggested mysql command line, take note of it if you're not a MySQL superstar.

Friendica Installation

Now you will have to ssh into the machine where your domain is hosted.

  $ ssh yourdomain -l username

You should cd into the directory where your files will live in. At DreamHost, this directory usually has the same name as the domain. Something like /home/yourusername/yourdomain.com, so:

  $ cd yourdomain

Now you have to git clone the Friendica repository inside it. This can be accomplished with:

  $ git clone git://github.com/friendica/friendica.git .

(Don't forget the dot at the end of the command line)

Now you are almost there. Just visit your website and follow the instructions. At first, Friendica will make some self tests and give you a report. All the lights should be green!

Now Friendica needs to know your database access information. MySQL hostname, username, password and database name.

Congratulations! It's ready. Only a little cron job detail explained bellow.

After all you should make sure the $a->config['php_path'] is set correctly on your .htconfig.php file. It will probably point to /usr/local/bin/php At Dreamhost (today: Feb, 11, 2012) this points to PHP 5.2.17 (cli) (built: Jun 28 2011 17:39:50).

But... we want php 5.3, remember? https://github.com/friendica/friendica/wiki/DreamHost-Friendica-Install-Guide And today php 5.3 is at /usr/local/php53/bin/php, so...

Open .htconfig.php on your favorite editor and check if this line is like bellow:

  $a->config['php_path'] = '/usr/local/php53/bin/php';

Setting up Cron Job

Friendica needs to periodically reach your friends' server to get "the news". This work is done by the include/poller.php script. For your system to know that it has to run poller from time to time you have to set a cron job. There's a (sugar) interface to this at DreamHost Goodies. You just have to fill in a form. The command to run follows this format: cd your_domain_directory; php_absolute_path poller_relative_path - this can be something like:

  cd /home/john/johnfriendica.com; /usr/local/php53/bin/php include/poller.php

Note that, at DreamHost (currently), the PHP 5.3 path is /usr/local/php53/bin/php. Set your e-mail correctly and you will receive an e-mail if something goes wrong when polling.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.