QMT Wiki

From QmailToaster
Revision as of 08:07, 29 March 2024 by Ebroch (talk | contribs)
Jump to navigation Jump to search
On old machine
Backup old QMT Wiki
# /usr/bin/mysqldump -uqmtwikiuser -pqmtwikipass -hlocalhost qmtwiki --single-transaction  > qmtwiki.sql

On new machine
Download latest MediaWiki

# cd /var/www
# wget https://releases.wikimedia.org/mediawiki/1.41/mediawiki-1.41.0.tar.gz
# tar zxvf mediawiki-1.41.0.tar.gz
# tee /root/sql.cnf<<EOF
[client]
user=root
password='mypass'
host=localhost
EOF

Create MySQL DB, restore old database (last step) if upgrading...skip restore if this is a new wiki

# mysqladmin --defaults-extra-file=$credfile create qmtwiki
# mysql --defaults-extra-file=$credfile -e "CREATE USER qmtwikiuser@localhost IDENTIFIED BY 'qmtwikipass'" 
# mysql --defaults-extra-file=$credfile -e "GRANT ALL PRIVILEGES ON qmtwiki.* TO qmtwikiuser@localhost"
# mysql -u root -p qmtwiki < qmtwiki.sql

Configure Apache

# tee /etc/httpd/sites-available/wiki.mydomain.com.conf<<EOF
<VirtualHost *:80>
     ServerName wiki.mydomain.com
     DocumentRoot /var/www/mediawiki-1.41.0
     <Directory />
             Options FollowSymLinks
             AllowOverride None
     </Directory>
     ErrorLog /var/log/httpd/wiki.mydomain.com-error.log
     LogLevel debug
     CustomLog /var/log/httpd/wiki.mydomain.com-access.log combined
</VirtualHost>
EOF

Configure new, or upgrade old, wiki, and use db parameters specified above when prompted

# http://wiki.mydomain.com/mw-config