QMT Wiki

From QmailToaster
Revision as of 11:04, 29 March 2024 by Ebroch (talk | contribs)
Jump to navigation Jump to search

On old machine Backup old QMT Wiki

  1. /usr/bin/mysqldump -uqmtwikiuser -pqmtwikipass -hlocalhost qmtwiki --single-transaction > qmtwiki.sql

On new machine If Apache, MySQL, PHP are not installed

  1. yum -y update
  2. yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
  3. yum -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
  4. yum-config-manager --disable 'remi-php*'
  5. yum-config-manager --enable remi-php81
  6. yum -y install php php-{mysql,pdo,gd,intl,cli,fpm,mysqlnd,zip,devel,gd,mbstring,curl,xml,pear,bcmath,json,opcache,redis,memcache}\
                texlive
  1. yum -y install mysql mysql-server httpd
  2. systemctl enable --now mysqld httpd
  3. mysql_secure_installation
  4. tee /root/sql.cnf<<EOF

[client] user=root password='mypass' host=localhost EOF

Download latest MediaWiki

  1. cd /var/www
  2. wget https://releases.wikimedia.org/mediawiki/1.41/mediawiki-1.41.0.tar.gz
  3. tar zxvf mediawiki-1.41.0.tar.gz
  4. chown apache:apache mediawiki-1.41.0
  5. ln -s mediawiki-1.41.0 wiki.qmailtoaster.org
  6. cd wiki.qmailtoaster.org/extensions
  7. git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Tabs
  8. git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/HeaderTabs
  9. chown apache:apache Tabs HeaderTabs


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

  1. credfile=/root/sql.cnf
  2. mysqladmin --defaults-extra-file=$credfile create qmtwiki
  3. mysql --defaults-extra-file=$credfile -e "CREATE USER qmtwikiuser@localhost IDENTIFIED BY 'qmtwikipass'"
  4. mysql --defaults-extra-file=$credfile -e "GRANT ALL PRIVILEGES ON qmtwiki.* TO qmtwikiuser@localhost"
  5. mysql -u root -p qmtwiki < qmtwiki.sql (Provide by Eric)

Configure Apache

  1. tee /etc/httpd/sites-available/wiki.mydomain.com.conf<<EOF

<VirtualHost *:80>

    ServerName wiki.qmailtoaster.org
    DocumentRoot /var/www/wiki.qmailtoaster.org
    <IfModule dir_module>
       DirectoryIndex index.php
    </IfModule>
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>
    ErrorLog /var/log/httpd/wiki.qmailtoaster.org-error.log
    LogLevel debug
    CustomLog /var/log/httpd/wiki.qmailtoaster.org-access.log combined

</VirtualHost> EOF

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

  1. cd /var/www/wiki.qmailtoaster.org
  2. wget LocalSettings.php (Provide by Eric)

Redirect DNS to point to your server

  1. http://wiki.qmailtoaster.org/