]> git.mxchange.org Git - friendica.git/blob - INSTALL.txt
Merge pull request #169 from michal-s/master
[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, 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 Alternative: You may be able to use the 'poormancron' plugin to perform this
112 step if you are using a recent Friendika release. 'poormancron' may result in
113 perfomance and memory issues and is only suitable for small sites with one or
114 two users and a handful of contacts. To do this, edit the file 
115 ".htconfig.php" and look for a line describing your plugins. On a fresh 
116 installation, it will look like
117
118 $a->config['system']['addon'] = 'js_upload';
119
120 This indicates the "js_upload" addon module is enabled. You may add additional 
121 addons/plugins using this same line in the configuration file. Change it to 
122 read
123
124 $a->config['system']['addon'] = 'js_upload,poormancron';
125
126 and save your changes.
127
128
129  
130 #####################################################################
131
132                 If things don't work...
133
134 #####################################################################
135
136
137 #####################################################################
138 - If you get the message 
139         "System is currently unavailable. Please try again later"
140 #####################################################################
141         
142         Check your database settings. It usually means your database could not 
143 be opened or accessed. If the database resides on the same machine, check that
144 the database server name is "localhost". 
145
146 #####################################################################
147 - 500 Internal Error
148 #####################################################################
149
150         This could be the result of one of our Apache directives not being 
151 supported by your version of Apache. Examine your apache server logs.
152         You might remove the line "Options -Indexes" from the .htaccess file if 
153 you are using a Windows server as this has been known to cause problems.
154 Also check your file permissions. Your website and all contents must generally 
155 be world-readable.
156
157         It is likely that your web server reported the source of the problem in
158 its error log files. Please review these system error logs to determine what 
159 caused the problem. Often this will need to be resolved with your hosting
160 provider or (if self-hosted) your web server configuration. 
161
162 #####################################################################
163 - 400 and 4xx "File not found" errors
164 #####################################################################
165
166         First check your file permissions. Your website and all contents must 
167 generally be world-readable.
168
169         Ensure that mod-rewite is installed and working, and that your
170 .htaccess file is being used. To verify the latter, create a file test.out
171 containing the word "test" in the top directory of Friendika, make it world 
172 readable and point your web browser to
173
174 http://yoursitenamehere.com/test.out
175
176         This file should be blocked. You should get a permission denied message.
177
178         If you see the word "test" your Apache configuration is not allowing
179 your .htaccess file to be used (there are rules in this file to block access
180 to any file with .out at the end, as these are typically used for system logs).
181
182         Make certain the .htaccess file exists and is readable by everybody, then 
183 look for the existence of "AllowOverride None" in the Apache server 
184 configuration for your site. This will need to be changed to 
185 "AllowOverride All".  
186
187         If you do not see the word "test", your .htaccess is working, but it is 
188 likely that mod-rewrite is not installed in your web server or is not working.
189
190         On most flavour of Linux,
191
192 % a2enmod rewrite
193 % /etc/init.d/apache2 restart
194
195         Consult your hosting provider, experts on your particular Linux 
196 distribution or (if Windows) the provider of your Apache server software if 
197 you need to change either of these and can not figure out how. There is 
198 a lot of help available on the web. Google "mod-rewrite" along with the 
199 name of your operating system distribution or Apache package (if using 
200 Windows).
201
202   
203 #####################################################################
204 - If you are unable to write the file .htconfig.php during installation 
205 due to permissions issues:
206 #####################################################################
207
208         create an empty file with that name and give it world-write permission.
209 For Linux:
210
211 % touch .htconfig.php
212 % chmod 777 .htconfig.php
213
214 Retry the installation. As soon as the database has been created, 
215
216 ******* this is important *********
217
218 % chmod 755 .htconfig.php
219