Manual:Running MediaWiki on Slackware Linux

From MediaWiki.org

Jump to: navigation, search
Caution! The content of this page has not been verified.

Instructions written in this page have not been verified to be correct.
If there are any inaccuracies, please drop a note at the support desk.

Installation guides
on FreeBSD
on GNU/Linux
- ALT Linux
- Damnsmalllinux
- Debian
- Fedora Core
- Gentoo
- Mandrake
- Red Hat Enterprise Linux
- Slackware
- SuSE 9.3
- Ubuntu
on Mac OS X
on NetWare
on Solaris
- on Solaris 10
- on Solaris 9
on Windows
- Windows XP
- Windows Vista
- Windows Server 2000
- Windows Server 2003
- Newcomers guide
- Streamlined Guide
- Simple Windows/Apache Guide
- on a stick
- on WOS Portable
- on Uniform Server
- on Sourceforge.net
  
This page was recently moved from MetaWiki.
The page probably requires cleanup - please feel free to help out. Remove this template once that is done.


Warning: no promises of security are made in this guide. It was intended to be run on an offline workstation.

Contents

[edit] System

  • Slackware Linux full install: [1]
    • Apache: [2]
    • MySQL: [3]
    • MediaWiki: [4]
    • Cur dump of the database (20031231_cur_table.sql.bz2): [5]

Slackware's full installation includes Apache, MySQL, and PHP, though some administrative work is still needed to get them up and running.

[edit] Settings

For this guide, I will make the following assumptions about names, directories, and the like, but you will want to make some of them different:

  • name - The wiki needs a name; this example is called vicuna.
  • database - It also needs a database, which will also be called vicuna in this example.
  • passwords - There are several passwords involved, most importantly the password for the wiki database, and the initial administrator account you'll create when running the configuration page.
  • directory - The directory where the wiki will be installed. In this example, it's /var/wiki.

[edit] Configuration of Apache

At a minimum, the webserver must access your wiki on demand. There are better and more complex ways of setting it up, but this will suffice. In /etc/apache/httpd.conf, in the section IfModule mod_alias.c, add the following line:

Alias /wiki/ /var/wiki

Replace /var/wiki with the directory you've chosen.

Apache will not be configured to use PHP by default, so you may need to do the following.

  1. Edit /etc/apache/httpd.conf by uncommenting the line #Include /etc/apache/mod_php.conf
  2. Edit /etc/apache/mod_php.conf by adding .phtml to the line AddType application/x-httpd-php .php
  3. If Apache isn't running, enter apachectl start, otherwise, do apachectl restart.

[edit] Configuration of MySQL

Perform the following commands as root.

  1. Copy one of the MySQL configuration files in /etc to my.cnf:
    cp /etc/my-meduium.cnf /etc/my.cnf
  2. Initialize the MySQL databases (only necessary once per system, but harmless):
    su mysql -c mysql_install_db
  3. Start the MySQL daemon:
    mysqld_safe --user=mysql &
  4. Set the root password:
    mysqladmin -u root password password

You probably want MySQL to start at system boot time. You must edit a couple of init scripts to accomplish this.

  • Place the startup script:
    cp /usr/share/mysql/mysql.server /etc/rc.d/rc.mysql
  • Edit /etc/rc.d/rc.M and add the following text near the end:
# Start the MySQL server
if [ -x /etc/rc.d/rc.mysql ]; then
  . /etc/rc.d/rc.mysql start
fi
  • Edit /etc/rc.d/rc.K and add the following text above the "Kill all processes" section:
# Shut down the MySQL server:
if [ -x /etc/rc.d/rc.mysql ]; then
  /etc/rc.d/rc.mysql stop
fi

[edit] Configuration of MediaWiki

  1. Go to the directory where you will install Mediawiki, such as /var, and unpack the package:
    cd /var
    tar xzvf ~/mediawiki-1.x.x.tar.gz
  2. Rename the directory to something manageable:
    mv mediawiki-1.x.x wiki
  3. Make the config directory world-writable:
    chmod o+w wiki/config
  4. Load the configurating page in your web browser and use it. Go to http://my.host/wiki/config/.
  5. Once the configuration has completed successfully, shut off the config directory:
    chmod 700 wiki/config
  6. And get your LocalSettings.php file installed:
    mv wiki/config/LocalSettings.php wiki
  7. Edit LocalSettings.php as desired.

[edit] Loading the dump

  1. Unzip the dump by typing: bunzip2 20031231_cur_table.sql.bz2 (this will take a while depending on the size of the dump and the speed of your workstation).
  2. Import the dump in your database by starting a mysql session as above, if you have not done so, loading the wiki database (the name as you gave above), by typing: use <wiki db> and then importing the data by typing: source /path/20031231_cur_table.sql. This will also take a long time.

At this point you should have a working install with some data in it. Other things will also need to be set up (classic TODO here).

[edit] See also

Personal tools