Talk:Main Page

From CCARH Wiki
Revision as of 20:27, 10 December 2014 by Craig (talk | contribs) (added description of upgrading and backing-up the wiki.)
Jump to navigation Jump to search

How to edit the navigation aside on the left side of pages

The sidebar on the right, starting with "Main page", "Music 252", etc. can be changed by editing the MediaWiki:Sidebar page. See the documentation for the sidebar for more editing details.


Backing up the wiki

To backup the wiki (such as to re-install on a new server after the old one crashes), you must backup two main components:

  1. the MySQL database (called ccarhwiki)
  2. the local components of the MediaWiki website, particularly the images directory

Backing up the MySQL ccarhwiki database is done with this command:

    /usr/bin/mysqldump -u root -p ccarhwiki -c | \
           /bin/bzip2 -9 > ccarhwiki-$(date '+%Y%m%d').sql.bz2'

Most of the local webfiles are stored in /project/ccarhwiki/permanent-files/current/website. This is backed up as regular directories would.

Reinstalling the CCARH wiki

On the new server, delete any pre-existing ccarhwki database in the MySQL database:

     mysql -u root -p
     SHOW DATABASES;
     DROP DATABASE ccarhwiki;

Create a fresh ccarhwiki database:

    mysql -u root -p
    SHOW DATABASES;
    CREATE DATABASE ccarhwiki CHARACTER SET utf8 COLLATE utf8_general_ci;

Create an account to access the ccarhwiki MySQL database with a username such as ccarhwiki, with a password replacing "yourpassword" in the following command:

    mysql -u root -p
    CREATE USER 'ccarhwiki'@'localhost' IDENTIFIED BY 'yourpassword';
    GRANT ALL ON ccarhwiki.* to 'ccarhsiki'@'localhost' IDENTIFIED BY 'yourpassword';
    FLUSH PRIVILEGES;

Then insert the old MySQL database into the new server's MySQL database:

    bzcat ccarhwiki-*.sql.bz2 | mysql -u -ccarhwiki -p ccarhwiki

Then setup MediaWiki on the newserver, linking the "permanent-files" components into the MediaWiki installation. To setup the wiki, go to the website and run the MediaWiki installation script. This will update the MySQL ccarhwiki database (so the ccarhwiki database has to be loaded into MySQL before the website is installed).

The Apache web server should includes these lines for the wiki.ccarh.org virtual host:

    RewriteEngine On
    ScriptAlias ^$ /wiki/
    RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/index.php [L]

This is needed in order for wikipages in this form:

    http://wiki.ccarh.org/wiki/XXX

instead of:

    http://wiki.ccarh.org/index.php/XXX


WikiMedia Documentation