]> git.mxchange.org Git - friendica.git/blob - INSTALL.txt
revisit friend suggestion structures
[friendica.git] / INSTALL.txt
1
2 Friendika Installation
3
4 We've tried very hard to ensure that Friendika will run on commodity hosting 
5 platforms - such as those used to host Wordpress blogs and Drupal websites. 
6 But be aware that Friendika is more than a simple web application. It is a 
7 complex communications system which more closely resembles an email server 
8 than a web server. For reliability and performance, messages are delivered in
9 the background and are queued for later delivery when sites are down. This
10 kind of functionality requires a bit more of the host system than the typical
11 blog. Not every PHP/MySQL hosting provider will be able to support Friendika. 
12 Many will. But please review the requirements and confirm these with your 
13 hosting provider prior to installation.
14
15 Before you begin: Choose a domain name or subdomain name for your server.
16 Put some thought into this - because changing it is currently not-supported.
17 Things will break, and some of your friends may have difficulty communicating
18 with you. We plan to address this limitation in a future release. 
19  
20
21 1. Requirements
22         - Apache with mod-rewrite enabled and "Options All" so you can use a 
23 local .htaccess file
24
25         - PHP 5.2+. The later the better. You'll need 5.3 for encryption of key
26 exchange conversations
27                 - PHP *command line* access with register_argc_argv set to true in the 
28 php.ini file
29                 - curl, gd, mysql, mbstring, and openssl extensions
30                 - some form of email server or email gateway such that PHP mail() works
31                 - mcrypt (optional; used for end-to-end message encryption)
32
33         - Mysql 5.x
34
35         - ability to schedule jobs with cron (Linux/Mac) or Scheduled Tasks
36 (Windows) [Note: other options are presented in Section 8 of this document]
37
38         - Installation into a top-level domain or sub-domain (without a 
39 directory/path component in the URL) is preferred. Directory paths will
40 not be as convenient to use and have not been thoroughly tested.  
41
42         [Dreamhost.com offers all of the necessary hosting features at a 
43 reasonable price. If your hosting provider doesn't allow Unix shell access, 
44 you might have trouble getting everything to work.] 
45
46 2. Unpack the Friendika files into the root of your web server document area.
47
48         - If you copy the directory tree to your webserver, make sure
49         that you also copy .htaccess - as "dot" files are often hidden 
50         and aren't normally copied.
51
52 3. Create an empty database and note the access details (hostname, username, 
53 password, database name).
54
55
56 4. If you know in advance that it will be impossible for the web server to 
57 write or create files in your web directory, create an empty file called 
58 .htconfig.php and make it writable by the web server.
59
60 5. Visit your website with a web browser and follow the instructions. Please 
61 note any error messages and correct these before continuing.
62
63 6. *If* the automated installation fails for any reason, check the following:
64
65         - ".htconfig.php" exists 
66                 If not, edit htconfig.php and change system settings. Rename 
67 to .htconfig.php
68         -  Database is populated.
69                 If not, import the contents of "database.sql" with phpmyadmin 
70 or mysql command line
71
72 7. At this point visit your website again, and register your personal account. 
73 Registration errors should all be recoverable automatically. 
74 If you get any *critical* failure at this point, it generally indicates the
75 database was not installed correctly. You might wish to move/rename 
76 .htconfig.php to another name and empty (called 'dropping') the database 
77 tables, so that you can start fresh.  
78
79 ****************************************************************************
80 ****************************************************************************
81 ********          THIS NEXT STEP IS IMPORTANT!!!!                ***********
82 ****************************************************************************
83 ****************************************************************************
84
85 8. Set up a cron job or scheduled task to run the poller once every 5-10 
86 minutes to pick up the recent "public" postings of your friends. Example:
87
88         cd /base/directory; /path/to/php include/poller.php
89
90 Change "/base/directory", and "/path/to/php" as appropriate for your situation.
91
92 If you are using a Linux server, run "crontab -e" and add a line like the 
93 one shown, substituting for your unique paths and settings:
94
95 */10 * * * *    cd /home/myname/mywebsite; /usr/bin/php include/poller.php
96
97 You can generally find the location of PHP by executing "which php". If you 
98 have troubles with this section please contact your hosting provider for 
99 assistance. Friendika will not work correctly if you cannot perform this step.
100   
101 Alternative: You may be able to use the 'poormancron' plugin to perform this
102 step if you are using a recent Friendika release. To do this, edit the file 
103 ".htconfig.php" and look for a line describing your plugins. On a fresh 
104 installation, it will look like
105
106 $a->config['system']['addon'] = 'js_upload';
107
108 This indicates the "js_upload" addon module is enabled. You may add additional 
109 addons/plugins using this same line in the configuration file. Change it to 
110 read
111
112 $a->config['system']['addon'] = 'js_upload,poormancron';
113
114 and save your changes.
115
116
117
118 #####################################################################
119
120                 If things don't work...
121
122 #####################################################################
123
124
125 #####################################################################
126 - If you get the message 
127         "System is currently unavailable. Please try again later"
128 #####################################################################
129         
130         Check your database settings. It usually means your database could not 
131 be opened or accessed. If the database resides on the same machine, check that
132 the database server name is "localhost". 
133
134 #####################################################################
135 - 500 Internal Error
136 #####################################################################
137
138         This could be the result of one of our Apache directives not being 
139 supported by your version of Apache. Examine your apache server logs.
140         You might remove the line "Options -Indexes" from the .htaccess file if 
141 you are using a Windows server as this has been known to cause problems.
142 Also check your file permissions. Your website and all contents must generally 
143 be world-readable.
144
145         It is likely that your web server reported the source of the problem in
146 its error log files. Please review these system error logs to determine what 
147 caused the problem. Often this will need to be resolved with your hosting
148 provider or (if self-hosted) your web server configuration. 
149
150 #####################################################################
151 - 400 and 4xx "File not found" errors
152 #####################################################################
153
154         First check your file permissions. Your website and all contents must 
155 generally be world-readable.
156
157         Ensure that mod-rewite is installed and working, and that your
158 .htaccess file is being used. To verify the latter, create a file test.out
159 containing the word "test" in the top directory of Friendika, make it world 
160 readable and point your web browser to
161
162 http://yoursitenamehere.com/test.out
163
164         This file should be blocked. You should get a permission denied message.
165
166         If you see the word "test" your Apache configuration is not allowing
167 your .htaccess file to be used (there are rules in this file to block access
168 to any file with .out at the end, as these are typically used for system logs).
169
170         Make certain the .htaccess file exists and is readable by everybody, then 
171 look for the existence of "AllowOverride None" in the Apache server 
172 configuration for your site. This will need to be changed to 
173 "AllowOverride All".  
174
175         If you do not see the word "test", your .htaccess is working, but it is 
176 likely that mod-rewrite is not installed in your web server or is not working.
177
178         On most flavour of Linux,
179
180 % a2enmod rewrite
181 % /etc/init.d/apache2 restart
182
183         Consult your hosting provider, experts on your particular Linux 
184 distribution or (if Windows) the provider of your Apache server software if 
185 you need to change either of these and can not figure out how. There is 
186 a lot of help available on the web. Google "mod-rewrite" along with the 
187 name of your operating system distribution or Apache package (if using 
188 Windows).
189
190   
191 #####################################################################
192 - If you are unable to write the file .htconfig.php during installation 
193 due to permissions issues:
194 #####################################################################
195
196         create an empty file with that name and give it world-write permission.
197 For Linux:
198
199 % touch .htconfig.php
200 % chmod 777 .htconfig.php
201
202 Retry the installation. As soon as the database has been created, 
203
204 ******* this is important *********
205
206 % chmod 755 .htconfig.php
207