aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rw-r--r--install/INSTALL.txt52
-rwxr-xr-xinstall/htconfig.sample.php13
-rw-r--r--install/schema_mysql.sql15
-rw-r--r--install/schema_postgres.sql13
-rw-r--r--install/update.php49
5 files changed, 124 insertions, 18 deletions
diff --git a/install/INSTALL.txt b/install/INSTALL.txt
index 8ca74c23b..37faddc55 100644
--- a/install/INSTALL.txt
+++ b/install/INSTALL.txt
@@ -1,6 +1,6 @@
Hubzilla Installation
-We've tried very hard to ensure that the Hubzilla will run on commodity
+We've tried very hard to ensure that Hubzilla 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
@@ -29,7 +29,7 @@ issues.
Before you begin: Choose a domain name or subdomain name for your server.
-The Hubzilla can only be installed into the root of a domain or
+Hubzilla can only be installed into the root of a domain or
sub-domain, and can not be installed using alternate TCP ports.
Decide if you will use SSL and obtain an SSL certificate before software
@@ -53,13 +53,22 @@ 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.
+Free "browser-valid" certificates are available from providers such as StartSSL
+and LetsEncrypt.
If you do NOT use SSL, there may be a delay of up to a minute for the initial
install script - while we check the SSL port to see if anything responds there.
When communicating with new sites, Hubzilla always attempts connection on the
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.
+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.
+
1. Requirements
- Apache with mod-rewrite enabled and "AllowOverride All" so you can use a
@@ -126,18 +135,18 @@ use SSL, your webserver must not listen on port 443 at all.
cd mywebsite
- Then you should clone the addon repository (separately). We'll give this repository
- a nickname of 'matrix'. You can pull in other hubzilla addon repositories by
+ a nickname of 'hzaddons'. You can pull in other hubzilla addon repositories by
giving them different nicknames.
- util/add_addon_repo https://github.com/redmatrix/hubzilla-addons.git matrix
+ util/add_addon_repo https://github.com/redmatrix/hubzilla-addons.git hzaddons
- For keeping the addon tree updated, you should be on your top level website
directory and issue an update command for that repository.
cd mywebsite
- util/update_addon_repo matrix
+ util/update_addon_repo hzaddons
- - Create searchable represenations of the online documentation. You may do this any time
+ - Create searchable representations of the online documentation. You may do this any time
that the documentation is updated.
cd mywebsite
@@ -177,7 +186,16 @@ Registration errors should all be recoverable automatically.
If you get any *critical* failure at this point, it generally indicates the
database was not installed correctly. You might wish to move/rename
.htconfig.php to another name and empty (called 'dropping') the database
-tables, so that you can start fresh.
+tables, so that you can start fresh.
+
+In order for your account to be given administrator access, it should be the
+first account created, and the email address provided during registration
+must match the "administrator email" address you provided during
+installation. Otherwise to give an account administrator access,
+add 4096 to the account_roles for that account in the database.
+
+For your site security there is no way to provide administrator access
+using web forms.
****************************************************************************
****************************************************************************
@@ -185,7 +203,7 @@ tables, so that you can start fresh.
****************************************************************************
****************************************************************************
-8. Set up a cron job or scheduled task to run the poller once every 5-10
+8. Set up a cron job or scheduled task to run the poller once every 10-15
minutes to pick up the recent "public" postings of your friends. Example:
cd /base/directory; /path/to/php include/poller.php
@@ -201,10 +219,11 @@ You can generally find the location of PHP by executing "which php". If you
have troubles with this section please contact your hosting provider for
assistance. Hubzilla will not work correctly if you cannot perform this step.
-You should also be sure that $a->config['system']['php_path'] is set correctly,
-it should look like (changing it to the correct PHP location)
+You should also be sure that $a->config['system']['php_path'] is set correctly
+in your .htconfig.php file, it should look like (changing it to the correct
+PHP location):
-$a->config['system']['php_path'] = '/usr/local/php53/bin/php';
+$a->config['system']['php_path'] = '/usr/local/php55/bin/php';
#####################################################################
@@ -221,7 +240,7 @@ $a->config['system']['php_path'] = '/usr/local/php53/bin/php';
Check your database settings. It usually means your database could not be
opened or accessed. If the database resides on the same machine, check that
-the database server name is the word "localhost".
+the database server name is "127.0.0.1" or the word "localhost".
#####################################################################
- 500 Internal Error
@@ -296,7 +315,7 @@ Retry the installation. As soon as the database has been created,
#####################################################################
- Some configurations with "suhosin" security are configured without
-an ability to run external processes. The Hubzilla requires this ability.
+an ability to run external processes. Hubzilla requires this ability.
Following are some notes provided by one of our members.
#####################################################################
@@ -386,4 +405,5 @@ MaxRequestWorkers to 70.
Here you can read more about Apache performance tuning:
https://httpd.apache.org/docs/2.4/misc/perf-tuning.html
-There are tons of scripts to help you with fine-tuning your Apache installation. Just search with your favorite search engine 'apache fine-tuning script'.
+There are tons of scripts to help you with fine-tuning your Apache installation.
+Just search with your favorite search engine 'apache fine-tuning script'.
diff --git a/install/htconfig.sample.php b/install/htconfig.sample.php
index 21697a951..f64e2571b 100755
--- a/install/htconfig.sample.php
+++ b/install/htconfig.sample.php
@@ -17,7 +17,9 @@ $db_port = 0; // leave 0 for default or set your port
$db_user = 'mysqlusername';
$db_pass = 'mysqlpassword';
$db_data = 'mysqldatabasename';
+$db_type = 0; // use 1 for postgres, 0 for mysql
+define( 'UNO', 0 );
/*
* Notice: Many of the following settings will be available in the admin panel
@@ -37,13 +39,22 @@ $db_data = 'mysqldatabasename';
$default_timezone = 'America/Los_Angeles';
-// What is your site name?
+// What is your site name? DO NOT ADD A TRAILING SLASH!
$a->config['system']['baseurl'] = 'https://myredsite.example';
$a->config['system']['sitename'] = "Hubzilla";
$a->config['system']['location_hash'] = 'if the auto install failed, put a unique random string here';
+// These lines set additional security headers to be sent with all responses
+// You may wish to set transport_security_header to 0 if your server already sends
+// this header. content_security_policy may need to be disabled if you wish to
+// run the piwik analytics plugin or include other offsite resources on a page
+
+$a->config['system']['transport_security_header'] = 1;
+$a->config['system']['content_security_policy'] = 1;
+
+
// Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED.
// Be certain to create your own personal account before setting
// REGISTER_CLOSED. 'register_text' (if set) will be displayed prominently on
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql
index 3d7ea41df..693cad1a8 100644
--- a/install/schema_mysql.sql
+++ b/install/schema_mysql.sql
@@ -543,6 +543,21 @@ CREATE TABLE IF NOT EXISTS `hubloc` (
KEY `hubloc_error` (`hubloc_error`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `iconfig` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `iid` int(11) NOT NULL DEFAULT '0',
+ `cat` char(255) NOT NULL DEFAULT '',
+ `k` char(255) NOT NULL DEFAULT '',
+ `v` mediumtext NOT NULL,
+ `sharing` int(11) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `iid` (`iid`),
+ KEY `cat` (`cat`),
+ KEY `k` (`k`),
+ KEY `sharing` (`sharing`),
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
CREATE TABLE IF NOT EXISTS `issue` (
`issue_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`issue_created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql
index 5cabbc2c9..964ca5966 100644
--- a/install/schema_postgres.sql
+++ b/install/schema_postgres.sql
@@ -538,6 +538,19 @@ create index "hubloc_primary" on hubloc ("hubloc_primary");
create index "hubloc_orphancheck" on hubloc ("hubloc_orphancheck");
create index "hubloc_error" on hubloc ("hubloc_error");
create index "hubloc_deleted" on hubloc ("hubloc_deleted");
+CREATE TABLE "iconfig" (
+ "id" serial NOT NULL,
+ "iid" bigint NOT NULL DEFAULT '0',
+ "cat" text NOT NULL DEFAULT '',
+ "k" text NOT NULL DEFAULT '',
+ "v" text NOT NULL DEFAULT '',
+ "sharing" int NOT NULL DEFAULT '0',
+ PRIMARY_KEY("id")
+);
+create index "iconfig_iid" on iconfig ("iid");
+create index "iconfig_cat" on iconfig ("cat");
+create index "iconfig_k" on iconfig ("k");
+create index "iconfig_sharing" on iconfig ("sharing");
CREATE TABLE "issue" (
"issue_id" serial NOT NULL,
"issue_created" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00',
diff --git a/install/update.php b/install/update.php
index 24f4f21d5..d21295be7 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1161 );
+define( 'UPDATE_VERSION' , 1163 );
/**
*
@@ -1957,3 +1957,50 @@ function update_r1160() {
return UPDATE_FAILED;
}
+function update_r1161() {
+
+ if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
+ $r1 = q("CREATE TABLE \"iconfig\" (
+ \"id\" serial NOT NULL,
+ \"iid\" bigint NOT NULL DEFAULT '0',
+ \"cat\" text NOT NULL DEFAULT '',
+ \"k\" text NOT NULL DEFAULT '',
+ \"v\" text NOT NULL DEFAULT '',
+ PRIMARY_KEY(\"id\")
+) ");
+$r2 = q("create index \"iconfig_iid\" on iconfig (\"iid\") ");;
+$r3 = q("create index \"iconfig_cat\" on iconfig (\"cat\") ");
+$r4 = q("create index \"iconfig_k\" on iconfig (\"k\") ");
+ $r = $r1 && $r2 && $r3 && $r4;
+ }
+ else {
+ $r = q("CREATE TABLE IF NOT EXISTS `iconfig` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `iid` int(11) NOT NULL DEFAULT '0',
+ `cat` char(255) NOT NULL DEFAULT '',
+ `k` char(255) NOT NULL DEFAULT '',
+ `v` mediumtext NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `iid` (`iid`),
+ KEY `cat` (`cat`),
+ KEY `k` (`k`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 ");
+
+ }
+
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+function update_r1162() {
+ $r1 = q("alter table iconfig add sharing int not null default '0' ");
+
+ if(ACTIVE_DBTYPE == DBTYPE_POSTGRES)
+ $r2 = q("create index \"iconfig_sharing\" on iconfig (\"sharing\") ");
+ else
+ $r2 = q("alter table iconfig add index ( sharing ) ");
+ if($r1 && $r2)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+} \ No newline at end of file