User:Andreas Plank/new wiki
From Biowikifarm Metawiki
$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" '{}' ';'
Contents
Database
http://biowikifarm.net/phpmyadmin_v3-3-7/
- 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
-- 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