Manual:Running MediaWiki on Slackware Linux

Jump to: navigation, search
Language: English
This message box is using an invalid "type=warning" parameter and needs fixing.

Installation guidesManual:Installation guide
on FreeBSDManual:Running MediaWiki on FreeBSD
on GNU/LinuxManual:Running MediaWiki on Linux
- ALT LinuxManual:Running MediaWiki on ALT Linux
- Arch LinuxManual:Running MediaWiki on Arch Linux
- DamnsmalllinuxManual:Running MediaWiki on Damnsmalllinux
- DebianManual:Running MediaWiki on Debian GNU/Linux
- FedoraManual:Running MediaWiki on Fedora
- GentooManual:Running MediaWiki on Gentoo Linux
- MandrivaManual:Running MediaWiki on Mandriva
- Red Hat Enterprise LinuxManual:Running MediaWiki on Red Hat Linux
- SlackwareManual:Running MediaWiki on Slackware Linux
- UbuntuManual:Running MediaWiki on Ubuntu
on Mac OS XManual:Running MediaWiki on Mac OS X
on NetWareManual:Running MediaWiki on NetWare
on SolarisManual:Running MediaWiki on Solaris
- on Solaris 11 / opensolarisManual:Running MediaWiki on Solaris 11 / opensolaris
- on Solaris 10Manual:Running MediaWiki on Solaris 10
on WindowsManual:Running MediaWiki on Windows
- Windows Server 2008Manual:Installing MediaWiki on Windows Server 2008
- Windows Server 2003Manual:Installing MediaWiki on Windows Server 2003
- Streamlined GuideManual:Streamlined Windows Install Guide
- Simple Windows/Apache GuideManual:Simple Windows Apache Installation
on a stickManual:Wiki on a stick
- on MoWeS PortableManual:Installing on MoWeS Portable (Windows)
- on Uniform ServerManual:Installation on Uniform Server (Windows)
- on XAMPPManual:Installing MediaWiki on XAMPP
on Sourceforge.netManual:Running MediaWiki on

This page was moved from MetaWiki.
It probably requires cleanup – please feel free to help out. In addition, some links on the page may be red; respective pages might be found at Meta. Remove this template once cleanup is complete.

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

Settings[edit | edit source]

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.

Configuration of Apache[edit | edit source]

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/httpd/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/httpd/httpd.conf by uncommenting the line: #Include /etc/httpd/mod_php.conf
  2. Edit /etc/httpd/httpd.conf by adding: index.php to the line DirectoryIndex index.html
  3. Edit /etc/httpd/mod_php.conf by adding: .phtml to the line <FilesMatch \.(php|phtml)$>
  4. Make sure Apache is set to run at startup: chmod +x /etc/rc.d/rc.httpd
  5. Test your httpd.conf syntax: apachectl -t
  6. Restart/Start Apache: /etc/rc.d/rc.httpd restart.

Configuration of MySQL[edit | edit source]

Perform the following commands as root.

  1. Copy one of the MySQL configuration files in /etc to my.cnf:
    cp /etc/my-medium.cnf /etc/my.cnf
  2. Initialize the MySQL databases (only necessary once per system, but harmless):
    su mysql -c mysql_install_db
  3. Set the Mysql server to start at boot:
    chmod +x /etc/rc.d/rc.mysqld
  4. Set ownership of the files in /var/lib/mysql/:
    chown -R mysql:mysql /var/lib/mysql
  5. Start the MySQL daemon:
    /etc/rc.d/rc.mysqld start
  6. Secure your Installation with the script provided:

You'll be prompted for a root mysql password. (This and all other mysql user passwords are completely independent from the system passwords so don't confuse them!)

Follow the prompts and choose the most secure options that suit your situation.

Configuration of MediaWiki[edit | edit source]

For experienced users, here is the quick version of the installation instructions. Most users will want to go through all the passages.

  1. Check that your system meets the minimum requirements
  2. Download MediaWiki (direct link to download the stable release version) and extract the archive to a web-accessible folder on your server.
  3. Point your browser to the directory where MediaWiki was extracted and follow the link to the setup screen. It should be in the form http://[domain]/[directory]/mw-config/index.php. Replace [directory] with the path to your extracted MediaWiki folder. If installing on a local machine, replace [domain] with [localhost]. A locally installed wiki will need the LocalSettings.php modified from [localhost] to [domain] if you will ever be accessing the wiki from that domain. If installed on a remote server, replace [domain] with your server's domain name (eg:
  4. Follow the on-screen instructions to complete the process.

These instructions are deliberately brief. There is a lot that could go wrong, so if in doubt, you are advised to read the full instructions!

See also[edit | edit source]