QMT Wiki: Difference between revisions

From QmailToaster
Jump to navigation Jump to search
No edit summary
No edit summary
 
(41 intermediate revisions by the same user not shown)
Line 1: Line 1:
'On old machine'
[[Main_Page#QMT_Wiki|Back]]
Backup old QMT Wiki
'''On old machine'''
# /usr/bin/mysqldump -uqmtwikiuser -pqmtwikipass -hlocalhost qmtwiki --single-transaction > qmtwiki.sql
'''''Backup old QMT Wiki'''''
# mysqldump -u root -p qmtwiki  > qmtwiki.sql


On new machine
'''On new machine'''
If Apache, MySQL, PHP are not installed
'''''If Apache, MySQL, PHP are not installed'''''
# yum -y update
# yum -y update
# yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
# yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
# yum -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
# yum -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
# yum-config-manager --disable 'remi-php*'
# yum -y install yum-utils
# yum-config-manager --enable remi-php81
# dnf module reset php
# yum -y install php php-{mysql,pdo,gd,intl,cli,fpm,mysqlnd,zip,devel,gd,mbstring,curl,xml,pear,bcmath,json,opcache,redis,memcache}\
# dnf module install php:remi-8.1
# 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
                 texlive
# yum -y install mysql mysql-server httpd
# yum -y install mysql mysql-server httpd
# systemctl enable --now mysqld httpd
# systemctl enable --now mysqld httpd php-fpm && systemctl status mysqld httpd php-fpm
# mysql_secure_installation
# mysql_secure_installation <span style="color:red">(Remember password for credential file)</span>
# tee /root/sql.cnf<<EOF
# credfile=/root/sql.cnf
[client]
# tee $credfile<<EOF
user=root
[client]
password='mypass'
user=root
host=localhost
password='mypass'
EOF
host=localhost
 
EOF<br>
Download latest MediaWiki
'''''Create MySQL DB, restore old database (last step) if upgrading...skip restore if this is a new wiki'''''<br>
# cd /var/www
# mysqladmin --defaults-extra-file=$credfile create qmtwiki
# wget https://releases.wikimedia.org/mediawiki/1.41/mediawiki-1.41.0.tar.gz
# mysql --defaults-extra-file=$credfile -e "CREATE USER qmtwikiuser@localhost IDENTIFIED BY 'qmtwikipass'"  
# tar zxvf mediawiki-1.41.0.tar.gz
# mysql --defaults-extra-file=$credfile -e "GRANT ALL PRIVILEGES ON qmtwiki.* TO qmtwikiuser@localhost"
# chown apache:apache mediawiki-1.41.0
# wget --user 'user' --password 'password' https://downloads.whitehorsetc.com/qmt/qmtwiki.sql *
# ln -s mediawiki-1.41.0 wiki.qmailtoaster.org
# mysql -u root -p qmtwiki < qmtwiki.sql<br>
# cd wiki.qmailtoaster.org/extensions
'''''Configure Apache'''''<br>
# git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Tabs
# tee /etc/httpd/sites-available/wiki.qmailtoaster.org.conf<<EOF
# git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/HeaderTabs
<VirtualHost *:80>
# chown apache:apache Tabs HeaderTabs
 
 
Create MySQL DB, restore old database (last step) if upgrading...skip restore if this is a new wiki
 
# credfile=/root/sql.cnf
# 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 (Provide by Eric)
</pre>
Configure Apache
 
# tee /etc/httpd/sites-available/wiki.mydomain.com.conf<<EOF
<VirtualHost *:80>
     ServerName wiki.qmailtoaster.org
     ServerName wiki.qmailtoaster.org
     DocumentRoot /var/www/wiki.qmailtoaster.org
     DocumentRoot /var/www/wiki.qmailtoaster.org
Line 58: Line 45:
     LogLevel debug
     LogLevel debug
     CustomLog /var/log/httpd/wiki.qmailtoaster.org-access.log combined
     CustomLog /var/log/httpd/wiki.qmailtoaster.org-access.log combined
</VirtualHost>
</VirtualHost>
EOF
EOF
 
# ln -s /etc/httpd/sites-available/wiki.qmailtoaster.org.conf /etc/httpd/sites-enabled/wiki.qmailtoaster.org.conf
Configure new, or upgrade old, wiki, and use db parameters specified above when prompted
# systemctl reload httpd<br>
'''''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
# ln -s mediawiki-1.41.0 wiki.qmailtoaster.org
# git -C wiki.qmailtoaster.org/extensions clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Tabs
# git -C wiki.qmailtoaster.org/extensions clone https://gerrit.wikimedia.org/r/mediawiki/extensions/HeaderTabs
# wget--user 'user' --password 'password' -P wiki.qmailtoaster.org 'https://downloads.whitehorsetc.com/qmt/LocalSettings.php *
# wget--user 'user' --password 'password' -P wiki.qmailtoaster.org/resources/assets https://downloads.whitehorsetc.com/qmt/qtwiki-old.png *
# chown apache:apache -R mediawiki-1.41.0<br>


# cd /var/www/wiki.qmailtoaster.org
'''''Go to wiki'''''<br>
# wget LocalSettings.php (Provide by Eric)
Point DNS your server
# http://wiki.qmailtoaster.org/


Redirect DNS to point to your server
* Note: Credentials provided by Eric
# http://wiki.qmailtoaster.org/

Latest revision as of 21:27, 24 April 2024

Back

On old machine
Backup old QMT Wiki
# mysqldump -u root -p qmtwiki  > qmtwiki.sql
On new machine
If Apache, MySQL, PHP are not installed
# yum -y update
# yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
# yum -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
# yum -y install yum-utils
# dnf module reset php
# dnf module install php:remi-8.1
# 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
# yum -y install mysql mysql-server httpd
# systemctl enable --now mysqld httpd php-fpm && systemctl status mysqld httpd php-fpm
# mysql_secure_installation (Remember password for credential file)
# credfile=/root/sql.cnf
# tee $credfile<<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" # wget --user 'user' --password 'password' https://downloads.whitehorsetc.com/qmt/qmtwiki.sql * # mysql -u root -p qmtwiki < qmtwiki.sql
Configure Apache
# tee /etc/httpd/sites-available/wiki.qmailtoaster.org.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 # ln -s /etc/httpd/sites-available/wiki.qmailtoaster.org.conf /etc/httpd/sites-enabled/wiki.qmailtoaster.org.conf # systemctl reload httpd
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 # ln -s mediawiki-1.41.0 wiki.qmailtoaster.org # git -C wiki.qmailtoaster.org/extensions clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Tabs # git -C wiki.qmailtoaster.org/extensions clone https://gerrit.wikimedia.org/r/mediawiki/extensions/HeaderTabs # wget--user 'user' --password 'password' -P wiki.qmailtoaster.org 'https://downloads.whitehorsetc.com/qmt/LocalSettings.php * # wget--user 'user' --password 'password' -P wiki.qmailtoaster.org/resources/assets https://downloads.whitehorsetc.com/qmt/qtwiki-old.png * # chown apache:apache -R mediawiki-1.41.0
Go to wiki
Point DNS your server # http://wiki.qmailtoaster.org/
* Note: Credentials provided by Eric