Difference between revisions of "User:Andreas Plank/new wiki"

From Biowikifarm Metawiki
Jump to: navigation, search
m (+User Rights)
m (Database)
Line 10: Line 10:
  
 
== Database ==
 
== Database ==
http://biowikifarm.net/phpmyadmin_v3-3-7/
+
http://biowikifarm.net/phpmyadmin_v3-3-7/ (there is a bug in 3.7.7 that crashes because it merges some SQL together with  <code>current_timestamp()</code>) but you can export the whole DB structure and execute it on the new data base)
 +
* export structure of a database to SQL-query window, copy that SQL code, change to new database or
 
* copy z_en_template ->  as new database, e.g. newdatabase
 
* copy z_en_template ->  as new database, e.g. newdatabase
* or export structure as SQL and execute it in newdatabase
+
 
  
 
grant rights to user 'wikiuser' for new database
 
grant rights to user 'wikiuser' for new database

Revision as of 18:56, 9 February 2020

$wgSiteNotice = "Announcing message of upgrade";
$wgReadOnly = 'Database is in read only mode, because of Upgrading to MediaWiki 1.26.XX';
cd /var/www
# find an extension
sudo find . -maxdepth 3 -iname '*settings*.php' -type f -exec sudo grep --ignore-case --with-filename --line-number --color=auto "/Arrays" '{}' ';'

Database

http://biowikifarm.net/phpmyadmin_v3-3-7/ (there is a bug in 3.7.7 that crashes because it merges some SQL together with current_timestamp()) but you can export the whole DB structure and execute it on the new data base)

  • export structure of a database to SQL-query window, copy that SQL code, change to new database or
  • copy z_en_template -> as new database, e.g. newdatabase


grant rights to user 'wikiuser' for new database

-- DROP , INDEX ,CREATE TEMPORARY TABLES seems necessary only for Semantic MediaWiki Wikis or maybe only Semantic Forms
GRANT SELECT , INSERT , UPDATE , DELETE , DROP , INDEX ,CREATE TEMPORARY TABLES ON  `newdatabase` . * TO  'wikiuser'@'localhost';

Wiki

Add Wiki paths to and run Mediawiki installation/create or upgrade vhost-wiki.sh

Settings

Adjust LocalSettings.php/Common Settings

  • secret key (!)
    date | sha224sum
    
  • db, paths, logo, content language
  • for SMW in Common Settings: use the dbname as switch

Run maintenance wiki update script

sudo -u www-data php ./maintenance/update.php --dbuser wikiadmin --conf ./LocalSettings.php

User Rights

php ./maintenance/createAndPromote.php --help  --conf ./LocalSettings.php 
sudo -u www-data php ./maintenance/createAndPromote.php --force  --bureaucrat --sysop --conf ./LocalSettings.php "User Name"

NGINX

Add URL to /etc/nginx/sites-available/

cd /etc/nginx/sites-available/ # : file: default adjustm nginx config: adjust server names

Symlink newwiki in /etc/nginx/sites-available/ to /etc/nginx/sites-enabled/

  • test all nginx configuration before restarting sudo nginx -t -c /etc/nginx/nginx.conf
  • restart nginx sudo service nginx restart

Add certificate

Add URL for a new certificate to get also https working see HTTPS Support via Let’s Encrypt

Optionally restarts

Usually not needed: restart nginx, php5-fpm, apache

sudo /usr/sbin/apache2ctl -k graceful && sudo service nginx restart && sudo service php5-fpm restart