diff options
Diffstat (limited to 'install')
-rw-r--r-- | install/INSTALL.txt | 49 | ||||
-rw-r--r-- | install/database.sql | 74 | ||||
-rw-r--r-- | install/update.php | 70 |
3 files changed, 173 insertions, 20 deletions
diff --git a/install/INSTALL.txt b/install/INSTALL.txt index 3f135c349..89b53c7c0 100644 --- a/install/INSTALL.txt +++ b/install/INSTALL.txt @@ -17,6 +17,17 @@ Red Matrix. Many will - but please review the requirements and confirm these 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/friendica/red/issues). 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. + + + Before you begin: Choose a domain name or subdomain name for your server. Put some thought into this - because changing it is currently not-supported. Things will break, and some of your friends may have difficulty communicating @@ -52,6 +63,40 @@ directory/path component in the URL) is REQUIRED. that you also copy .htaccess - as "dot" files are often hidden and aren't normally copied. + - If you are able to do so, we recommend using git to clone the + source repository rather than to use a packaged tar or zip file. + This makes the software much easier to update. The Linux command + to clone the repository into a directory "mywebsite" would be + + git clone https://github.com/friendica/red.git mywebsite + + - and then you can pick up the latest changes at any time with + + git pull + + - make sure folder *view/tpl/smarty3* exists and is writable by webserver + + mkdir view/tpl/smarty3 + + chmod 777 view/tpl/smarty3 + + - For installing addons + + - First you should be **on** your website folder + + cd mywebsite + + - Then you should clone the addon repository (separately) + + git clone https://github.com/friendica/red-addons.git addon + + - For keeping the addon tree updated, you should be on you addon tree and issue a git pull + + cd mywebsite/addon + + git pull + + 3. Create an empty database and note the access details (hostname, username, password, database name). @@ -123,7 +168,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 "localhost". +the database server name is the word "localhost". ##################################################################### - 500 Internal Error @@ -167,7 +212,7 @@ configuration for your site. This will need to be changed to If you do not see the word "test", your .htaccess is working, but it is likely that mod-rewrite is not installed in your web server or is not working. - On most flavour of Linux, + On most flavours of Linux, % a2enmod rewrite % /etc/init.d/apache2 restart diff --git a/install/database.sql b/install/database.sql index 0a86b8321..dbffbf59b 100644 --- a/install/database.sql +++ b/install/database.sql @@ -136,7 +136,7 @@ CREATE TABLE IF NOT EXISTS `challenge` ( `type` char(255) NOT NULL, `last_update` char(255) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `channel` ( `channel_id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -267,7 +267,7 @@ CREATE TABLE IF NOT EXISTS `event` ( KEY `aid` (`aid`), KEY `event_hash` (`event_hash`), KEY `event_xchan` (`event_xchan`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `fcontact` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -348,7 +348,7 @@ CREATE TABLE IF NOT EXISTS `group_member` ( KEY `uid` (`uid`), KEY `gid` (`gid`), KEY `xchan` (`xchan`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `hook` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -421,7 +421,7 @@ CREATE TABLE IF NOT EXISTS `item` ( `owner_xchan` char(255) NOT NULL DEFAULT '', `author_xchan` char(255) NOT NULL DEFAULT '', `mimetype` char(255) NOT NULL DEFAULT '', - `title` text NOT NULL DEFAULT '', + `title` text NOT NULL, `body` mediumtext NOT NULL, `app` char(255) NOT NULL DEFAULT '', `lang` char(64) NOT NULL DEFAULT '', @@ -493,7 +493,7 @@ CREATE TABLE IF NOT EXISTS `item_id` ( KEY `sid` (`sid`), KEY `service` (`service`), KEY `iid` (`iid`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `mail` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -504,6 +504,7 @@ CREATE TABLE IF NOT EXISTS `mail` ( `channel_id` int(10) unsigned NOT NULL, `title` text NOT NULL, `body` mediumtext NOT NULL, + `attach` mediumtext NOT NULL, `mid` char(255) NOT NULL, `parent_mid` char(255) NOT NULL, `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', @@ -535,7 +536,7 @@ CREATE TABLE IF NOT EXISTS `menu` ( PRIMARY KEY (`menu_id`), KEY `menu_channel_id` (`menu_channel_id`), KEY `menu_name` (`menu_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `menu_item` ( `mitem_id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -550,10 +551,10 @@ CREATE TABLE IF NOT EXISTS `menu_item` ( `mitem_menu_id` int(10) unsigned NOT NULL DEFAULT '0', `mitem_order` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`mitem_id`), - KEY `mitem_flags` (`mitem_flags`), KEY `mitem_channel_id` (`mitem_channel_id`), - KEY `mitem_menu_id` (`mitem_menu_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; + KEY `mitem_menu_id` (`mitem_menu_id`), + KEY `mitem_flags` (`mitem_flags`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `notify` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -594,7 +595,7 @@ CREATE TABLE IF NOT EXISTS `obj` ( KEY `obj_type` (`obj_type`), KEY `obj_channel` (`obj_channel`), KEY `obj_obj` (`obj_obj`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `outq` ( `outq_hash` char(255) NOT NULL, @@ -657,7 +658,7 @@ CREATE TABLE IF NOT EXISTS `photo` ( KEY `album` (`album`), KEY `scale` (`scale`), KEY `profile` (`profile`), - KEY `photo_flags` (`photo_flags`), + KEY `photo_flags` (`photo_flags`), KEY `type` (`type`), KEY `aid` (`aid`), KEY `xchan` (`xchan`), @@ -665,6 +666,29 @@ CREATE TABLE IF NOT EXISTS `photo` ( KEY `resource_id` (`resource_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `poll` ( + `poll_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `poll_channel` int(10) unsigned NOT NULL DEFAULT '0', + `poll_desc` text NOT NULL, + `poll_flags` int(11) NOT NULL DEFAULT '0', + `poll_votes` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`poll_id`), + KEY `poll_channel` (`poll_channel`), + KEY `poll_flags` (`poll_flags`), + KEY `poll_votes` (`poll_votes`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `poll_elm` ( + `pelm_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `pelm_poll` int(10) unsigned NOT NULL DEFAULT '0', + `pelm_desc` text NOT NULL, + `pelm_flags` int(11) NOT NULL DEFAULT '0', + `pelm_result` float NOT NULL DEFAULT '0', + PRIMARY KEY (`pelm_id`), + KEY `pelm_poll` (`pelm_poll`), + KEY `pelm_result` (`pelm_result`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + CREATE TABLE IF NOT EXISTS `profile` ( `id` int(11) NOT NULL AUTO_INCREMENT, `profile_guid` char(64) NOT NULL DEFAULT '', @@ -675,7 +699,7 @@ CREATE TABLE IF NOT EXISTS `profile` ( `hide_friends` tinyint(1) NOT NULL DEFAULT '0', `name` char(255) NOT NULL, `pdesc` char(255) NOT NULL, - `chandesc` text NOT NULL DEFAULT '', + `chandesc` text NOT NULL, `dob` char(32) NOT NULL DEFAULT '0000-00-00', `dob_tz` char(255) NOT NULL DEFAULT 'UTC', `address` char(255) NOT NULL, @@ -769,7 +793,7 @@ CREATE TABLE IF NOT EXISTS `register` ( KEY `hash` (`hash`), KEY `created` (`created`), KEY `uid` (`uid`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `session` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, @@ -841,7 +865,7 @@ CREATE TABLE IF NOT EXISTS `term` ( KEY `imgurl` (`imgurl`), KEY `term_hash` (`term_hash`), KEY `parent_hash` (`parent_hash`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `tokens` ( `id` varchar(40) NOT NULL, @@ -876,7 +900,19 @@ CREATE TABLE IF NOT EXISTS `verify` ( KEY `token` (`token`), KEY `meta` (`meta`), KEY `created` (`created`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `vote` ( + `vote_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `vote_poll` int(11) NOT NULL DEFAULT '0', + `vote_element` int(11) NOT NULL DEFAULT '0', + `vote_result` text NOT NULL, + `vote_xchan` char(255) NOT NULL DEFAULT '', + PRIMARY KEY (`vote_id`), + UNIQUE KEY `vote_vote` (`vote_poll`,`vote_element`,`vote_xchan`), + KEY `vote_poll` (`vote_poll`), + KEY `vote_element` (`vote_element`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `xchan` ( `xchan_hash` char(255) NOT NULL, @@ -890,6 +926,8 @@ CREATE TABLE IF NOT EXISTS `xchan` ( `xchan_addr` char(255) NOT NULL DEFAULT '', `xchan_url` char(255) NOT NULL DEFAULT '', `xchan_connurl` char(255) NOT NULL DEFAULT '', + `xchan_follow` char(255) NOT NULL DEFAULT '', + `xchan_connpage` char(255) NOT NULL DEFAULT '', `xchan_name` char(255) NOT NULL DEFAULT '', `xchan_network` char(255) NOT NULL DEFAULT '', `xchan_instance_url` char(255) NOT NULL DEFAULT '', @@ -901,10 +939,12 @@ CREATE TABLE IF NOT EXISTS `xchan` ( KEY `xchan_addr` (`xchan_addr`), KEY `xchan_name` (`xchan_name`), KEY `xchan_network` (`xchan_network`), - KEY `xchan_instance_url` (`xchan_instance_url`), KEY `xchan_url` (`xchan_url`), KEY `xchan_flags` (`xchan_flags`), - KEY `xchan_connurl` (`xchan_connurl`) + KEY `xchan_connurl` (`xchan_connurl`), + KEY `xchan_follow` (`xchan_follow`), + KEY `xchan_connpage` (`xchan_connpage`), + KEY `xchan_instance_url` (`xchan_instance_url`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `xconfig` ( diff --git a/install/update.php b/install/update.php index c97b5619f..9beb25254 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1059 ); +define( 'UPDATE_VERSION' , 1064 ); /** * @@ -682,3 +682,71 @@ ADD INDEX ( `mitem_flags` ) "); return UPDATE_SUCCESS; return UPDATE_FAILED; } + +function update_r1059() { + $r = q("ALTER TABLE `mail` ADD `attach` MEDIUMTEXT NOT NULL DEFAULT '' AFTER `body` "); + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + +function update_r1060() { + + $r = q("CREATE TABLE IF NOT EXISTS `vote` ( + `vote_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `vote_poll` int(11) NOT NULL DEFAULT '0', + `vote_element` int(11) NOT NULL DEFAULT '0', + `vote_result` text NOT NULL, + `vote_xchan` char(255) NOT NULL DEFAULT '', + PRIMARY KEY (`vote_id`), + UNIQUE KEY `vote_vote` (`vote_poll`,`vote_element`,`vote_xchan`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 "); + + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + +function update_r1061() { + $r = q("ALTER TABLE `vote` ADD INDEX ( `vote_poll` ), ADD INDEX ( `vote_element` ) "); + + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + +function update_r1062() { + $r1 = q("CREATE TABLE IF NOT EXISTS `poll` ( +`poll_id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , +`poll_channel` INT UNSIGNED NOT NULL DEFAULT '0', +`poll_desc` TEXT NOT NULL DEFAULT '', +`poll_flags` INT NOT NULL DEFAULT '0', +`poll_votes` INT NOT NULL DEFAULT '0', +KEY `poll_channel` (`poll_channel`), +KEY `poll_flags` (`poll_flags`), +KEY `poll_votes` (`poll_votes`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 "); + + $r2 = q("CREATE TABLE IF NOT EXISTS `poll_elm` ( +`pelm_id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , +`pelm_poll` INT UNSIGNED NOT NULL DEFAULT '0', +`pelm_desc` TEXT NOT NULL DEFAULT '', +`pelm_flags` INT NOT NULL DEFAULT '0', +`pelm_result` FLOAT NOT NULL DEFAULT '0', +KEY `pelm_poll` (`pelm_poll`), +KEY `pelm_result` (`pelm_result`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 "); + + if($r1 && $r2) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + +function update_r1063() { + $r = q("ALTER TABLE `xchan` ADD `xchan_follow` CHAR( 255 ) NOT NULL DEFAULT '' AFTER `xchan_connurl` , +ADD `xchan_connpage` CHAR( 255 ) NOT NULL DEFAULT '' AFTER `xchan_follow` , +ADD INDEX ( `xchan_follow` ), ADD INDEX ( `xchan_connpage`) "); + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} |