DaqWikiManagement
Jump to navigation
Jump to search
Links
- https://www.mediawiki.org/wiki/MediaWiki
- https://www.mediawiki.org/wiki/Version_lifecycle
- https://en.wikipedia.org/wiki/MediaWiki_version_history
- https://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki
- https://www.mediawiki.org/wiki/Manual:Installation_guide
Migrate and update (el7 to U-20.04)
Migrating AdWiki from daqstore (el7) to daq00 (U-20.04).
- rsync daqstore:/var/www/html/AgWiki to /home/daqweb/mediawiki/AgWiki/core
- rsync core to core-1.30 ### make a backup
- cd core
- git fetch
- refer to https://www.mediawiki.org/wiki/Version_lifecycle to decode which version to use
- upgrade path 1.30 -> 1.31 LTS -> 1.35 LTS
- mv composer.json composer.json-1.30
- git checkout REL1_31
- cd extensions/WikiEditor, git fetch, git checkout REL1_31
- cd skins/Vector, git fetch, git checkout REL1_31
- try to load https://daq00/AgWiki, error 500
- run composer update. composer version 2 bombs, composer version 1 bombs with php error
- ssh daqstore, cd ~daqweb/mediawiki/AgWiki/core, ../../composer.phar-1.2.2 update
- try to load https://daq00/AgWiki, php error: no viable database extension found for type 'mysql'
- apt install php-mysql, same error
- edit /etc/php/7.4/apache2/php.ini, uncomment "extension=mysqli", systemctl reload apache2
- try to load https://daq00/AgWiki, php error: Cannot access the database: No such file or directory (localhost), this is correct we did not copy/migrate the mysql database yet.
- ssh daqstore, mysqldump -h localhost -u aguser -p AgWiki > backup.sql
- apt install mariadb-server
- mysql_secure_installation ### accept all default answers
- try to load https://daq00/AgWiki, php error: Cannot access the database: Access denied for user 'aguser'@'localhost' (localhost), this is correct, we did not create the user
- per https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki#MariaDB/MySQL
mysql -p MariaDB [(none)]> CREATE DATABASE AgWiki; MariaDB [(none)]> CREATE USER 'agwikiuser'@'localhost' IDENTIFIED BY 'agwikiuser123'; MariaDB [(none)]> GRANT ALL PRIVILEGES ON AgWiki.* TO 'agwikiuser'@'localhost' WITH GRANT OPTION;
Install (el7)
ssh ladd00 cd ~daqweb/mediawiki rsync -av DaqWiki daqstore:/var/www/html/ ssh daqstore cd /var/www/html mv DaqWiki/core AgWiki cd AgWiki git fetch git checkout REL1_30 cd skins/Vector git fetch git checkout REL1_30 cd extensions/WebEditor git fetch git checkout REL1_30 open https://daqstore.triumf.ca/AgWiki/ - should give an internal error, a php exception edit LocalSettings.php
do the composer stuff
get the composer: https://getcomposer.org/download/ cd AgWiki ../composer.phar update open https://daqstore.triumf.ca/AgWiki/ - should give an error - cannot connect to the database
configure mysql
yum install php71w-mysql rpm -q mariadb ### mariadb-5.5.56-2.el7.x86_64 systemctl enable mariadb systemctl start mariadb mysql_secure_installation # set root password # accept all default answers mysql -p ### enter the root password create database `AgWiki`; create user `agwiki` identified by `agwiki123`; GRANT USAGE ON *.* TO 'aguser'@localhost IDENTIFIED BY 'aguser123'; GRANT ALL privileges ON `AgWiki`.* TO 'aguser'@localhost; FLUSH PRIVILEGES; show grants for 'aguser'@localhost; exit enter these database settings to LocalSettings.php
configure mediawiki
get rid of (rename) LocalSettings.php open https://daqstore.triumf.ca/AgWiki/ follow the link to do the configuration answer all the questions answer all the additional questions save LocalSettings.php copy it to AgWiki open the wiki - login page should open, login normally got to special pages -> version update all the individual extensions: cd extensions/XXX git fetch git checkout REL1_30 ### as appropriate systemctl restart httpd reload the wiki version page
make images directory writable
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/AgWiki/images(/.*)?' restorecon -Rv /var/www/html/AgWiki/images ls -alZ /var/www/html/AgWiki/images/
additional selinux incantations
setsebool -P httpd_setrlimit 1
Misc
- MediaWiki:Sidebar edit the navigation side bar