QMT Wiki: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
'''On old machine''' | '''On old machine''' | ||
Backup old QMT Wiki | Backup old QMT Wiki | ||
# /usr/bin/mysqldump -uqmtwikiuser -pqmtwikipass -hlocalhost qmtwiki --single-transaction > qmtwiki.sql | # /usr/bin/mysqldump -uqmtwikiuser -pqmtwikipass -hlocalhost qmtwiki --single-transaction > 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-config-manager --disable 'remi-php*' | ||
# yum-config-manager --enable remi-php81 | # yum-config-manager --enable remi-php81 | ||
# yum -y install php php-{mysql,pdo,gd,intl,cli,fpm,mysqlnd,zip,devel,gd,mbstring,curl,xml,pear,bcmath,json,opcache,redis,memcache}\ | # 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 | ||
# mysql_secure_installation | # mysql_secure_installation | ||
# tee /root/sql.cnf<<EOF | # tee /root/sql.cnf<<EOF | ||
[client] | [client] | ||
user=root | user=root | ||
password='mypass' | password='mypass' | ||
host=localhost | host=localhost | ||
EOF | EOF | ||
Download latest MediaWiki | Download latest MediaWiki | ||
# cd /var/www | # cd /var/www | ||
# wget https://releases.wikimedia.org/mediawiki/1.41/mediawiki-1.41.0.tar.gz | # wget https://releases.wikimedia.org/mediawiki/1.41/mediawiki-1.41.0.tar.gz | ||
# tar zxvf mediawiki-1.41.0.tar.gz | # tar zxvf mediawiki-1.41.0.tar.gz | ||
# chown apache:apache mediawiki-1.41.0 | # chown apache:apache mediawiki-1.41.0 | ||
# ln -s mediawiki-1.41.0 wiki.qmailtoaster.org | # ln -s mediawiki-1.41.0 wiki.qmailtoaster.org | ||
# cd wiki.qmailtoaster.org/extensions | # cd wiki.qmailtoaster.org/extensions | ||
# git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Tabs | # git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Tabs | ||
# git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/HeaderTabs | # git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/HeaderTabs | ||
# chown apache:apache Tabs HeaderTabs | # chown apache:apache Tabs HeaderTabs | ||
Create MySQL DB, restore old database (last step) if upgrading...skip restore if this is a new wiki | Create MySQL DB, restore old database (last step) if upgrading...skip restore if this is a new wiki | ||
# credfile=/root/sql.cnf | # credfile=/root/sql.cnf | ||
# mysqladmin --defaults-extra-file=$credfile create qmtwiki | # 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 "CREATE USER qmtwikiuser@localhost IDENTIFIED BY 'qmtwikipass'" | ||
# mysql --defaults-extra-file=$credfile -e "GRANT ALL PRIVILEGES ON qmtwiki.* TO qmtwikiuser@localhost" | # mysql --defaults-extra-file=$credfile -e "GRANT ALL PRIVILEGES ON qmtwiki.* TO qmtwikiuser@localhost" | ||
# mysql -u root -p qmtwiki < qmtwiki.sql (Provide by Eric) | # mysql -u root -p qmtwiki < qmtwiki.sql (Provide by Eric) | ||
# tee /etc/httpd/sites-available/wiki.mydomain.com.conf<<EOF | Configure Apache | ||
<VirtualHost *:80> | |||
# 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 58: | ||
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 | ||
Configure new, or upgrade old, wiki, and use db parameters specified above when prompted | Configure new, or upgrade old, wiki, and use db parameters specified above when prompted | ||
# cd /var/www/wiki.qmailtoaster.org | # cd /var/www/wiki.qmailtoaster.org | ||
# wget LocalSettings.php (Provide by Eric) | # wget LocalSettings.php (Provide by Eric) | ||
Redirect DNS to point to your server | Redirect DNS to point to your server | ||
# http://wiki.qmailtoaster.org/ | # http://wiki.qmailtoaster.org/ |
Revision as of 12:05, 29 March 2024
On old machine Backup old QMT Wiki # /usr/bin/mysqldump -uqmtwikiuser -pqmtwikipass -hlocalhost qmtwiki --single-transaction > 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-config-manager --disable 'remi-php*' # yum-config-manager --enable remi-php81 # 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 # mysql_secure_installation # tee /root/sql.cnf<<EOF [client] user=root password='mypass' host=localhost EOF
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 # chown apache:apache mediawiki-1.41.0 # ln -s mediawiki-1.41.0 wiki.qmailtoaster.org # cd wiki.qmailtoaster.org/extensions # git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Tabs # git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/HeaderTabs # 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)
Configure Apache
# 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
# cd /var/www/wiki.qmailtoaster.org # wget LocalSettings.php (Provide by Eric)
Redirect DNS to point to your server # http://wiki.qmailtoaster.org/