]> git.mxchange.org Git - friendica.git/blob - INSTALL.txt
Merge remote-tracking branch 'friendica/master' into mobile
[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. Also decide
19 if you wish to connect with members of the Diaspora network, as this will 
20 impact the installation requirements.
21
22 Decide if you will use SSL and obtain an SSL cert. Communications with the
23 Diaspora network MAY require both SSL AND an SSL cert signed by a CA which is 
24 recognised by the major browsers. Friendika will work with self-signed certs
25 but Diaspora communication may not. For best results, install your cert PRIOR
26 to installing Friendika and when visiting your site for the initial 
27 installation in step 5, please use the https: link. (Use the http: or non-SSL 
28 link if your cert is self-signed). 
29  
30
31 1. Requirements
32         - Apache with mod-rewrite enabled and "Options All" so you can use a 
33 local .htaccess file
34
35         - PHP 5.2+. The later the better. PHP 5.3 is required for communications 
36 with the Diaspora network and improved security.
37
38                 - PHP *command line* access with register_argc_argv set to true in the 
39 php.ini file [or see 'poormancron' in section 8]
40
41                 - curl, gd (with at least jpeg support), mysql, mbstring, mcrypt, and openssl extensions
42
43                 - some form of email server or email gateway such that PHP mail() works
44
45         - Mysql 5.x
46
47         - ability to schedule jobs with cron (Linux/Mac) or Scheduled Tasks
48 (Windows) [Note: other options are presented in Section 8 of this document]
49
50         - Installation into a top-level domain or sub-domain (without a 
51 directory/path component in the URL) is preferred. This is REQUIRED if
52 you wish to communicate with the Diaspora network.
53
54 2. Unpack the Friendika files into the root of your web server document area.
55
56         - If you copy the directory tree to your webserver, make sure
57         that you also copy .htaccess - as "dot" files are often hidden 
58         and aren't normally copied.
59
60 3. Create an empty database and note the access details (hostname, username, 
61 password, database name).
62
63
64 4. If you know in advance that it will be impossible for the web server to 
65 write or create files in your web directory, create an empty file called 
66 .htconfig.php and make it writable by the web server.
67
68 5. Visit your website with a web browser and follow the instructions. Please 
69 note any error messages and correct these before continuing. If you are using
70 SSL with a known signature authority (recommended), use the https: link to your
71 website. If you are using a self-signed cert or no cert, use the http: link. 
72
73 6. *If* the automated installation fails for any reason, check the following:
74
75         - ".htconfig.php" exists 
76                 If not, edit htconfig.php and change system settings. Rename 
77 to .htconfig.php
78         -  Database is populated.
79                 If not, import the contents of "database.sql" with phpmyadmin 
80 or mysql command line
81
82 7. At this point visit your website again, and register your personal account. 
83 Registration errors should all be recoverable automatically. 
84 If you get any *critical* failure at this point, it generally indicates the
85 database was not installed correctly. You might wish to move/rename 
86 .htconfig.php to another name and empty (called 'dropping') the database 
87 tables, so that you can start fresh.  
88
89 ****************************************************************************
90 ****************************************************************************
91 ********          THIS NEXT STEP IS IMPORTANT!!!!                ***********
92 ****************************************************************************
93 ****************************************************************************
94
95 8. Set up a cron job or scheduled task to run the poller once every 5-10 
96 minutes to pick up the recent "public" postings of your friends. Example:
97
98         cd /base/directory; /path/to/php include/poller.php
99
100 Change "/base/directory", and "/path/to/php" as appropriate for your situation.
101
102 If you are using a Linux server, run "crontab -e" and add a line like the 
103 one shown, substituting for your unique paths and settings:
104
105 */10 * * * *    cd /home/myname/mywebsite; /usr/bin/php include/poller.php
106
107 You can generally find the location of PHP by executing "which php". If you 
108 have troubles with this section please contact your hosting provider for 
109 assistance. Friendika will not work correctly if you cannot perform this step.
110
111 You should also be sure that $a->config['php_path'] is set correctly, it should
112 look like (changing it to the correct PHP location)
113
114 $a->config['php_path'] = '/usr/local/php53/bin/php'
115   
116 Alternative: You may be able to use the 'poormancron' plugin to perform this
117 step if you are using a recent Friendika release. 'poormancron' may result in
118 perfomance and memory issues and is only suitable for small sites with one or
119 two users and a handful of contacts. To do this, edit the file 
120 ".htconfig.php" and look for a line describing your plugins. On a fresh 
121 installation, it will look like
122
123 $a->config['system']['addon'] = 'js_upload';
124
125 This indicates the "js_upload" addon module is enabled. You may add additional 
126 addons/plugins using this same line in the configuration file. Change it to 
127 read
128
129 $a->config['system']['addon'] = 'js_upload,poormancron';
130
131 and save your changes.
132
133
134  
135 #####################################################################
136
137                 If things don't work...
138
139 #####################################################################
140
141
142 #####################################################################
143 - If you get the message 
144         "System is currently unavailable. Please try again later"
145 #####################################################################
146         
147         Check your database settings. It usually means your database could not 
148 be opened or accessed. If the database resides on the same machine, check that
149 the database server name is "localhost". 
150
151 #####################################################################
152 - 500 Internal Error
153 #####################################################################
154
155         This could be the result of one of our Apache directives not being 
156 supported by your version of Apache. Examine your apache server logs.
157         You might remove the line "Options -Indexes" from the .htaccess file if 
158 you are using a Windows server as this has been known to cause problems.
159 Also check your file permissions. Your website and all contents must generally 
160 be world-readable.
161
162         It is likely that your web server reported the source of the problem in
163 its error log files. Please review these system error logs to determine what 
164 caused the problem. Often this will need to be resolved with your hosting
165 provider or (if self-hosted) your web server configuration. 
166
167 #####################################################################
168 - 400 and 4xx "File not found" errors
169 #####################################################################
170
171         First check your file permissions. Your website and all contents must 
172 generally be world-readable.
173
174         Ensure that mod-rewite is installed and working, and that your
175 .htaccess file is being used. To verify the latter, create a file test.out
176 containing the word "test" in the top directory of Friendika, make it world 
177 readable and point your web browser to
178
179 http://yoursitenamehere.com/test.out
180
181         This file should be blocked. You should get a permission denied message.
182
183         If you see the word "test" your Apache configuration is not allowing
184 your .htaccess file to be used (there are rules in this file to block access
185 to any file with .out at the end, as these are typically used for system logs).
186
187         Make certain the .htaccess file exists and is readable by everybody, then 
188 look for the existence of "AllowOverride None" in the Apache server 
189 configuration for your site. This will need to be changed to 
190 "AllowOverride All".  
191
192         If you do not see the word "test", your .htaccess is working, but it is 
193 likely that mod-rewrite is not installed in your web server or is not working.
194
195         On most flavour of Linux,
196
197 % a2enmod rewrite
198 % /etc/init.d/apache2 restart
199
200         Consult your hosting provider, experts on your particular Linux 
201 distribution or (if Windows) the provider of your Apache server software if 
202 you need to change either of these and can not figure out how. There is 
203 a lot of help available on the web. Google "mod-rewrite" along with the 
204 name of your operating system distribution or Apache package (if using 
205 Windows).
206
207   
208 #####################################################################
209 - If you are unable to write the file .htconfig.php during installation 
210 due to permissions issues:
211 #####################################################################
212
213         create an empty file with that name and give it world-write permission.
214 For Linux:
215
216 % touch .htconfig.php
217 % chmod 777 .htconfig.php
218
219 Retry the installation. As soon as the database has been created, 
220
221 ******* this is important *********
222
223 % chmod 755 .htconfig.php
224