QMT Wiki: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 24: | Line 24: | ||
EOF | EOF | ||
# MYSQLPW=`cat /root/sql.cnf | grep password | sed 's/password=//'`<br> | # MYSQLPW=`cat /root/sql.cnf | grep password | sed 's/password=//'`<br> | ||
'''''Create MySQL DB, restore old database (last step) if upgrading...skip restore if this is a new wiki'''''<br> | |||
# mysqladmin -uroot password $MYSQLPW | |||
# 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 'url'/qmtwiki.sql (Provided by Eric) | |||
# mysql -u root -p qmtwiki < qmtwiki.sql<br> | |||
'''''Download latest MediaWiki''''' | '''''Download latest MediaWiki''''' | ||
# cd /var/www | # cd /var/www | ||
Line 34: | Line 41: | ||
# wget -P wiki.qmailtoaster.org/resources/assets 'url'/qtwiki-old.png (Provided by Eric) | # wget -P wiki.qmailtoaster.org/resources/assets 'url'/qtwiki-old.png (Provided by Eric) | ||
# chown apache:apache -R mediawiki-1.41.0<br> | # chown apache:apache -R mediawiki-1.41.0<br> | ||
'''''Configure Apache'''''<br> | '''''Configure Apache'''''<br> | ||
# tee /etc/httpd/sites-available/wiki.mydomain.com.conf<<EOF | # tee /etc/httpd/sites-available/wiki.mydomain.com.conf<<EOF |
Revision as of 15:29, 29 March 2024
On old machine Backup old QMT Wiki # 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 -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 # credfile=/root/sql.cnf # tee $credfile<<EOF [client] user=root password='mypass' host=localhost EOF # MYSQLPW=`cat /root/sql.cnf | grep password | sed 's/password=//'`
Create MySQL DB, restore old database (last step) if upgrading...skip restore if this is a new wiki
# mysqladmin -uroot password $MYSQLPW # 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 'url'/qmtwiki.sql (Provided by Eric) # mysql -u root -p qmtwiki < qmtwiki.sql
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 -P wiki.qmailtoaster.org 'url'/LocalSettings.php (Provided by Eric) # wget -P wiki.qmailtoaster.org/resources/assets 'url'/qtwiki-old.png (Provided by Eric) # chown apache:apache -R mediawiki-1.41.0
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 # ln -s /etc/httpd/sites-available/wiki.qmailtoaster.org.conf /etc/httpd/sites-enabled/wiki.qmailtoaster.org.conf # systemctl reload httpd
Go to wiki
Redirect DNS to point to your server # http://wiki.qmailtoaster.org/