aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rw-r--r--install/INSTALL.txt36
-rw-r--r--install/schema_mysql.sql4
-rw-r--r--install/schema_postgres.sql6
-rw-r--r--install/update.php18
4 files changed, 45 insertions, 19 deletions
diff --git a/install/INSTALL.txt b/install/INSTALL.txt
index f5edf009f..d042f34ec 100644
--- a/install/INSTALL.txt
+++ b/install/INSTALL.txt
@@ -42,10 +42,16 @@ site for the first time, please use the SSL ("https://") URL if SSL is
available. This will avoid problems later. The installation routine will not
allow you to use a non browser-valid certificate.
-This restriction is incorporated because public posts from you may for example
-contain references to images on your own hub. If your certificate is not known
-by the internet browser of users they get a warning message complaining about
-the invalid certificate.
+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.
Free "browser-valid" certificates are available from providers such as StartSSL.
@@ -57,9 +63,11 @@ use SSL, your webserver must not listen on port 443 at all.
1. Requirements
- Apache with mod-rewrite enabled and "AllowOverride All" so you can use a
- local .htaccess file
+ local .htaccess file. Some folks have successfully used nginx and lighttpd.
+ Example config scripts are available for these platforms in doc/install.
+ Apache and nginx have the most support.
- - PHP 5.3+. The later the better.
+ - PHP 5.3+. 5.4 or 5.5 is highly recommended. The later the better.
- PHP *command line* access with register_argc_argv set to true in the
php.ini file - and with no hosting provider restrictions on the use of
@@ -70,7 +78,7 @@ use SSL, your webserver must not listen on port 443 at all.
- some form of email server or email gateway such that PHP mail() works
- - Mysql 5.x or MariaDB
+ - Mysql 5.x or MariaDB or postgres database server.
- ability to schedule jobs with cron.
@@ -115,15 +123,17 @@ use SSL, your webserver must not listen on port 443 at all.
cd mywebsite
- - Then you should clone the addon repository (separately)
+ - Then you should clone the addon repository (separately). We'll give this repository
+ a nickname of 'matrix'. You can pull in other redmatrix addon repositories by
+ giving them different nicknames.
- git clone https://github.com/friendica/red-addons.git addon
+ util/add_addon_repo https://github.com/friendica/red-addons.git matrix
- - For keeping the addon tree updated, you should be on you addon tree and
- issue a git pull
+ - 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/addon
- git pull
+ cd mywebsite
+ util/update_addon_repo matrix
3. Create an empty database and note the access details (hostname, username,
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql
index 247b33814..da78d9c61 100644
--- a/install/schema_mysql.sql
+++ b/install/schema_mysql.sql
@@ -1256,6 +1256,7 @@ CREATE TABLE IF NOT EXISTS `site` (
`site_sellpage` char(255) NOT NULL DEFAULT '',
`site_location` char(255) NOT NULL DEFAULT '',
`site_realm` char(255) NOT NULL DEFAULT '',
+ `site_valid` smallint NOT NULL DEFAULT '0',
PRIMARY KEY (`site_url`),
KEY `site_flags` (`site_flags`),
KEY `site_update` (`site_update`),
@@ -1264,7 +1265,8 @@ CREATE TABLE IF NOT EXISTS `site` (
KEY `site_access` (`site_access`),
KEY `site_sellpage` (`site_sellpage`),
KEY `site_pull` (`site_pull`),
- KEY `site_realm` (`site_realm`)
+ KEY `site_realm` (`site_realm`),
+ KEY `site_valid` (`site_valid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql
index d852f38e9..44b8f16a4 100644
--- a/install/schema_postgres.sql
+++ b/install/schema_postgres.sql
@@ -528,7 +528,7 @@ CREATE TABLE "item" (
"item_restrict" bigint NOT NULL DEFAULT '0',
"item_flags" bigint NOT NULL DEFAULT '0',
"item_private" numeric(4) NOT NULL DEFAULT '0',
- "item_unseen" smallint(1) NOT NULL DEFAULT '0',
+ "item_unseen" smallint NOT NULL DEFAULT '0',
"item_search_vector" tsvector,
PRIMARY KEY ("id")
);
@@ -959,6 +959,7 @@ CREATE TABLE "site" (
"site_sellpage" text NOT NULL DEFAULT '',
"site_location" text NOT NULL DEFAULT '',
"site_realm" text NOT NULL DEFAULT '',
+ "site_valid" smallint NOT NULL DEFAULT '0',
PRIMARY KEY ("site_url")
);
create index "site_flags" on site ("site_flags");
@@ -968,6 +969,7 @@ create index "site_register" on site ("site_register");
create index "site_access" on site ("site_access");
create index "site_sellpage" on site ("site_sellpage");
create index "site_realm" on site ("site_realm");
+create index "site_valid" on site ("site_valid");
CREATE TABLE "source" (
"src_id" serial NOT NULL,
@@ -1161,7 +1163,7 @@ CREATE TABLE "xperm" (
"xp_client" varchar( 20 ) NOT NULL DEFAULT '',
"xp_channel" bigint NOT NULL DEFAULT '0',
"xp_perm" varchar( 64 ) NOT NULL DEFAULT '',
- PRIMARY_KEY ("xp_id")
+ PRIMARY KEY ("xp_id")
);
create index "xp_client" on xperm ("xp_client");
create index "xp_channel" on xperm ("xp_channel");
diff --git a/install/update.php b/install/update.php
index 86731e165..70ffb1ebf 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1137 );
+define( 'UPDATE_VERSION' , 1138 );
/**
*
@@ -26,10 +26,14 @@ define( 'UPDATE_VERSION' , 1137 );
* The DB_UPDATE_VERSION will always be one greater than the last numbered script in this file.
*
* If you change the database schema, the following are required:
- * 1. Update the file database.sql to match the new schema.
+ * 1. Update the files schema_mysql.sql and schema_postgres.sql to match the new schema.
+ * Be sure to read doc/sql_conventions.bb ($yoururl/help/sql_conventions) use only standard
+ * SQL data types where possible to keep differences in the files to a minimum
* 2. Update this file by adding a new function at the end with the number of the current DB_UPDATE_VERSION.
* This function should modify the current database schema and perform any other steps necessary
- * to ensure that upgrade is silent and free from requiring interaction.
+ * to ensure that upgrade is silent and free from requiring interaction. Review to ensure that it
+ * will run correctly on both postgres and MySQL/Mariadb. It is very difficult and messy to fix DB update
+ * errors. Once pushed, it requires a new update which undoes any damage and performs the corrected updated.
* 3. Increment the DB_UPDATE_VERSION in boot.php *AND* the UPDATE_VERSION in this file to match it
* 4. TEST the upgrade prior to checkin and filing a pull request.
*
@@ -1568,3 +1572,11 @@ function update_r1136() {
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}
+
+function update_r1137() {
+ $r1 = q("alter table site add site_valid smallint not null default '0' ");
+ $r2 = q("create index site_valid on site ( site_valid ) ");
+ if($r1 && $r2)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}