aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rw-r--r--install/INSTALL.txt107
-rw-r--r--install/schema_mysql.sql4
-rw-r--r--install/schema_postgres.sql5
-rw-r--r--install/update.php32
4 files changed, 116 insertions, 32 deletions
diff --git a/install/INSTALL.txt b/install/INSTALL.txt
index 94ec511d8..7d4ed9534 100644
--- a/install/INSTALL.txt
+++ b/install/INSTALL.txt
@@ -1,12 +1,12 @@
-Hubzilla Installation
+Software Installation
-We've tried very hard to ensure that Hubzilla will run on commodity
+We've tried very hard to ensure that this software will run on commodity
hosting platforms - such as those used to host Wordpress blogs and Drupal
websites. It will run on most any Linux VPS system. Windows LAMP platforms
such as XAMPP and WAMP are not officially supported at this time - however
we welcome patches if you manage to get it working.
-Be aware that the Hubzilla is more than a simple web application. It is a
+Be aware that this software is more than a simple web application. It is a
complex communications system which more closely resembles an email server
than a web server. For reliability and performance, messages are delivered in
the background and are queued for later delivery when sites are down. This
@@ -17,20 +17,24 @@ with your hosting provider prior to installation. (And preferably before
entering into a long-term contract.)
If you encounter installation issues, please let us know via the Github issue
-tracker (https://github.com/redmatrix/hubzilla/issues). Please be as clear as you
-can about your operating environment and provide as much detail as possible
+tracker where you downloaded the software. Please be as clear as
+you can about your operating environment and provide as much detail as possible
about any error messages you may see, so that we can prevent it from happening
in the future. Due to the large variety of operating systems and PHP platforms
-in existence we may have only limited ability to debug your PHP installation or
-acquire any missing modules - but we will do our best to solve any general code
-issues.
+in existence we may have only limited ability to debug your PHP installation
+or acquire any missing modules - but we will do our best to solve any general
+code issues.
-Before you begin: Choose a domain name or subdomain name for your server.
+**Before you begin**
-Hubzilla can only be installed into the root of a domain or
-sub-domain, and can not be installed using alternate TCP ports.
+Choose a domain name or subdomain name for your server.
+
+The software can only be installed into the root of a domain or
+sub-domain, and can not be installed using alternate TCP ports. These
+restrictions may be relaxed in the future, but will be inconvenient to work
+with, so we still STRONGLY recommend you abide by them.
Decide if you will use SSL and obtain an SSL certificate before software
installation. You SHOULD use SSL. If you use SSL, you MUST use a
@@ -46,12 +50,12 @@ This restriction is incorporated because public posts from you may contain
references to images on your own hub. Other members viewing their stream on
other hubs will get warnings if your certificate is not trusted by their web
browser. This will confuse many people because this is a decentralised network
-and they will get the warning about your hub while viewing their own hub and may
-think their own hub has an issue. These warnings are very technical and scary to
-some folks, many of whom will not know how to proceed except to follow the browser
-advice. This is disruptive to the community. That said, we recognise the issues
-surrounding the current certificate infrastructure and agree there are many
-problems, but that doesn't change the requirement.
+and they will get the warning about your hub while viewing their own hub and
+may think their own hub has an issue. These warnings are very technical and
+scary to some folks, many of whom will not know how to proceed except to
+follow the browser advice. This is disruptive to the community. That said, we
+recognise the issues surrounding the current certificate infrastructure and
+agree there are many problems, but that doesn't change the requirement.
Free "browser-valid" certificates are available from providers such as StartSSL
and LetsEncrypt.
@@ -63,13 +67,36 @@ SSL port first, before falling back to a less secure connection. If you do not
use SSL, your webserver MUST NOT listen on port 443 at all.
If you use LetsEncrypt to provide certificates and create a file under
-.well-known/acme-challenge so that LetsEncrypt can verify your domain ownership,
-please remove or rename the .well-known directory as soon as the certificate is
-generated. Hubzilla will provide its own handler for ".well-known" services when
-it is installed, and an existing directory in this location may prevent some of
-these services from working correctly. This should not be a problem with Apache,
-but may be an issue with nginx or other web server platforms.
+.well-known/acme-challenge so that LetsEncrypt can verify your domain
+ownership, please remove or rename the .well-known directory as soon as the
+certificate is generated. The software will provide its own handler for
+".well-known" services when it is installed, and an existing directory in this
+location may prevent some of these services from working correctly. This
+should not be a problem with Apache, but may be an issue with nginx or other
+web server platforms.
+
+**Server Roles**
+
+During installation you will be asked to choose a server role. Your choices are
+1. Basic
+2. Standard
+3. Pro
+
+Basic is highly simplified, with almost all the advanced functionality and
+complexity removed or permanently disabled.
+Standard is typically used for federated network use, when you wish to interact
+with other networks using other protocols. Not all the built in features and
+functionality work correctly when other networks are involved. All advanced
+and complex features are available to all members by default.
+
+Pro is for sites that wish to make full use of the built-in abilities and
+features, but **not** to interact with other networks. Advanced features are
+enabled according to a per-account 'techlevel' which reduces complexity
+initially and allows members to adjust the software complexity to match their
+technical abilities.
+
+**Installation**
1. Requirements
- Apache with mod-rewrite enabled and "AllowOverride All" so you can use a
@@ -96,7 +123,7 @@ but may be an issue with nginx or other web server platforms.
- Installation into a top-level domain or sub-domain (without a
directory/path component in the URL) is REQUIRED.
-2. Unpack the Hubzilla files into the root of your web server document area.
+2. Unpack the project files into the root of your web server document area.
If you copy the directory tree to your webserver, make sure that you
also copy .htaccess - as "dot" files are often hidden and aren't normally
@@ -156,12 +183,21 @@ but may be an issue with nginx or other web server platforms.
3. Create an empty database and note the access details (hostname, username,
-password, database name). The MySQL client libraries will fallback to socket
+password, database name). The PDO database libraries will fallback to socket
communication if the hostname is 'localhost' and some people have reported
issues with the socket implementation. Use it if your requirements mandate.
Otherwise if the database is served on the local server, use '127.0.0.1' for
-the hostname. See https://dev.mysql.com/doc/refman/5.0/en/connecting.html
-for more information.
+the hostname.
+
+Internally we now use the PDO library for database connections. If you
+encounter a database configuration which cannot be expressed on the setup form
+(for instance using MySQL with an unusual socket location); you can supply
+the PDO connection string as the database hostname. For instance
+
+ mysql:unix_socket=/my/special/socket_path
+
+You should still fill in all other applicable form values as needed.
+
4. If you know in advance that it will be impossible for the web server to
write or create files in your web directory, create an empty file called
@@ -223,7 +259,7 @@ You should also be sure that App::$config['system']['php_path'] is set correctly
in your .htconfig.php file, it should look like (changing it to the correct
PHP location):
-App::$config['system']['php_path'] = '/usr/local/php55/bin/php';
+App::$config['system']['php_path'] = '/usr/local/php56/bin/php';
#####################################################################
@@ -297,6 +333,21 @@ name of your operating system distribution or Apache package.
#####################################################################
+- If you see an error during database setup that DNS lookup failed
+#####################################################################
+
+This is a known issue on some versions of FreeBSD, because
+dns_get_record() fails for some lookups. Create a file in your top webserver
+folder called '.htpreconfig.php' and inside it put the following:
+
+<?php
+App::$config['system']['do_not_check_dns'] = 1;
+
+This should allow installation to proceed. Once the database has been
+installed, add the same config statement (but not the '<?php' line) to the
+.htconfig.php file which was created during installation.
+
+#####################################################################
- If you are unable to write the file .htconfig.php during installation
due to permissions issues:
#####################################################################
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql
index d72684a90..e143e252a 100644
--- a/install/schema_mysql.sql
+++ b/install/schema_mysql.sql
@@ -504,10 +504,11 @@ CREATE TABLE IF NOT EXISTS `hook` (
`hook` char(255) NOT NULL DEFAULT '',
`file` char(255) NOT NULL DEFAULT '',
`fn` char(255) NOT NULL DEFAULT '',
- `priority` int(11) unsigned NOT NULL DEFAULT '0',
+ `priority` smallint NOT NULL DEFAULT '0',
`hook_version` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `hook` (`hook`),
+ KEY `priority` (`priority`),
KEY `hook_version` (`hook_version`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
@@ -1152,6 +1153,7 @@ CREATE TABLE IF NOT EXISTS `site` (
`site_type` smallint NOT NULL DEFAULT '0',
`site_project` char(255) NOT NULL DEFAULT '',
`site_version` varchar(32) NOT NULL DEFAULT '',
+ `site_crypto` text NOT NULL DEFAULT '',
PRIMARY KEY (`site_url`),
KEY `site_flags` (`site_flags`),
KEY `site_update` (`site_update`),
diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql
index ab9a5cff4..b1b1c8474 100644
--- a/install/schema_postgres.sql
+++ b/install/schema_postgres.sql
@@ -492,13 +492,15 @@ CREATE TABLE "hook" (
"hook" text NOT NULL,
"file" text NOT NULL,
"fn" text NOT NULL,
- "priority" bigint NOT NULL DEFAULT '0',
+ "priority" smallint NOT NULL DEFAULT '0',
"hook_version" smallint NOT NULL DEFAULT '0',
PRIMARY KEY ("id")
);
create index "hook_idx" on hook ("hook");
create index "hook_version_idx" on hook ("hook_version");
+create index "hook_priority_idx" on hook ("priority");
+
CREATE TABLE "hubloc" (
"hubloc_id" serial NOT NULL,
"hubloc_guid" text NOT NULL DEFAULT '',
@@ -1132,6 +1134,7 @@ CREATE TABLE "site" (
"site_type" smallint NOT NULL DEFAULT '0',
"site_project" text NOT NULL DEFAULT '',
"site_version" text NOT NULL DEFAULT '',
+ "site_crypto" text NOT NULL DEFAULT '',
PRIMARY KEY ("site_url")
);
create index "site_flags" on site ("site_flags");
diff --git a/install/update.php b/install/update.php
index 921d16e2f..dbf3a08ca 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1183 );
+define( 'UPDATE_VERSION' , 1185 );
/**
*
@@ -1095,7 +1095,7 @@ function update_r1097() {
$r = q("select hubloc_id, hubloc_addr from hubloc where hubloc_addr like '%%/%%'");
if($r) {
foreach($r as $rr) {
- q("update hubloc set hubloc_addr = '%s' where hubloc_id = %d limit 1",
+ q("update hubloc set hubloc_addr = '%s' where hubloc_id = %d",
dbesc(substr($rr['hubloc_addr'],0,strpos($rr['hubloc_addr'],'/'))),
intval($rr['hubloc_id'])
);
@@ -2444,3 +2444,31 @@ function update_r1182() {
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}
+
+
+function update_r1183() {
+
+ if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
+ $r1 = q("alter table hook ALTER COLUMN priority TYPE smallint");
+ $r2 = q("alter table hook ALTER COLUMN priority SET NOT NULL");
+ $r3 = q("alter table hook ALTER COLUMN priority SET DEFAULT '0'");
+ $r1 = $r1 && $r2 && $r3;
+ }
+ else {
+ $r1 = q("alter table hook CHANGE priority priority smallint NOT NULL DEFAULT '0' ");
+ }
+ $r2 = q("create index priority_idx on hook (priority)");
+
+ if($r1 && $r2)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+function update_r1184() {
+
+ $r1 = q("alter table site add site_crypto text not null default '' ");
+
+ if($r1)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}