QMT Wiki: Difference between revisions

From QmailToaster
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
Download latest MediaWiki
Download latest MediaWiki
<pre style="color: red">
<pre style="color: blue">
  # cd /var/www
  # cd /var/www
  # https://releases.wikimedia.org/mediawiki/1.41/mediawiki-1.41.0.tar.gz
  # 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
Install DB
  # tee /root/sql.cnf<<EOF
  # tee /root/sql.cnf<<EOF
[client]
[client]
Line 12: Line 11:
EOF
EOF
</pre>
</pre>
Install MySQL DB
<pre style="color: blue">
  # mysqladmin --defaults-extra-file=$credfile create mediawiki
  # mysqladmin --defaults-extra-file=$credfile create mediawiki
  # mysql --defaults-extra-file=$credfile -e "CREATE USER mediawiki@localhost IDENTIFIED BY 'p4ssw3rd'"  
  # mysql --defaults-extra-file=$credfile -e "CREATE USER mediawiki@localhost IDENTIFIED BY 'p4ssw3rd'"  
  # mysql --defaults-extra-file=$credfile -e "GRANT ALL PRIVILEGES ON mediawiki.* TO mediawiki@localhost"
  # mysql --defaults-extra-file=$credfile -e "GRANT ALL PRIVILEGES ON mediawiki.* TO mediawiki@localhost"
</pre
Web
<pre style="color: blue">
  # tee /etc/httpd/sites-available/wiki.mydomain.com.conf<<EOF
  # tee /etc/httpd/sites-available/wiki.mydomain.com.conf<<EOF


Line 29: Line 33:
</VirtualHost>
</VirtualHost>
EOF
EOF
</pre>
  # mysql -u root -p mediawiki < mediawiki.sql
  # mysql -u root -p mediawiki < mediawiki.sql
  # https://wiki.mydomain.com/mw-config
  # https://wiki.mydomain.com/mw-config
  Configure with above databases settings
  Configure with above databases settings

Revision as of 15:30, 18 March 2024

Download latest MediaWiki

 # cd /var/www
 # 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

Install MySQL DB

 # mysqladmin --defaults-extra-file=$credfile create mediawiki
 # mysql --defaults-extra-file=$credfile -e "CREATE USER mediawiki@localhost IDENTIFIED BY 'p4ssw3rd'" 
 # mysql --defaults-extra-file=$credfile -e "GRANT ALL PRIVILEGES ON mediawiki.* TO mediawiki@localhost"
</pre
Web
<pre style="color: blue">
 # 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
# mysql -u root -p mediawiki < mediawiki.sql
# https://wiki.mydomain.com/mw-config
Configure with above databases settings